laugan
Member
|
Image layers
Hello!
I have two images (for example both with alpha channel) and i need to create one image from them. The problem is that i tried some functions as ColorMul() and ColorAdd() (i tried to merge images by pixels) but all these functions do not make the same effect as two layers in simple image editor (PS, gimp etc) and colors are VERY far from what i need.
Is there any way to merge two images with alpha?
|
|
06-04-2013 07:35 PM |
|
laugan
Member
|
RE: Image layers
okay i figured it out, just another function that's not included in EE
|
|
06-20-2013 08:24 AM |
|
Rubeus
Member
|
RE: Image layers
My guess would be that you multiply the colors by their alpha % then add them together. What was the solution you came up with?
|
|
06-20-2013 02:07 PM |
|
laugan
Member
|
RE: Image layers
(06-20-2013 02:07 PM)Rubeus Wrote: My guess would be that you multiply the colors by their alpha % then add them together. What was the solution you came up with?
Nope
From Wiki:
where
BackColor — initial pixel color,
ForeColor — color of pixel that we want to add,
Transparency — transparency of pixel that we want to add.
|
|
06-21-2013 05:55 AM |
|
Rubeus
Member
|
RE: Image layers
Actually, I was pretty darn close. Don't forget to clamp to 255, though, or you will get some very strange effects.
|
|
06-21-2013 01:22 PM |
|
Esenthel
Administrator
|
RE: Image layers
EE 'ColorLerp' function can be used for that.
|
|
06-23-2013 04:19 PM |
|