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
Constructor | Description |
---|---|
IcoImage(int width, int height, IcoOptions options) | Initializes a new instance of the IcoImage class. |
IcoImage(Image image, IcoOptions icoOptions) | Initializes a new instance of the IcoImage class. |
Methods
Method | Description |
---|---|
getFileFormat() | Gets file format. |
getPageCount() | Gets the page count. |
getPages() | Gets the pages. |
hasAlpha() | Gets a value indicating whether this instance has alpha. |
addPage(RasterImage page) | Adds an image entry to the ICO image according to default IcoOptions as 32-bit PNG. |
addPage(Image page) | Adds an image entry to the ICO image according to default IcoOptions as 32-bit PNG. |
addPage(Image page, IcoOptions icoOptions) | Adds an image entry to the ICO image according to specified IcoOptions. |
removePage(int index) | Removes an image entry at specified `` from the ICO image. |
IcoImage(int width, int height, IcoOptions options)
public IcoImage(int width, int height, IcoOptions options)
Initializes a new instance of the IcoImage class.
Parameters:
Parameter | Type | Description |
---|---|---|
width | int | The width. |
height | int | The height. |
options | IcoOptions | The ICO creation options. |
IcoImage(Image image, IcoOptions icoOptions)
public IcoImage(Image image, IcoOptions icoOptions)
Initializes a new instance of the IcoImage class.
Parameters:
Parameter | Type | Description |
---|---|---|
image | Image | The image. |
icoOptions | IcoOptions | The ICO options. |
getFileFormat()
public long getFileFormat()
Gets file format.
Returns: long - file format.
getPageCount()
public int getPageCount()
Gets the page count.
Value: The page count.
Returns: int - the page count.
getPages()
public Image[] getPages()
Gets the pages.
Value: The pages.
Returns: com.aspose.imaging.Image[] - the pages.
hasAlpha()
public boolean hasAlpha()
Gets a value indicating whether this instance has alpha.
Value: true
if this instance has alpha; otherwise, false
.
Returns: boolean - a value indicating whether this instance has alpha.
addPage(RasterImage page)
public final void addPage(RasterImage page)
Adds an image entry to the ICO image according to default IcoOptions as 32-bit PNG.
Parameters:
Parameter | Type | Description |
---|---|---|
page | RasterImage | The image. |
addPage(Image page)
public final void addPage(Image page)
Adds an image entry to the ICO image according to default IcoOptions as 32-bit PNG.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Image | The image. |
addPage(Image page, IcoOptions icoOptions)
public final void addPage(Image page, IcoOptions icoOptions)
Adds an image entry to the ICO image according to specified IcoOptions.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Image | The image. |
icoOptions | IcoOptions | The ICO options. |
removePage(int index)
public final void removePage(int index)
Removes an image entry at specified `` from the ICO image.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | The index. |