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)

57 lines (56 loc) 1.86 kB
/** @format */ import { MemoryImage } from '../image/image.js'; import { Encoder, EncoderEncodeOptions } from './encoder.js'; /** * Abstract class representing a Windows Encoder. */ export declare abstract class WinEncoder implements Encoder { /** * Type of the encoder. * @protected */ protected _type: number; /** * Gets the type of the encoder. * @returns {number} The type of the encoder. */ get type(): number; /** * Indicates whether the encoder supports animation. * @private */ private _supportsAnimation; /** * Gets whether the encoder supports animation. * @returns {boolean} True if the encoder supports animation, otherwise false. */ get supportsAnimation(): boolean; /** * Gets the color planes or X hot spot. * @param {number} _index - The index. * @returns {number} The color planes or X hot spot. * @protected */ protected colorPlanesOrXHotSpot(_index: number): number; /** * Gets the bits per pixel or Y hot spot. * @param {number} _index - The index. * @returns {number} The bits per pixel or Y hot spot. * @protected */ protected bitsPerPixelOrYHotSpot(_index: number): number; /** * Encodes the given image into a Uint8Array. * @param {EncoderEncodeOptions} opt - The encoding options. * @param {MemoryImage} opt.image - The image to encode. * @param {boolean} [opt.singleFrame] - Optional flag to encode a single frame. * @returns {Uint8Array} The encoded data. */ encode(opt: EncoderEncodeOptions): Uint8Array; /** * Encodes the given images into a Uint8Array. * @param {MemoryImage[]} images - The images to encode. * @returns {Uint8Array} The encoded data. */ encodeImages(images: MemoryImage[]): Uint8Array; }