Unable to thumbnail certain images.

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
jermsfoo
Posts: 3
Joined: 2011-04-12T12:01:27-07:00
Authentication code: 8675308

Unable to thumbnail certain images.

Post by jermsfoo »

Hello All,
I am new to this but am having issue with only certain types of images see example at (http://jermsmedia.com/ArizonaFishingGui ... lmouth.jpg)

I am using the following code to convert other images successfully but am clueless as to why this one will not work. The only thing I see is the image resolution is at 480 where most successful ones are 180 or less. I have tried -resamples with no avail.

Code: Select all

exec("convert $imgpath -thumbnail '1024x768>'  $imgpath"); 
exec("convert $thmbpath -thumbnail '150x150>'  $thmbpath");
Any help on this would be greatly appreciated.
Host is running ImageMagick 6.5.9

Thank you,
Jeremy
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Unable to thumbnail certain images.

Post by Bonzo »

I pressume the linked image is the one corrupted by Imgemagick not the original ? If so can you post the original so we can try it ?
jermsfoo
Posts: 3
Joined: 2011-04-12T12:01:27-07:00
Authentication code: 8675308

Re: Unable to thumbnail certain images.

Post by jermsfoo »

Hello Bonzo,
That's just it I don't think ImageMagick did anything to the image at all. It didn't resize it that's for sure the dimensions for both the thumb and image were the same as the file I attached and not what is specified in the code included. I will try to obtain the original from the client to see if there are any differences but I pulled that one down from the web server.

I will attach here shortly.

Thank you,
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Unable to thumbnail certain images.

Post by Bonzo »

I have just viewed the photo online again and it displayed OK. The first time I viewed it only about 1/2 of it loaded OK. This is how it was saved to my PC.
I think there is something wrong with the original image.
Last edited by Bonzo on 2011-04-12T13:56:57-07:00, edited 1 time in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Unable to thumbnail certain images.

Post by Bonzo »

I do not know if you have changed the image but I have just downloaded and resized it OK on my localhost using:

Code: Select all

exec("convert fish.jpg -thumbnail \"150x150>\"  small_fish.jpg");
NOTE: I had to change the ' to \" as I am on a Windows PC.
Last edited by Bonzo on 2011-04-12T13:56:18-07:00, edited 1 time in total.
jermsfoo
Posts: 3
Joined: 2011-04-12T12:01:27-07:00
Authentication code: 8675308

Re: Unable to thumbnail certain images.

Post by jermsfoo »

You'll never guess what it was (SMH) AHHHHHHHHHHHHHH!

Stupid file name had a space in it.... Teach me for not checking the name first right LOL.

Thank you for your help sir!
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Unable to thumbnail certain images.

Post by Bonzo »

I did not even think about that as I automaticaly removed the space !
Post Reply