Re: resize image not work in Firefox
am 30.03.2008 17:27:55 von nnOn Sat, 22 Mar 2008 01:17:10 -0700 (PDT), pt36
wrote:
>Hi
>I have this script for resize many differents images on a php page
>
>in the page miniature.php:
>
>$maxx = "75";
>$maxy = "75";
>$source_image_URL = $_GET["src"];
>$source_image = imagecreatefromjpeg($source_image_URL);
>list($width, $height) = getimagesize($source_image_URL);
>$percent1 = $width / $maxx;
>$percent2 = $height / $maxy;
>$percent = max($percent1,$percent2);
>$new_eight = round($height /$percent);
>$new_width = round($width /$percent);
>$dest_image = imagecreatetruecolor($new_width, $new_eight);
>imagecopyresampled ($dest_image, $source_image, 0, 0, 0, 0,$new_width,
>$new_eight, $width, $height);
>header("Content-type: image/jpeg");
>imagejpeg($dest_image);
>imagedestroy($dest_image);
>imagedestroy($source_image);
>?>
>
>this page was called from another pages detail.php
>in this page I have a table with 4 images and each image call the
>script
>
>
>In Explorer the script work well, also in Opera.
>In Firefox not work well and the first image on the table not appear
>
>Any suggestion please ?
>
>Thanks
i have a very similar script and it works fine in mozilla.
i think your problem might be here:
it should be:
border="0" >
(with a " at the end of the img src tag, after the ?>)
hope this helps,
NN