.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: 11076
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-26T12:29:18-07:00

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: 11076
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-26T12:58:00-07:00

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
Contact:

Post by Greg Coats » 2006-04-30T21:22:33-07:00

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