Hello,
I manage a website where people can upload photos for various reasons, and came across a particular file that was causing convert to lock up and create enormous temporary files.
The command was :
/usr/local/bin/convert FILENAME.JPG -resample 72x72 -resize 0.66% /data/www/temp_photos/FILENAME_2.JPG
The image was :
http://removed.jpg
The debug output was :
http://dl.dropbox.com/u/10460707/convert-debug2.txt
The debug would have continued on for quite a while, it looks like it is processing each individual pixel when I just let the debug output go for a while.
Using identify on the original image (this command) :
identify -format "%[colorspace] %[xresolution] %[width] %[height]" FILENAME.JPG
Yields - RGB 2 3937 2625
Thanks for any help! This one has me stumped.
- Chase
[RESOLVED] Convert locking up with specific image.
[RESOLVED] Convert locking up with specific image.
Last edited by mmazing on 2011-11-22T15:46:04-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert locking up with specific image.
your input image density (resolution) = 2, so perhaps -resample is having trouble or making a huge image before you resize by 0.66% which is very small.
Why don't you just resize the input image to your desired WxH and then set the density to 72.
convert yourimage.jpg -resize WxH -density 72 resultimage.jpg
Why don't you just resize the input image to your desired WxH and then set the density to 72.
convert yourimage.jpg -resize WxH -density 72 resultimage.jpg
Re: Convert locking up with specific image.
It seems to be a problem with the resampling, for some reason the original image has a DPI of "2/1" in the EXIF data.
The problem goes away if I remove the -resample 72x72 option.
The problem goes away if I remove the -resample 72x72 option.
Re: Convert locking up with specific image.
Thanks, I'll try this.fmw42 wrote:your input image density (resolution) = 2, so perhaps -resample is having trouble or making a huge image before you resize by 0.66% which is very small.
Why don't you just resize the input image to your desired WxH and then set the density to 72.
convert yourimage.jpg -resize WxH -density 72 resultimage.jpg
Edit : I'm pretty sure this will fix it, thanks again.