UNPKG

image-in-browser

Version:

Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)

55 lines (54 loc) 1.73 kB
/** @format */ import { Color } from '../../color/color.js'; import { InputBuffer } from '../../common/input-buffer.js'; import { DecodeInfo } from '../decode-info.js'; import { IcoInfoImage } from './ico-info-image.js'; import { IcoType } from './ico-type.js'; /** * Represents information about an ICO file. */ export declare class IcoInfo implements DecodeInfo { /** * The width of the ICO image. */ private _width; get width(): number; /** * The height of the ICO image. */ private _height; get height(): number; /** * The type of the ICO image. */ private readonly _type; get type(): IcoType; /** * The number of frames in the ICO image. */ private readonly _numFrames; get numFrames(): number; /** * The background color of the ICO image. */ private _backgroundColor; get backgroundColor(): Color | undefined; /** * The images contained in the ICO file. */ private readonly _images; get images(): IcoInfoImage[]; /** * Constructs an instance of IcoInfo. * @param {number} type - The type of the ICO image. * @param {number} numFrames - The number of frames in the ICO image. * @param {IcoInfoImage[]} images - The images contained in the ICO file. */ constructor(type: number, numFrames: number, images: IcoInfoImage[]); /** * Reads an ICO file from the input buffer. * @param {InputBuffer<Uint8Array>} input - The input buffer containing the ICO file data. * @returns {IcoInfo | undefined} An instance of IcoInfo if the file is valid, otherwise undefined. */ static read(input: InputBuffer<Uint8Array>): IcoInfo | undefined; }