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

Public Overloads Sub Insert( _
ByVal index
The zero-based index at which page should be inserted.
As System.Int32, _
ByVal image
Image to insert into the page collection.
As Vintasoft.Imaging.VintasoftImage, _
ByVal transparencyMask
Transparency mask for image.
As Vintasoft.Imaging.VintasoftImage, _
ByVal compression
An IconCompression of new Icon page.
As IconCompression _
)

Parameters

index
The zero-based index at which page should be inserted.
image
Image to insert into the page collection.
transparencyMask
Transparency mask for image.
compression
An IconCompression of new Icon page.
Exceptions
ExceptionDescription
Thrown if index is less than 0 or greater than Count.
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