Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How do I alpha blend the image?
How do I alpha blend the image? [message #46964] Sat, 01 October 2016 15:32 Go to next message
kurete is currently offline  kurete
Messages: 17
Registered: March 2016
Location: Japan
Promising Member

Hello.

How do I alpha blend the image?

For example, Additive blending and Multiplicative blending.

I think that rewrite source code of draw.

However, I can not know where to I be rewritten.

Re: How do I alpha blend the image? [message #46965 is a reply to message #46964] Mon, 03 October 2016 09:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kurete wrote on Sat, 01 October 2016 15:32
Hello.

How do I alpha blend the image?

For example, Additive blending and Multiplicative blending.

I think that rewrite source code of draw.

However, I can not know where to I be rewritten.



With what? In Paint?

Mirek
Re: How do I alpha blend the image? [message #46968 is a reply to message #46965] Tue, 04 October 2016 13:40 Go to previous messageGo to next message
kurete is currently offline  kurete
Messages: 17
Registered: March 2016
Location: Japan
Promising Member

I'm sorry for description is insufficient.

I want to alpha blend image in Paint in Ctrl.

For Example, I want to change DrawImage in Function that is alpha blend in under source code.

void ExmampleCtrl::Paint(Draw& w)
{
  w.DrawImage(0,0,Sample::Image() );→change alpha blend function 
};

Re: How do I alpha blend the image? [message #46969 is a reply to message #46968] Tue, 04 October 2016 19:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kurete wrote on Tue, 04 October 2016 13:40
I'm sorry for description is insufficient.

I want to alpha blend image in Paint in Ctrl.

For Example, I want to change DrawImage in Function that is alpha blend in under source code.

void ExmampleCtrl::Paint(Draw& w)
{
  w.DrawImage(0,0,Sample::Image() );→change alpha blend function 
};



Image already has alpha channel, so DrawImage will use standard alpha blending. More complex alpha bledning modes are not supported in Draw, because Draw is supposed to be lowest common denominator that allows HW acceleration on all targets.

If you need anything more fancy (like different blend function), you need to perform calculations in memory - which in fact is quite easy, as Image internals are easily accessible.
Re: How do I alpha blend the image? [message #46973 is a reply to message #46969] Fri, 07 October 2016 13:27 Go to previous messageGo to next message
kurete is currently offline  kurete
Messages: 17
Registered: March 2016
Location: Japan
Promising Member

I can alpha blend by using ImageBuffer.

Thank you.
Re: How do I alpha blend the image? [message #46974 is a reply to message #46973] Fri, 07 October 2016 13:35 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kurete wrote on Fri, 07 October 2016 13:27
I can alpha blend by using ImageBuffer.

Thank you.


Exactly!
Previous Topic: Image to an SQLite blob windows 10
Next Topic: Question.
Goto Forum:
  


Current Time: Fri Mar 29 15:33:13 CET 2024

Total time taken to generate the page: 0.02728 seconds