Page 1 of 1

how to free RAM after AcquireImagePixels

Posted: 2008-02-18T17:56:09-07:00
by nicolas1
Is it possible to free memory which was allocated after "AcquireImagePixels" call? .If image was decoded into file and large amount of data where pushed into RAM after "AcquireImagePixels", this data is not freed.

Re: how to free RAM after AcquireImagePixels

Posted: 2008-02-18T19:24:01-07:00
by magick
To relinquish memory consumed by AcquireImagePixels() you need to call DestroyImage(). To reduce the memory footprint of AcquireImagePixels(), only acquire a few pixels or a few scanlines at a time. To reduce the overall memory footprint of ImageMagick set the memory and map resource limits to a small value (e.g. 16/32mb).