Hello.. I'm quite new to your library, using just the free version for now,
to see if it fits my needs..
I'm using the GFL SDK (not AX).
How can one merge two images, where one is completely opaque (background), and the other is a PNG with alpha channel, where the
degree of transparency varies (pixel transparency)?
I tried using gflBitBltEx, but that one was rather strange.. Where the
alpha of the upper image dictates transparency, it would completely
erase the image below, replacing it with transparent background.
Somewhat strange because the documentation states the function does alpha blending?
And gflMerge isn't quite there either, since both need to be 100% opaque
where the pixels doesn't say otherwise..
Do you, or anyone else have a good example for displaying a image on screen, which does complete alpha blending with whatever background it is on, or similar?
The standard example doesn't show how to manage something like
this, and doesn't support alpha at all.. (something I'm quite new at I might
add)..
How to merge two images, keeping alpha channels+++
Moderators: XnTriq, helmut, xnview
A little note..
I tested the GFLAx, and that one has the function DrawImage, which
does exactly what I want to accomplish.. I.e when drawing one .png (semitransparent/with transparent sections) image on top of another, the lower are visible where the alphatransparency dictates so..
But I use C++ and Delphi, and want to use the gflBitBltEx to do the same.. And that one doesn't..
Instead it copies one image over the other (including alphachannel), but doesn't do any blending, just overwrites..
Is this a bug, or intentionally?
does exactly what I want to accomplish.. I.e when drawing one .png (semitransparent/with transparent sections) image on top of another, the lower are visible where the alphatransparency dictates so..
But I use C++ and Delphi, and want to use the gflBitBltEx to do the same.. And that one doesn't..
Instead it copies one image over the other (including alphachannel), but doesn't do any blending, just overwrites..
Is this a bug, or intentionally?
-
- Author of XnView
- Posts: 44920
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: A little note..
Strange because DrawImage from GFLAx use gflBitBltEx...haerdalis wrote:I tested the GFLAx, and that one has the function DrawImage, which
does exactly what I want to accomplish.. I.e when drawing one .png (semitransparent/with transparent sections) image on top of another, the lower are visible where the alphatransparency dictates so..
But I use C++ and Delphi, and want to use the gflBitBltEx to do the same.. And that one doesn't..
Instead it copies one image over the other (including alphachannel), but doesn't do any blending, just overwrites..
Is this a bug, or intentionally?
Pierre.
-
- Posts: 6
- Joined: Tue Nov 15, 2005 5:08 am
Re: A little note..
I agree.. I've tested it some more, and it seems it copies the area specifiedxnview wrote:Strange because DrawImage from GFLAx use gflBitBltEx...haerdalis wrote:I tested the GFLAx, and that one has the function DrawImage, which
does exactly what I want to accomplish.. I.e when drawing one .png (semitransparent/with transparent sections) image on top of another, the lower are visible where the alphatransparency dictates so..
But I use C++ and Delphi, and want to use the gflBitBltEx to do the same.. And that one doesn't..
Instead it copies one image over the other (including alphachannel), but doesn't do any blending, just overwrites..
Is this a bug, or intentionally?
to the destination, replacing the destination area with the new imagepart including its transparency, but ignoring what's below (ie no blend)..
I was rather lucky however, as I had some useful functions for operating directly on RGBA data, and blend that way.. Not the best solution however,
since it expects the data in a certain way, and can't operate on those
other mappings..
-
- Author of XnView
- Posts: 44920
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: A little note..
Could you send me the pictures used?haerdalis wrote:I agree.. I've tested it some more, and it seems it copies the area specifiedxnview wrote:Strange because DrawImage from GFLAx use gflBitBltEx...haerdalis wrote:I tested the GFLAx, and that one has the function DrawImage, which
does exactly what I want to accomplish.. I.e when drawing one .png (semitransparent/with transparent sections) image on top of another, the lower are visible where the alphatransparency dictates so..
But I use C++ and Delphi, and want to use the gflBitBltEx to do the same.. And that one doesn't..
Instead it copies one image over the other (including alphachannel), but doesn't do any blending, just overwrites..
Is this a bug, or intentionally?
to the destination, replacing the destination area with the new imagepart including its transparency, but ignoring what's below (ie no blend)..
I was rather lucky however, as I had some useful functions for operating directly on RGBA data, and blend that way.. Not the best solution however,
since it expects the data in a certain way, and can't operate on those
other mappings..
Pierre.