Is there an easy way to reset all attributes on an Image object to their original (blank) state ?
A common problem that I experience in my application is that the behavior of some method is affected by some image attribute that was set by a previous operation.
For example we might draw some text. So we set image->fillColor() and image->fontPointsize() and then call with image-> annotate() with our text. However if some previous operation on the image might have set a fontWeight or boxColorImage, then these are also applied to our text which we did not intend.
So I guess what we need to get predictable behavior is to reset the attributes before staring our new operation?
Or perhaps I am doing this wrong and there is a way to specify which attributes a method should use?
Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
1 post • Page 1 of 1