Memory leak with Image::annotate in magick++
Posted: 2007-08-23T11:52:03-07:00
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 :
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
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