Type Default Value Read Only Static Description
XColor null No No The GIF transparent color.

The GIF file format allows one color to be treated as transparent. You can either specify a point using TransparentPoint or a color using this property. Because the export process may re-map the colors on your canvas you should not specify a transparent color directly. Instead you should specify a point that will be transparent and the export process will infer the color after any color mapping has been done. The default is for no transparent colors, which is what happens when both properties are null. If both properties are not null, TransparentColor takes precedence.

See Also



Here we save a transparent gif using RGB color 0xAABB33 as the transparent color.


Canvas canvas = new Canvas(Server.MapPath("rez/boat.gif"));
canvas.Export.TransparentColor = new XColor(0xAA, 0xBB, 0x33);

[Visual Basic]

Dim canvas As New Canvas(Server.MapPath("rez/boat.gif"))
canvas.Export.TransparentColor = New XColor(&HAA, &HBB, &H33)