Page 1 of 1
Resource limits only affect the pixel cache. Algorithms such as color reduction will consume as much memory it needs regardless of the resource limit settings. You can find details about the pixel cache here: http://www.imagemagick.org/script/architecture.php
You might have better luck with the latest version of ImageMagick, 6.2.7-2. JPEG does have one optimization if you wandt thumbnails. Say you want your final image to be 256x256. Add
- $im->Set( size => '256x256' );
just before your read. Only a megabyte or two of memory will be used regardless of the initial size of the JPEG image (this optimization only works with JPEG).