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)
111 lines (110 loc) • 2.93 kB
TypeScript
/** @format */
import { JpegComponent } from './jpeg-component.js';
/**
* Represents a JPEG frame.
*/
export declare class JpegFrame {
/**
* Map of JPEG components.
*/
private readonly _components;
/**
* Gets the components of the JPEG frame.
*/
get components(): Map<number, JpegComponent>;
/**
* Order of the components.
*/
private readonly _componentsOrder;
/**
* Gets the order of the components.
*/
get componentsOrder(): Array<number>;
/**
* Indicates if the frame is extended.
*/
private _extended;
/**
* Gets whether the frame is extended.
*/
get extended(): boolean;
/**
* Indicates if the frame is progressive.
*/
private _progressive;
/**
* Gets whether the frame is progressive.
*/
get progressive(): boolean;
/**
* Precision of the frame.
*/
private _precision;
/**
* Gets the precision of the frame.
*/
get precision(): number;
/**
* Number of scan lines in the frame.
*/
private _scanLines;
/**
* Gets the number of scan lines in the frame.
*/
get scanLines(): number;
/**
* Number of samples per line in the frame.
*/
private _samplesPerLine;
/**
* Gets the number of samples per line in the frame.
*/
get samplesPerLine(): number;
/**
* Maximum horizontal samples.
*/
private _maxHSamples;
/**
* Gets the maximum horizontal samples.
*/
get maxHSamples(): number;
/**
* Maximum vertical samples.
*/
private _maxVSamples;
/**
* Gets the maximum vertical samples.
*/
get maxVSamples(): number;
/**
* Number of MCUs per line.
*/
private _mcusPerLine;
/**
* Gets the number of MCUs per line.
*/
get mcusPerLine(): number;
/**
* Number of MCUs per column.
*/
private _mcusPerColumn;
/**
* Gets the number of MCUs per column.
*/
get mcusPerColumn(): number;
/**
* Constructs a new JpegFrame.
* @param {Map<number, JpegComponent>} components - Map of JPEG components.
* @param {Array<number>} componentsOrder - Order of the components.
* @param {boolean} extended - Indicates if the frame is extended.
* @param {boolean} progressive - Indicates if the frame is progressive.
* @param {number} precision - Precision of the frame.
* @param {number} scanLines - Number of scan lines in the frame.
* @param {number} samplesPerLine - Number of samples per line in the frame.
*/
constructor(components: Map<number, JpegComponent>, componentsOrder: Array<number>, extended: boolean, progressive: boolean, precision: number, scanLines: number, samplesPerLine: number);
/**
* Prepares the JPEG frame by calculating maximum samples and MCUs.
*/
prepare(): void;
}