Class IcoImage

Class IcoImage

Namespace: Aspose.Imaging.FileFormats.Ico
Assembly: Aspose.Imaging.dll (25.2.0)

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

objectDisposableObjectDataStreamSupporterImageRasterImageRasterCachedImageRasterCachedMultipageImageIcoImage

Implements

IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IHasXmpData, IHasMetadata, IMultipageImageExt, IMultipageImage

Inherited Members

RasterCachedMultipageImage.AdjustBrightness(int), RasterCachedMultipageImage.AdjustContrast(float), RasterCachedMultipageImage.AdjustGamma(float, float, float), RasterCachedMultipageImage.AdjustGamma(float), RasterCachedMultipageImage.Blend(Point, RasterImage, Rectangle, byte), RasterCachedMultipageImage.BinarizeFixed(byte), RasterCachedMultipageImage.BinarizeBradley(double, int), RasterCachedMultipageImage.BinarizeBradley(double), RasterCachedMultipageImage.BinarizeOtsu(), RasterCachedMultipageImage.Crop(Rectangle), RasterCachedMultipageImage.Crop(int, int, int, int), RasterCachedMultipageImage.Dither(DitheringMethod, int, IColorPalette), RasterCachedMultipageImage.Grayscale(), RasterCachedMultipageImage.Rotate(float, bool, Color), RasterCachedMultipageImage.RotateFlip(RotateFlipType), RasterCachedMultipageImage.RotateFlipAll(RotateFlipType), RasterCachedMultipageImage.Resize(int, int, ResizeType), RasterCachedMultipageImage.Resize(int, int, ImageResizeSettings), RasterCachedMultipageImage.ResizeWidthProportionally(int, ResizeType), RasterCachedMultipageImage.ResizeHeightProportionally(int, ResizeType), RasterCachedMultipageImage.ReplaceColor(int, byte, int), RasterCachedMultipageImage.ReplaceNonTransparentColors(int), RasterCachedMultipageImage.Filter(Rectangle, FilterOptionsBase), RasterCachedMultipageImage.NormalizeAngle(bool, Color), RasterCachedMultipageImage.CacheData(), RasterCachedMultipageImage.ReleaseManagedResources(), RasterCachedMultipageImage.ResizeMain(int, int, ResizeType), RasterCachedMultipageImage.RotateFlipMain(RotateFlipType), RasterCachedMultipageImage.CropMain(int, int, int, int), RasterCachedMultipageImage.SavePixelsInternalMain(Rectangle, int[]), RasterCachedMultipageImage.CanDoAdjustments(), RasterCachedMultipageImage.GetPagesAsEnumerable(), RasterCachedMultipageImage.GetSerializedStream(ImageOptionsBase, Rectangle, out int), RasterCachedMultipageImage.Height, RasterCachedMultipageImage.Width, RasterCachedMultipageImage.BitsPerPixel, RasterCachedMultipageImage.IsCached, RasterCachedMultipageImage.PageCount, RasterCachedMultipageImage.Pages, RasterCachedMultipageImage.HasAlpha, RasterCachedMultipageImage.HasTransparentColor, RasterCachedMultipageImage.ImageOpacity, RasterCachedMultipageImage.BackgroundColor, RasterCachedMultipageImage.XmpData, RasterCachedMultipageImage.PageExportingAction, RasterCachedImage.CacheData(), RasterCachedImage.Blend(Point, RasterImage, Rectangle, byte), RasterCachedImage.Resize(int, int, ResizeType), RasterCachedImage.Resize(int, int, ImageResizeSettings), RasterCachedImage.RotateFlip(RotateFlipType), RasterCachedImage.Rotate(float, bool, Color), RasterCachedImage.Crop(Rectangle), RasterCachedImage.Dither(DitheringMethod, int, IColorPalette), RasterCachedImage.Grayscale(), RasterCachedImage.BinarizeFixed(byte), RasterCachedImage.BinarizeOtsu(), RasterCachedImage.BinarizeBradley(double, int), RasterCachedImage.BinarizeBradley(double), RasterCachedImage.AdjustBrightness(int), RasterCachedImage.AdjustContrast(float), RasterCachedImage.AdjustGamma(float, float, float), RasterCachedImage.AdjustGamma(float), RasterCachedImage.OnCached(), RasterCachedImage.OnPaletteChanged(IColorPalette, IColorPalette), RasterCachedImage.IsCached, RasterImage.xmpData, RasterImage.RemoveMetadata(), RasterImage.Save(Stream, ImageOptionsBase, Rectangle), RasterImage.GetModifyDate(bool), RasterImage.Dither(DitheringMethod, int), RasterImage.Dither(DitheringMethod, int, IColorPalette), RasterImage.GetDefaultPixels(Rectangle, IPartialArgb32PixelLoader), RasterImage.GetDefaultRawData(Rectangle, IPartialRawDataLoader, RawDataSettings), RasterImage.GetDefaultArgb32Pixels(Rectangle), RasterImage.GetDefaultRawData(Rectangle, RawDataSettings), RasterImage.GetArgb32Pixel(int, int), RasterImage.GetPixel(int, int), RasterImage.SetArgb32Pixel(int, int, int), RasterImage.SetPixel(int, int, Color), RasterImage.ReadScanLine(int), RasterImage.ReadArgb32ScanLine(int), RasterImage.WriteScanLine(int, Color[]), RasterImage.WriteArgb32ScanLine(int, int[]), RasterImage.LoadPartialArgb32Pixels(Rectangle, IPartialArgb32PixelLoader), RasterImage.LoadPartialPixels(Rectangle, IPartialPixelLoader), RasterImage.LoadArgb32Pixels(Rectangle), RasterImage.LoadArgb64Pixels(Rectangle), RasterImage.LoadPartialArgb64Pixels(Rectangle, IPartialArgb64PixelLoader), RasterImage.LoadPixels(Rectangle), RasterImage.LoadCmykPixels(Rectangle), RasterImage.LoadCmyk32Pixels(Rectangle), RasterImage.LoadRawData(Rectangle, RawDataSettings, IPartialRawDataLoader), RasterImage.LoadRawData(Rectangle, Rectangle, RawDataSettings, IPartialRawDataLoader), RasterImage.SaveRawData(byte[], int, Rectangle, RawDataSettings), RasterImage.SaveArgb32Pixels(Rectangle, int[]), RasterImage.SavePixels(Rectangle, Color[]), RasterImage.SaveCmykPixels(Rectangle, CmykColor[]), RasterImage.SaveCmyk32Pixels(Rectangle, int[]), RasterImage.SetResolution(double, double), RasterImage.SetPalette(IColorPalette, bool), RasterImage.Resize(int, int, ImageResizeSettings), RasterImage.Rotate(float, bool, Color), RasterImage.Rotate(float), RasterImage.BinarizeFixed(byte), RasterImage.BinarizeOtsu(), RasterImage.BinarizeBradley(double), RasterImage.BinarizeBradley(double, int), RasterImage.Blend(Point, RasterImage, Rectangle, byte), RasterImage.Blend(Point, RasterImage, byte), RasterImage.Grayscale(), RasterImage.AdjustBrightness(int), RasterImage.AdjustContrast(float), RasterImage.AdjustGamma(float, float, float), RasterImage.AdjustGamma(float), RasterImage.GetSkewAngle(), RasterImage.NormalizeAngle(), RasterImage.NormalizeAngle(bool, Color), RasterImage.Filter(Rectangle, FilterOptionsBase), RasterImage.ReplaceColor(Color, byte, Color), RasterImage.ReplaceColor(int, byte, int), RasterImage.ReplaceNonTransparentColors(Color), RasterImage.ReplaceNonTransparentColors(int), RasterImage.ToBitmap(), RasterImage.ReleaseManagedResources(), RasterImage.UpdateMetadata(), RasterImage.UpdateDimensions(int, int), RasterImage.PremultiplyComponents, RasterImage.UseRawData, RasterImage.UpdateXmpData, RasterImage.XmpData, RasterImage.RawIndexedColorConverter, RasterImage.RawCustomColorConverter, RasterImage.RawFallbackIndex, RasterImage.RawDataSettings, RasterImage.UsePalette, RasterImage.RawDataFormat, RasterImage.RawLineSize, RasterImage.IsRawDataAvailable, RasterImage.HorizontalResolution, RasterImage.VerticalResolution, RasterImage.HasTransparentColor, RasterImage.HasAlpha, RasterImage.TransparentColor, RasterImage.ImageOpacity, RasterImage.DataLoader, Image.CanLoad(string), Image.CanLoad(string, LoadOptions), Image.CanLoad(Stream), Image.CanLoad(Stream, LoadOptions), Image.Create(ImageOptionsBase, int, int), Image.Create(Image[]), Image.Create(MultipageCreateOptions), Image.Create(string[], bool), Image.Create(string[]), Image.Create(Image[], bool), Image.GetFileFormat(string), Image.GetFileFormat(Stream), Image.GetFittingRectangle(Rectangle, int, int), Image.GetFittingRectangle(Rectangle, int[], int, int), Image.Load(string, LoadOptions), Image.Load(string), Image.Load(Stream, LoadOptions), Image.Load(Stream), Image.GetProportionalWidth(int, int, int), Image.GetProportionalHeight(int, int, int), Image.RemoveMetadata(), Image.CanSave(ImageOptionsBase), Image.Resize(int, int), Image.Resize(int, int, ResizeType), Image.Resize(int, int, ImageResizeSettings), Image.GetDefaultOptions(object[]), Image.GetOriginalOptions(), Image.ResizeWidthProportionally(int), Image.ResizeHeightProportionally(int), Image.ResizeWidthProportionally(int, ResizeType), Image.ResizeHeightProportionally(int, ResizeType), Image.ResizeWidthProportionally(int, ImageResizeSettings), Image.ResizeHeightProportionally(int, ImageResizeSettings), Image.RotateFlip(RotateFlipType), Image.Rotate(float), Image.Crop(Rectangle), Image.Crop(int, int, int, int), Image.Save(), Image.Save(string), Image.Save(string, ImageOptionsBase), Image.Save(string, ImageOptionsBase, Rectangle), Image.Save(Stream, ImageOptionsBase), Image.Save(Stream, ImageOptionsBase, Rectangle), Image.GetSerializedStream(ImageOptionsBase, Rectangle, out int), Image.SetPalette(IColorPalette, bool), Image.UpdateContainer(Image), Image.GetCanNotSaveMessage(ImageOptionsBase), Image.GetFitRectangle(Rectangle), Image.GetImage2Export(ImageOptionsBase, Rectangle, IImageExporter), Image.GetFitRectangle(Rectangle, int[]), Image.OnPaletteChanged(IColorPalette, IColorPalette), Image.OnPaletteChanging(IColorPalette, IColorPalette), Image.ReleaseManagedResources(), Image.BitsPerPixel, Image.Bounds, Image.Container, Image.Height, Image.Palette, Image.UsePalette, Image.Size, Image.Width, Image.InterruptMonitor, Image.BufferSizeHint, Image.AutoAdjustPalette, Image.HasBackgroundColor, Image.FileFormat, Image.BackgroundColor, DataStreamSupporter.timeout, DataStreamSupporter.CacheData(), DataStreamSupporter.Save(), DataStreamSupporter.Save(Stream), DataStreamSupporter.Save(string), DataStreamSupporter.Save(string, bool), DataStreamSupporter.SaveData(Stream), DataStreamSupporter.ReleaseManagedResources(), DataStreamSupporter.OnDataStreamContainerChanging(StreamContainer), DataStreamSupporter.DataStreamContainer, DataStreamSupporter.IsCached, DisposableObject.Dispose(), DisposableObject.ReleaseManagedResources(), DisposableObject.ReleaseUnmanagedResources(), DisposableObject.VerifyNotDisposed(), DisposableObject.Disposed, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

