Dear Imagemagick representative,
I have many game sprites rendered with backgrounds that need to be cut off. Therefore, I use Image::Trim() to get rid of transparent backgrounds. I need to record how many colums were removed for future computations. However, I see that Image::Trim() does not updates xOff and yOff values:
Version used: ImageMagick-6.5.4-Q8
Image my_image;
Geometry my_Geometry;
my_image.read(strFullFilePathAnsi);
my_image.trim();
my_Geometry = my_image.size();
vFolderTree[nPos].nTrimmedRctXOffset = my_Geometry.xOff(); // value is always 0 althought it is wrong
vFolderTree[nPos].nTrimmedRctYOffset = my_Geometry.yOff(); // value is always 0 althought it is wrong
Is there any other method to know how many colums and rows were trimmed?
With regards...
Image::Trim() not updating Image().Size().xOff() and yOff()
Re: Image::Trim() not updating Image().Size().xOff() and yOff()
Use page() rather than size().
Re: Image::Trim() not updating Image().Size().xOff() and yOff()
page() worked. Thank you