Parameters
- image
- The image to add to the collection.
- transparencyMask
- Transparency mask for image.
- compression
- An IconCompression of new Icon page.
| Exception | Description |
|---|---|
| System.ArgumentNullException | Thrown if image is null. |
| System.ArgumentException | Thrown if maskImage is not 1 bpp -or- width or height of image is greater than 256 -or- image and maskImage has different size. |
Source image is image.
Transparency mask (transparencyMask) defines transparency of image and stored as 1-bpp image. Transparency mask must be set to null, in this case transparency mask contains 0.
Result image is source image combined with transparency mask.
Size of source image and transparency mask must be the same.
Pixel of result image is transparent if corresponding pixel in transparency mask is set to 1.
Pixel of result image is not changed if corresponding pixel in transparency mask is set to 0.
Data are stored as source image and transparency mask if BMP compression is used.
Data are stored as result image if PNG compression is used.
Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5