Try as I may, I can't get the composite function to work as it should and obey the alpha (opacity) information on the square image.
I've tried setting the matte and type properties on both image objects, but this didn't seem to help.
The resulting image always appears as a direct copy the red square, disregarding the alpha...
What am I missing?
Code: Select all
imageBlue.matte( true );
imageBlue.type( MagickCore::TrueColorMatteType );
imageBlue.compose( MagickCore::OverCompositeOp );
imageRed.matte( true );
imageRed.type( MagickCore::TrueColorMatteType );
imageRed.compose( MagickCore::OverCompositeOp );
imageBlue.composite( imageRed, image.geometry, MagickCore::OverCompositeOp );
Rich