Neodynamic ImageDraw for ASP.NET
MakeTransparent
Represented by Neodynamic.WebControls.ImageDraw.MakeTransparent class.

This action makes color transparent for an Element. This action is typically used to convert a given color pixel to transparent. The conversion process takes a solid color -with a specified alpha channel value if any- and then converts all pixel matches on the Element to transparent. MakeTransparent can take the color of the upper top left pixel as the one to be transparent when the action is applied on the Element as well.
MakeTransparent action also supports color tolerance for transparency. Color Tolerance represents the tonal range of colors that will be converted to transparent taking the specified color as starting point. For example, if you ColorTolerance property is set to 0 (zero), then only adjacent pixels of exactly the same tone as the specified color will be converted to transparent; otherwise, a wider range of tones will be converted.
Note
MakeTransparent action works on Index Transparency only. In other words, a pixel becomes totally transparent when it matches a given value which is specified through the properties of Neodynamic.WebControls.ImageDraw.MakeTransparent class. The problem with Index transparency is that pixels do not have an in-between opacity value; they are either solid or transparent and thus, images with feathered edges or other effects might look not so good after all.

In the following example there are two ImageElement objects on the Canvas and a MakeTransparent action is applied on the last ImageElement using the upper top left pixel as the one to be transparent.


ImageElement before the action is applied.

ImageElement with Filmstrip action applied on it. Vertical orientation.
Travelocity and the Stars Design are trademarks of Travelocity.com LP.


Syntax sample