Class IcoImage
- Namespace
- Aspose.Imaging.FileFormats.Ico
- Assembly
- Aspose.Imaging.dll
Effortlessly manipulate ICO image files with our API, supporting various file formats and frame types including PNG and BMP. Customize bits per pixel settings and update image dimensions seamlessly, ensuring optimal representation and compatibility for your icons across different platforms.
public class IcoImage : RasterCachedMultipageImage, IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IHasXmpData, IHasMetadata, IMultipageImageExt, IMultipageImage
- Inheritance
-
IcoImage
- Implements
- Inherited Members
Constructors
IcoImage(Image, IcoOptions)
Crafted for simplicity and efficiency, the IcoImage class empowers you to create ICO images with ease. This constructor initializes a new instance of the class, providing a solid foundation for your image manipulation needs. Whether you're developing applications or enhancing user interfaces, the IcoImage class simplifies ICO image management, allowing you to focus on delivering exceptional experiences.
public IcoImage(Image image, IcoOptions icoOptions)
Parameters
image
ImageThe image.
icoOptions
IcoOptionsThe ICO options.
IcoImage(int, int, IcoOptions)
Start ICO image creation effortlessly using the IcoImage class. This constructor allows you to initialize new instances of ICO images by specifying the width, height, and creation options parameters. With this straightforward constructor, you can tailor ICO images to your exact specifications, ensuring seamless compatibility and visual appeal across different platforms and devices.
public IcoImage(int width, int height, IcoOptions options)
Parameters
width
intThe width.
height
intThe height.
options
IcoOptionsThe ICO creation options.
Properties
FileFormat
Retrieve the file format effortlessly with this property, enabling seamless integration into your workflow. By using this property, you gain access to critical information about the format of your file, ensuring compatibility and efficient processing.
public override FileFormat FileFormat { get; }
Property Value
HasAlpha
Determine whether alpha channel is present in this instance with this property. It offers a quick way to check if the image or document contains an alpha channel, which is crucial for various image processing and rendering tasks. Ideal for ensuring compatibility and handling transparency effects in images or documents.
public override bool HasAlpha { get; }
Property Value
- bool
true
if this instance has alpha; otherwise,false
.
PageCount
Gain immediate insight into the document structure with this straightforward property. By invoking this property, you effortlessly retrieve the total number of pages contained within the file.
public override int PageCount { get; }
Property Value
- int
The page count.
Pages
Retrieve comprehensive information about the document's pages effortlessly through this property. By accessing this property, you gain access to a collection or array containing all the pages present within the document.
public override Image[] Pages { get; }
Property Value
- Image[]
The pages.
Methods
AddPage(Image)
Enrich your ICO image effortlessly by inserting an image page entry using the default settings from IcoOptions. This method conveniently converts the inserted image to a 32-bit PNG format, ensuring compatibility and high-quality rendering within the ICO image. Perfect for seamlessly integrating PNG images into your ICO files with ease and efficiency.
public void AddPage(Image page)
Parameters
page
ImageThe image.
AddPage(Image, IcoOptions)
Diversify your ICO image effortlessly by integrating an image entry tailored to your needs with the specified IcoOptions. This method seamlessly incorporates the image according to your customized options, ensuring flexibility and precision in your ICO file.
public void AddPage(Image page, IcoOptions icoOptions)
Parameters
page
ImageThe image.
icoOptions
IcoOptionsThe ICO options.
AddPage(RasterImage)
Expand your ICO image by adding an image page entry, leveraging the IcoOptions. This method seamlessly incorporates raster images into your ICO file, converting them to a high-quality 32-bit PNG format. Perfect for enhancing your ICO files with raster images while ensuring optimal compatibility and rendering quality.
public void AddPage(RasterImage page)
Parameters
page
RasterImageThe image.
RemovePage(int)
Fine-tune your ICO image by removing a specific image entry located at the designated index within the file. This method provides precise control over your image composition, allowing you to refine your ICO file with ease.
public void RemovePage(int index)
Parameters
index
intThe index.
SaveData(Stream)
Saves the data.
protected override void SaveData(Stream stream)
Parameters
stream
StreamThe stream to save data to.
UpdateDimensions(int, int)
Updates the image dimensions.
protected override void UpdateDimensions(int newWidth, int newHeight)