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
fournij

Memory leak with Image::annotate in magick++

Post by fournij »

Hi

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

logoImg.read(m_sLogoPath);

//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.read(input);
   img.type(TrueColorMatteType);
   img.font("arial");
   img.fontPointsize(38);
   img.fillColor("white");
   img.boxColor("#00000072");
   img.annotate( "Shot #12345", "+310+50");
   img.composite( logoImg, "+215+120", BumpmapCompositeOp);
   img.write(output);
}


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 : http://redux.imagemagick.org/discussion ... &sk=t&sd=a


thanks again
User avatar
magick
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.
fournij

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

Post by fournij »

Thanks

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