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)
73 lines (72 loc) • 2.56 kB
TypeScript
/** @format */
import { InputBuffer } from '../../common/input-buffer.js';
import { OutputBuffer } from '../../common/output-buffer.js';
import { IfdValue } from './ifd-value.js';
import { IfdValueType } from '../ifd-value-type.js';
/**
* Represents a short value in an IFD (Image File Directory).
*/
export declare class IfdShortValue extends IfdValue {
/**
* The underlying Uint16Array value.
*/
private _value;
/**
* Gets the type of the IFD value.
*/
get type(): IfdValueType;
/**
* Gets the length of the IFD value.
*/
get length(): number;
/**
* Constructs an IfdShortValue instance.
* @param {Uint16Array | number} value - The initial value, either a Uint16Array or a number.
*/
constructor(value: Uint16Array | number);
/**
* Creates an IfdShortValue from input buffer data.
* @param {InputBuffer<Uint8Array>} data - The input buffer containing the data.
* @param {number} length - The length of the data to read.
* @returns {IfdShortValue} A new IfdShortValue instance.
*/
static data(data: InputBuffer<Uint8Array>, length: number): IfdShortValue;
/**
* Converts the value at the specified index to an integer.
* @param {number} [index=0] - The index of the value to convert.
* @returns {number} The integer value.
*/
toInt(index?: number): number;
/**
* Converts the IFD value to a Uint8Array.
* @returns {Uint8Array} The Uint8Array representation of the IFD value.
*/
toData(): Uint8Array;
/**
* Writes the IFD value to the output buffer.
* @param {OutputBuffer} out - The output buffer to write to.
*/
write(out: OutputBuffer): void;
/**
* Sets the value at the specified index.
* @param {number} v - The value to set.
* @param {number} [index=0] - The index at which to set the value.
*/
setInt(v: number, index?: number): void;
/**
* Checks if this IFD value is equal to another IFD value.
* @param {IfdValue} other - The other IFD value to compare with.
* @returns {boolean} True if the values are equal, otherwise false.
*/
equals(other: IfdValue): boolean;
/**
* Creates a clone of this IFD value.
* @returns {IfdValue} A new IfdShortValue instance that is a clone of this instance.
*/
clone(): IfdValue;
/**
* Converts the IFD value to a string representation.
* @returns {string} The string representation of the IFD value.
*/
toString(): string;
}