Compositing transparent png over image using Magick++ GraphicsMagick API

Dragan Jotanovic <[email protected]> Tue, 28 Jan 2014 17:32:49 +0000
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <CAJSsW4pbKy7CTVynFa_v-+ROYx_=s6LgfXEWunV3Kiq+YW+67A@mail.gmail.com>
Hello,

I am trying to compose png watermark with transparency using Magick++ API,
but after saving, image the transparency is lost.

The code I use is:

Image source("source.jpg");Image watermark("watermark.png");
source.composite(watermark, 0, 0, DissolveCompositeOp);
source.write("destination.jpg");

I tried explicitly setting image type (of both source and watermark) to
TrueColorMatteType, but no change, transparent color is still black instead
of transparent.

Does anyone know what else needs to be done in order to preserve
transparency after composition?


Dragan

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk

_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis