Memory leak with Image::annotate in magick++

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply

Memory leak with Image::annotate in magick++

Post by fournij »


I'm using ''ImageMagick-6.3.5-4-Q16-windows-dll.exe", magick++ with Microsoft Visual Studio 2005 and It's a MFC project.

This is a part of my code :

Code: Select all

string input, output, tc;
Image img, logoImg;

//For all the DPX files I have to convert
for(int j = 0; j <= inputFileList.GetUpperBound(); j++){

   input = inputFileList.GetAt(j);//DPX image - Source
   output = outputFileList.GetAt(j);//TGA image - Destination;
   img.annotate( "Shot #12345", "+310+50");
   img.composite( logoImg, "+215+120", BumpmapCompositeOp);

When I'm running it the memory usage is growing up very fast. For example, when I start the program the memory start around 15 000k and after 4000 files converted the memory is around 63 000k. If I let my software running for all the files I have to convert, the software crash.

So I tried to eliminate function calls and when I removed this call:
img.annotate( "Shot #12345", "+310+50");
The memory stay at the same level. I think it has memory leak with the annotate function.

Could you please check it ?

Refert to the post : ... &sk=t&sd=a

thanks again
User avatar
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Memory leak with Image::annotate in magick++

Post by magick »

We have a patch for the problem you report in ImageMagick 6.3.5-7 Beta available sometime tomorrow.

Re: Memory leak with Image::annotate in magick++

Post by fournij »


when are you planning to do a Windows Binary Release like ImageMagick-6.3.5-7-Q16-windows-dll.exe ?
Post Reply