is this a memory problem? how does im work with this?

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
BabaG

is this a memory problem? how does im work with this?

Post by BabaG »

trying to batch a lot of large files - 2896x1944 jpg's. using this in a batch
script in wxp home:

mogrify -path o:\im-tests -crop 2240x1260+519+425 m:\imtest_out\*
mogrify -resize 1920x1080 o:\im-tests

the wxp cmd window opens and starts the batch fine. i see activity on
the various drive locations. after some time, however, the window
closes, never having reached the second line of the script. there seems
to be a period of inactivity before the window closes.

the process seems to work all right with a test of 300 files. i just tried
1600 files and the problem happens. i just tried 1000 files and the
problem also happens.

edit: tried 400 files and it works. tried 600 files and it doesn't work.

does im do all of this in memory or something? do i have to work in
groupings that do not exceed my system memory or a given portion
thereof? am i doing something else wrong?

thanks for any help,
BabaG
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Add
  • -limit memory 32 -limit map 64
to your command line to force the pixel cache to disk. This will reduce memory consumption and should permit your script to finish.
BabaG

Post by BabaG »

thanks very much magick. is there documentation you could point me to
regarding these numbers? my example uses jpg's but i will likely be using
much larger files at some point, once i get this all worked out. i'm
thinking targa or raw. i'm concerned that the far greater size of those
files might make it so that if i now am able to process 500 files at a time,
with raw i might only be able to do a fraction of this. would that mean i'd
need to adjust the numbers you give here? if so, some guidance on how to
evaluate differing imaging scenarios so as to be able to make useful
adjustments would be very helpful.

thanks again,
BabaG
Post Reply