[prev in list] [next in list] [prev in thread] [next in thread] 

List:       imagemagick
Subject:    Memory usage
From:       Cristy <christy () sympatico ! org>
Date:       1997-09-30 14:35:40
[Download RAW message or body]

> It seems that it attempts to hold each individual image in memory

True.  ImageMagick was never tuned for memory usage primarily because I
assumed future computers (I wrote ImageMagick over 5 years ago) would have
cheap memory and disk.  Which in fact is true.  All you need to do is
expand your virtual memory.  My computer has 1GB of virtual memory so I
never run into an out-of-memory condition.  ImageMagick does use
runlength-encoding.  However, this is only useful for images with large
areas of like colors.  I have loaded a 2300x5000 postscript image in
about 1/2mb of memory.

You could extract one or more frames at a time, operate on them and
then restore them back to an mpeg image.  For example

  convert -interlace partition 'image.mpg[1-25]' image%02d

This creates image01.Y, image01.U, image01.Y, etc.  Now do the same for the
rest of the frames.  Or alternatively:

  convert 'image.mpg[1-25]' image%02.png

Once you have the individual frames you can operate on them directly.
Finally, use mpeg_encode directly to reassemble the MPEG file.  mpeg_encode
does not store all the frames in memory.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic