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)

165 lines (164 loc) 4.38 kB
/** @format */ import { Color } from '../../color/color.js'; import { DecodeInfo } from '../decode-info.js'; import { WebPFormat } from './webp-format.js'; import { WebPFrame } from './webp-frame.js'; /** * Features gathered from the bitstream */ export declare class WebPInfo implements DecodeInfo { /** * Width of the WebP image */ private _width; /** * Gets the width of the WebP image * @returns {number} The width of the WebP image */ get width(): number; /** * Sets the width of the WebP image * @param {number} v - The width to set */ set width(v: number); /** * Height of the WebP image */ private _height; /** * Gets the height of the WebP image * @returns {number} The height of the WebP image */ get height(): number; /** * Sets the height of the WebP image * @param {number} v - The height to set */ set height(v: number); /** * Background color of the WebP image */ private _backgroundColor?; /** * Gets the background color of the WebP image * @returns {Color | undefined} The background color of the WebP image */ get backgroundColor(): Color | undefined; /** * Sets the background color of the WebP image * @param {Color | undefined} v - The background color to set */ set backgroundColor(v: Color | undefined); /** * Indicates if the bitstream contains an alpha channel */ private _hasAlpha; /** * Gets the alpha channel status * @returns {boolean} True if the bitstream contains an alpha channel */ get hasAlpha(): boolean; /** * Sets the alpha channel status * @param {boolean} v - The alpha channel status to set */ set hasAlpha(v: boolean); /** * Format of the WebP image */ private _format; /** * Gets the format of the WebP image * @returns {WebPFormat} The format of the WebP image */ get format(): WebPFormat; /** * Sets the format of the WebP image * @param {WebPFormat} v - The format to set */ set format(v: WebPFormat); /** * Indicates if the bitstream is an animation */ private _hasAnimation; /** * Gets the animation status * @returns {boolean} True if the bitstream is an animation */ get hasAnimation(): boolean; /** * Sets the animation status * @param {boolean} v - The animation status to set */ set hasAnimation(v: boolean); /** * ICCP data of the WebP image */ private _iccpData?; /** * Gets the ICCP data * @returns {Uint8Array | undefined} The ICCP data */ get iccpData(): Uint8Array | undefined; /** * Sets the ICCP data * @param {Uint8Array | undefined} v - The ICCP data to set */ set iccpData(v: Uint8Array | undefined); /** * EXIF data string of the WebP image */ private _exifData; /** * Gets the EXIF data string * @returns {string} The EXIF data string */ get exifData(): string; /** * Sets the EXIF data string * @param {string} v - The EXIF data string to set */ set exifData(v: string); /** * XMP data string of the WebP image */ private _xmpData; /** * Gets the XMP data string * @returns {string} The XMP data string */ get xmpData(): string; /** * Sets the XMP data string * @param {string} v - The XMP data string to set */ set xmpData(v: string); /** * Number of times the animation should loop */ private _animLoopCount; /** * Gets the animation loop count * @returns {number} The number of times the animation should loop */ get animLoopCount(): number; /** * Sets the animation loop count * @param {number} v - The animation loop count to set */ set animLoopCount(v: number); /** * Information about each animation frame */ private readonly _frames; /** * Gets the frames of the animation * @returns {WebPFrame[]} The frames of the animation */ get frames(): WebPFrame[]; /** * Gets the number of frames in the animation * @returns {number} The number of frames in the animation */ get numFrames(): number; }