On Fri, 16 Sep 2016 17:48:33 +0200 (CEST) Michael Van Canneyt <mich...@freepascal.org> wrote:
> On Fri, 16 Sep 2016, Reimar Grabowski wrote: > > > Hi, > > > > I want to put watermarks on images in a command line application. > > This doesn't do the trick: > > > > ScaledImage:=TFPCompactImgRGBA8Bit.Create(Width, Height); > > Canvas:=TFPImageCanvas.Create(ScaledImage); // TFPImageCanvas > > Canvas.StretchDraw(0,0,Width,Height,Image); // Image is TFPCompactImgRGB8Bit > > Canvas.Draw(0,0,Watermark); // Watermark is an TFPCompactImgRGBA8Bit > > > > Watermark is a transparent PNG loaded from disk but the transparency is not > > respected when drawing it onto ScaledImage. > > > > Can FCL Image do this and if not what are my alternatives? > > It should be able to do this, yes. TFPCustomCanvas.Draw does not handle Alpha by merging. It simply copies the pixel. Is this a bug or by design? Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal