Magick: memory allocation failed `imagePath' @ error/bmp.c/ReadBMPImage/941
Posted: 2018-01-10T18:54:49-07:00
I am writing a c++ code and trying to crop an image. However, it fails at the initialisation after a few iterations.
The function is being called in a library inside a loop and it works fine a few times (twice).
Is there any way of deallocating the memory after operations have been performed on an image ?
My code is below:
is theer anything like image.dealloc or something which frees up the memory every time it has been used ?
The function is being called in a library inside a loop and it works fine a few times (twice).
Is there any way of deallocating the memory after operations have been performed on an image ?
My code is below:
Code: Select all
Image imageMagic(imagePath);
imageMagic.crop(Geometry(699, 150, 198, 625));
imageMagic.write(labelName);