I'm using IM 6.9.2-6 on Linux for convertion images to png format.
I've got a problem with very specific type of image - multisize ICO (for example livejournal.com/favicon.ico)
The convertion works fine on them but it seems like there is a memory leak. I prepared very simple code which illustrates this case:
Code: Select all
int main(int, const char *argv[]) {
ifstream fin(argv[1], ios::binary);
ostringstream ostrm;
ostrm << fin.rdbuf();
string from(ostrm.str());
while (true) {
_ImageInfo* imageInfoPtr(CloneImageInfo(0));
strcpy(imageInfoPtr->magick, "ICO");
ExceptionInfo* _exception = AcquireExceptionInfo();
_Image *imagePtr = BlobToImage(imageInfoPtr, from.c_str(), from.length(), _exception);
DestroyImage(imagePtr);
DestroyImageInfo(imageInfoPtr);
DestroyExceptionInfo(_exception);
}