IcoImage

Inheritance: java.lang.Object, com.aspose.imaging.DisposableObject, com.aspose.imaging.DataStreamSupporter, com.aspose.imaging.Image, com.aspose.imaging.RasterImage, com.aspose.imaging.RasterCachedImage, com.aspose.imaging.RasterCachedMultipageImage

All Implemented Interfaces: com.aspose.imaging.IMultipageImageExt

public class IcoImage extends RasterCachedMultipageImage implements IMultipageImageExt

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.

Constructors

ConstructorDescription
IcoImage(int width, int height, IcoOptions options)Start ICO image creation effortlessly using the IcoImage class.
IcoImage(Image image, IcoOptions icoOptions)Crafted for simplicity and efficiency, the IcoImage class empowers you to create ICO images with ease.

Methods

MethodDescription
getFileFormat()Retrieve the file format effortlessly with this property, enabling seamless integration into your workflow.
getPageCount()Gain immediate insight into the document structure with this straightforward property.
getPages()Retrieve comprehensive information about the document’s pages effortlessly through this property.
hasAlpha()Determine whether alpha channel is present in this instance with this property.
addPage(RasterImage page)Expand your ICO image by adding an image page entry, leveraging the IcoOptions.
addPage(Image page)Enrich your ICO image effortlessly by inserting an image page entry using the default settings from IcoOptions.
addPage(Image page, IcoOptions icoOptions)Diversify your ICO image effortlessly by integrating an image entry tailored to your needs with the specified IcoOptions.
removePage(int index)Fine-tune your ICO image by removing a specific image entry located at the designated `` within the file.

IcoImage(int width, int height, IcoOptions options)

public IcoImage(int width, int height, IcoOptions options)

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.

Parameters:

ParameterTypeDescription
widthintThe width.
heightintThe height.
optionsIcoOptionsThe ICO creation options.

IcoImage(Image image, IcoOptions icoOptions)

public IcoImage(Image image, IcoOptions 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.

Parameters:

ParameterTypeDescription
imageImageThe image.
icoOptionsIcoOptionsThe ICO options.

getFileFormat()

public long getFileFormat()

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.

Returns: long

getPageCount()

public int getPageCount()

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.

Returns: int - the page count.

getPages()

public Image[] getPages()

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.

Returns: com.aspose.imaging.Image[] - the pages.

hasAlpha()

public boolean 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.

Returns: boolean - a value indicating whether this instance has alpha.

addPage(RasterImage page)

public final void addPage(RasterImage page)

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.

Parameters:

ParameterTypeDescription
pageRasterImageThe image.

addPage(Image page)

public final void addPage(Image page)

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.

Parameters:

ParameterTypeDescription
pageImageThe image.

addPage(Image page, IcoOptions icoOptions)

public final void addPage(Image page, IcoOptions 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.

Parameters:

ParameterTypeDescription
pageImageThe image.
icoOptionsIcoOptionsThe ICO options.

removePage(int index)

public final void removePage(int index)

Fine-tune your ICO image by removing a specific image entry located at the designated `` within the file. This method provides precise control over your image composition, allowing you to refine your ICO file with ease.

Parameters:

ParameterTypeDescription
indexintThe index.