php - Showing resized image on browser -


  & lt;? $ Location = "http: //localhost/folwer.bmp"; Header ("Location: $ location"); ? & Gt;  

But I need to show it on the browser as 120x240 or any other size. How can I do without the size of the original image using PHP? help please. Use class on this (save it as SimpleImage.php on your server) then use it on

  & lt ;? Php header ('content-type: image / JPEG'); Included ('SimpleImage.php'); $ Image = New Simple Image (); $ Image & gt; Load ($ location); $ Image- & gt; Change shape (120, 240); $ Image & gt; Production (); ? & Gt;  

Some comments:

To work around this, the $ location variable should be the path to the image on your server, not the URL.

This will change the image to 120 pixels wide and 240 in height. You probably want 240 x120

I'm not sure that it works with BMP files. Are you also working with BMP files?


Comments