how to free RAM after AcquireImagePixels

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
nicolas1

how to free RAM after AcquireImagePixels

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: how to free RAM after AcquireImagePixels

Post 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).
Post Reply