imagemagick command lines ignoring -limit?

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
icewoman
Posts: 2
Joined: 2011-02-26T16:49:25-07:00
Authentication code: 8675308

imagemagick command lines ignoring -limit?

Post by icewoman »

I ran into problems using convert on large jp2s a shared server. So, I tried to add limits to the command lines. But they seem to be being ignored -- when I run top, I'm seeing res memory take off (to over a gig), and my percentage of use goes up to 22% :(

The following was my first command line, so I ran it from the command line (as opposed to spawning it from my web program).

I tried these:
identify -limit memory 200MiB -limit map 200MiB <filename.jp2>
identify -limit area 10mb <filename.jp2>
identify -limit area 10 <filename.jp2>

I also tried adding the following to my bash_profile & sourced it:
MAGICK_MEMORY_LIMIT=10mb
MAGICK_MAP_LIMIT=10mb

None of these seemed to change the behavior at all.

I compiled ImageMagick myself (without root even!) and included the jasper libraries to support jp2s.
ImageMagick 6.6.3-10 2010-12-18

Help?

Many thanks,

icewoman
Last edited by icewoman on 2011-02-26T18:13:28-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: imagemagick command lines ignoring -limit?

Post by magick »

Limits only affect the ImageMagick pixel cache (see http://magick.imagemagick.org/script/ar ... .php#cache). Some delegate libraries (e.g. Jasper, JPEG, TIFF) have their own memory requirements and -limit has no affect on them.
icewoman
Posts: 2
Joined: 2011-02-26T16:49:25-07:00
Authentication code: 8675308

Re: imagemagick command lines ignoring -limit?

Post by icewoman »

Thanks! Darn that Jasper.
perlhead
Posts: 1
Joined: 2011-07-12T10:03:12-07:00
Authentication code: 8675308

Re: imagemagick command lines ignoring -limit?

Post by perlhead »

magick wrote:Some delegate libraries (e.g. Jasper, JPEG, TIFF) have their own memory requirements and -limit has no affect on them.
It seems like I'm being bitten by this same issue. Is there any way to alter the behavior of those libraries (in particular, the tiff library)?
Post Reply