- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm trying to optimize some graphics processing for GUI and found that things like copying images and alphablending are very fast. However what I need is alpha composition of 2 images, where the target's alpha is not important (that I think is possible), source's alpha is used, AND also a global alpha is used to multiply the source's alpha. So:
DST = DST * (1 - SRCA * GLOBALALPHA) + SRC * (SRCA * GLOBALALPHA)
I think it is pretty basic. The source image has its own alpha (like imagine a button with round borders), but I may want the button to be not completely opaque. Is there a way to do that?
There is AlphaComp, which uses image's alpha. And there is AlphaCompC which uses predefined alpha, but I need both at once.
Cheers!
DST = DST * (1 - SRCA * GLOBALALPHA) + SRC * (SRCA * GLOBALALPHA)
I think it is pretty basic. The source image has its own alpha (like imagine a button with round borders), but I may want the button to be not completely opaque. Is there a way to do that?
There is AlphaComp, which uses image's alpha. And there is AlphaCompC which uses predefined alpha, but I need both at once.
Cheers!
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This reminds me - would it be possible to implement something like AlphaBlend in Windows API? I mean, IPP's implementation of simple alphablend is faster, but it would need the global alpha and possibility to resize the output, linear interpolation is just fine. I think this would be very handy for many people and save A LOT of CPU time...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for let us know. I will escalte the request to our product definition database and get back to you if there are any updates.
Thanks
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Ying!
Cheers!
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been trying to get this to work for an hour, trying to find where my mistake was.. I didn't know it was simply not possible (while indeed pretty basic)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gol,
Could you please attach your code so we may see if there is some problem?
Best Regards,
Ying
Could you please attach your code so we may see if there is some problem?
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
well there's no code, since as I read it's not supposed to be featured.
Like the OP I needed alphablending of a premultiplied source onto a target, in which both the source's own alpha channel & a global alpha are used. This is normally the most basic use for alphablending, when you wanna draw a masked image onto another.
Weirdly everything I find on the net uses the source's alpha channel, or a global alpha, but rarely both (like the GDI's AlphaBlend does).
IPP allows doing it in 2 passes, though.
well there's no code, since as I read it's not supposed to be featured.
Like the OP I needed alphablending of a premultiplied source onto a target, in which both the source's own alpha channel & a global alpha are used. This is normally the most basic use for alphablending, when you wanna draw a masked image onto another.
Weirdly everything I find on the net uses the source's alpha channel, or a global alpha, but rarely both (like the GDI's AlphaBlend does).
IPP allows doing it in 2 passes, though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
Just check if the feature is still interesting? As if it is very rare used, then we may not implement it.
Thanks
Ying
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page