.TIFF to .JPG eating up processor

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

JPEG has a nice feature where you can ask the JPEG library to return a thumbnail of a large JPEG image but TIFF has no such feature unless the thumbnail is included with the large TIFF. To reduce CPU usage you can force the pixel cache to disk but it will slow down processing time considerably (you're trading processor usage for I/O usage). To force operations to disk, add -limit area 64 to your command line. You might want to try the current ImageMagick release, 6.2.7-1, which has some tweaks for dealing with large images. You will also get some speed improvement by using -thumbnail rather than -resize. The -resize option creates two internal images for horizontal and vertical scaling whereas -thumbnail only creates one internal image.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Add the -limit option as the first option of the command line. Follow it with -debug cache to verity the pixel cache is on disk.
Greg Coats
Posts: 31
Joined: 2004-10-28T11:18:28-07:00
Location: Virginia, USA

Post by Greg Coats »

My slower Mac G5 (1.8 versus 2.0 GHz) converts a larger file (71 versus 60 MB) six times faster (11 versus 70 seconds) than you are experiencing, and we are both using ImageMagick 6.2.6. So, you are having a very different experience than I am with ImageMagick for Mac OS X.
Greg

$ convert -version
Version: ImageMagick 6.2.6 03/26/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
$ ls -l 18stj985155.tif
-rwxrwxrwx 1 gregcoat gregcoat 75040539 Jun 20 2003 18stj985155.tif
$ /usr/bin/time convert 18stj985155.tif -resize 190x253 18stj985155_190x353.jpg
11.78 real 7.61 user 1.15 sys
Post Reply