Exception | Description |
---|---|
System.ArgumentOutOfRangeException | The assigned color value is not opaque (has an Alpha value of less than 255). |
To support per-pixel transparency provided by an image, use the UsePixelTransparencyForImages, instead.
By specifying an ImageTransparentMapColor, you can make the transparent parts of your image display transparently (instead of white). However, the color selected here will apply to all parts of the image. So, for example, if you choose Magenta, all parts of the image that are either transparent or magenta will display transparently in the resulting exported document. Therefore, it is advisable to choose an ImageTransparentMapColor that is not used in any of the images being exported.
Also note that if you are using a JPEG Compressor, the colors in the image may be changed by compression and transparency will not work properly. If you have transparency in you images, you sure make sure ImageCompressorType is set to Flate.
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