This document is archived and information here might be outdated.  Recommended version.


IImageDisplay2.TransparentColor Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > II > IImageDisplay2 Interface > IImageDisplay2.TransparentColor Property
ArcGIS Developer Help

IImageDisplay2.TransparentColor Property

Transparent color for image types that support transparent color.

[Visual Basic .NET]
Public Property TransparentColor As IColor
[C#]
public IColor TransparentColor {get; set;}
[C++]
HRESULT get_TransparentColor(
  IColor** ppTransparentColor
);
[C++]
HRESULT put_TransparentColor(
  IColor* ppTransparentColor
);
[C++]
Parameters
ppTransparentColor [out, retval]

ppTransparentColor is a parameter of type IColor** ppTransparentColor [in]
ppTransparentColor is a parameter of type IColor*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Use this property to make a specified color transparent. This is most commonly done to make the background transparent. This can done on any MapServer function that takes an ImageDisplay as a parameter.

Setting a transparent color is valid only for formats that support transparency. These include: png, png24 and gif.

When using ExportMapImage if different colors are set as transparent in the MapDescription (TransparentColor) and in the ImageDisplay, the color set in the ImageDisplay takes precedence over the one set in the MapDescription..

To make background of the image transparent set the ImageDisplay2 TransparentColor equal to the BackgroundColor specified in IMapServerInfo2 .

See Also

IImageDisplay2 Interface