Page 1 of 1

image colormap not updated after composite

Posted: 2007-07-11T15:28:45-07:00
by xinito
Dear all,

I used

img1.composite(img2, 0, 0, Magick::DifferenceCompositeOp);

After that, I query img1.colorMapSize() and img1.colorMap(i), where i=1 to colorMapSize. It turned out that they are still of the img1 before composite operation.

Is there a way to get img1's colorMap information updated after composition?

Thank you.

nito

Re: image colormap not updated after composite

Posted: 2007-07-11T15:48:23-07:00
by magick
A truecolor image can still have a colormap even though its not used. Add image.Quantize() to create a new colormap.