Resize Produces Half Empty PNG's in Firefox, Safari Blank
Posted: 2007-10-29T00:12:37-07:00
Debian 2.4.27-3-386
PHP 4.4.4-8+etch3
Imagemagick 6.2.4.5.dfsg1-0.14
Apache 2.2.3-4
Source File:
http://www.sandiegoish.com/imagemagick/140.png
Resized Problem File:
http://www.sandiegoish.com/imagemagick/140_240.png
Resized Smaller OK File:
http://www.sandiegoish.com/imagemagick/140_75.png
When I use the following commands on a PNG, the resize to 240x240 produces a half empty image or non displayable image on Firefox, Safari, Preview and Photoshop on a Mac. It will not even handle the resized image. For some reason, resize with dimensions of 75x75 produces a displayable image. I have exported the same image from Photoshop using numerous combinations of PNG settings with and without transparency and get the same results. All commands I use produce GIF's and JPEG's that display properly.
copy($image_file, $image_thumb_240);
copy($image_file, $image_thumb_75);
exec( "mogrify -resize '240x240>' $image_thumb_240 &" );
exec( "mogrify -resize '75x75>' $image_thumb_75 &" );
chmod($image_thumb_240, 0440);
chmod($image_thumb_75, 0440);
I also tried and encountered the same problem with the convert command below.
exec( "convert $image_file -resize '240x240' $image_thumb_240&" );
Any ideas on how to resolve this would be greatly appreciated. Hopefully it's not a bug, in which case sorry for the wrong category posting. I did search through the archives and Google before posting here.
PHP 4.4.4-8+etch3
Imagemagick 6.2.4.5.dfsg1-0.14
Apache 2.2.3-4
Source File:
http://www.sandiegoish.com/imagemagick/140.png
Resized Problem File:
http://www.sandiegoish.com/imagemagick/140_240.png
Resized Smaller OK File:
http://www.sandiegoish.com/imagemagick/140_75.png
When I use the following commands on a PNG, the resize to 240x240 produces a half empty image or non displayable image on Firefox, Safari, Preview and Photoshop on a Mac. It will not even handle the resized image. For some reason, resize with dimensions of 75x75 produces a displayable image. I have exported the same image from Photoshop using numerous combinations of PNG settings with and without transparency and get the same results. All commands I use produce GIF's and JPEG's that display properly.
copy($image_file, $image_thumb_240);
copy($image_file, $image_thumb_75);
exec( "mogrify -resize '240x240>' $image_thumb_240 &" );
exec( "mogrify -resize '75x75>' $image_thumb_75 &" );
chmod($image_thumb_240, 0440);
chmod($image_thumb_75, 0440);
I also tried and encountered the same problem with the convert command below.
exec( "convert $image_file -resize '240x240' $image_thumb_240&" );
Any ideas on how to resolve this would be greatly appreciated. Hopefully it's not a bug, in which case sorry for the wrong category posting. I did search through the archives and Google before posting here.