VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Codecs.ImageFiles.Ico Namespace / IconPageCollection Class / Add Methods / Add(VintasoftImage,VintasoftImage,IconCompression) Method
Syntax Exceptions Remarks Requirements SeeAlso
In This Topic
Add(VintasoftImage,VintasoftImage,IconCompression) Method (IconPageCollection)
In This Topic
Adds image as new Icon page to the page collection, using specified transparency mask and compression.
Syntax

Parameters

image
The image to add to the collection.
transparencyMask
Transparency mask for image.
compression
An IconCompression of new Icon page.
Exceptions
ExceptionDescription
Thrown if image is null.
Thrown if maskImage is not 1 bpp -or- width or height of image is greater than 256 -or- image and maskImage has different size.
Remarks

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.

Requirements

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

See Also