Page 1 of 1

imagemagick long running convert call

Posted: 2009-07-17T11:05:38-07:00
by lowercase24
I am attempting to convert the following image with the command line:

convert source.jpg target.jpg

and the command takes minutes to execute on a fast machine. I am running:

Version: ImageMagick 6.4.3 2008-08-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

The following link contains the time in the stack during the execution of the convert call:

http://skitch.com/lowercase24/ba6kw/sample-of-convert

source image:
http://www.henrickson.org/shared/838563 ... aa87a1.jpg

When I attempt to load the same image and do a crop and rotation on it using magickwand, the apache process bloats to around 12 gigs of memory. Could someone please take a look at this issue? Is this by design? Is there something I can do to make this more efficient?

Re: imagemagick long running convert call

Posted: 2009-07-17T13:12:21-07:00
by magick
That's a pretty large image, 17471x27743 pixels. Most likely your image is being cached to disk which can be 1000 times slower than memory. It converted in seconds on our system with 32GB of memory. See http://www.imagemagick.org/script/architecture.php for details. If you are creating thumbnails there is a speed up. Try
  • convert -size 1024x1204 source.jpg -resize 1024x1024 target.jpg

Re: imagemagick long running convert call

Posted: 2009-07-17T18:22:47-07:00
by anthony
See Thumbnail Generation with JPG...
Thumbnails, Profiles, Stripping, and JPEG Handling
http://www.imagemagick.org/Usage/thumbnails/#profiles