IcoImage(int, int, IcoOptions)

Start ICO image creation effortlessly using the Aspose.Imaging.FileFormats.Ico.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 int

The width.

height int

The height.

options IcoOptions

The ICO creation options.

IcoImage(Image, IcoOptions)

Crafted for simplicity and efficiency, the Aspose.Imaging.FileFormats.Ico.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 Aspose.Imaging.FileFormats.Ico.IcoImage class simplifies ICO image management, allowing you to focus on delivering exceptional experiences.

public IcoImage(Image image, IcoOptions icoOptions)

Parameters

image Image

The image.

icoOptions IcoOptions

The ICO 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

FileFormat

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

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

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[]

Methods

AddPage(RasterImage)

Expand your ICO image by adding an image page entry, leveraging the Aspose.Imaging.ImageOptions.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 RasterImage

The image.

AddPage(Image)

Enrich your ICO image effortlessly by inserting an image page entry using the default settings from Aspose.Imaging.ImageOptions.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 Image

The image.

AddPage(Image, IcoOptions)

Diversify your ICO image effortlessly by integrating an image entry tailored to your needs with the specified Aspose.Imaging.ImageOptions.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 Image

The image.

icoOptions IcoOptions

The ICO options.

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 int

The index.

SaveData(Stream)

Saves the data.

protected override void SaveData(Stream stream)

Parameters

stream Stream

The stream to save data to.

UpdateDimensions(int, int)

Updates the image dimensions.

protected override void UpdateDimensions(int newWidth, int newHeight)

Parameters

newWidth int

The new image width.

newHeight int

The new image height.