mpiontek$2007022
mpiontek

01/24/2007 :: 16:35

Registered

I'm using GdPicture in VB.NET 2005. Is it possible to overlay a gradient mask onto another image? So far I can only see where you can set a single color for transparency. Can I somehow use the full alpha channel of a png?
Loïc$2006306
Loïc

01/30/2007 :: 10:14

Registered

Hi,

To draw a gradiant mask you can do like this:

Call oGdPicture.DrawGradientLine(1, 1, oGdPicture.GetWidth, oGdPicture.GetHeight, oGdPicture.GetWidth, oGdPicture.ARGB(100, 255, 0, 0), oGdPicture.ARGB(100, 0, 255, 0))

Note: The ARGB() method is only available in the last GdPicture Pro 3.0 Beta edition: http://www.gdpicture.com/forum/forum.php?view=265

To use easily the full alpha channel I will add new methods in the next release:

GetARGBPixelArray()
and
SetARGBPixelArray()

&&

GetAlphaPixelArray()
and
SetAlphaPixelArray()

Best regards,

Loïc Carrère
back to forum