Version

Image Constructor(Image,Color)

Initializes a new instance of the Image class.
Syntax
'Declaration
 
Public Function New( _
   ByVal image As Image, _
   ByVal transparentMapColor As Color _
)
public Image( 
   Image image,
   Color transparentMapColor
)

Parameters

image
A System.Drawing.Image used to initialize the instance.
transparentMapColor
The Color used to replace any pixels in the image whose alpha level is 0.
Remarks

Since PDF documents do not support per-pixel transparency, all pixels have the alpha channel stripped. In the case of a pixels whose value is System.Drawing.Color.Transparent, stripping the alpha bit will result in black being used instead, which can be unsesireable in many cases. Specifying this a map color allows a choice in which color will be used with an alpha level of 0.

Using the transparent map color is useful when dealing with a Infragistics.Documents.Reports.Report.IImage in that calling Infragistics.Documents.Reports.Report.IImage.SetTransparentColor with the string representation of the map color will allow those pixels to be transparent within the document.

Note: If there are areas where the transparent color is not applied, generally close to an area where there are several other colors, it may be because the ImageCompressor used does not correctly maintain all of the pixels, due to compression, so what was once the transparent color to use could be altered by a couple bits. This can happen with ImageCompressors.JPEG, for example. If this is the case, try using ImageCompressors.Flate

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also