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)

68 lines (67 loc) 2.37 kB
/** @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'; /** * Class representing an ASCII value in an IFD (Image File Directory). */ export declare class IfdAsciiValue extends IfdValue { /** * The ASCII value stored as a string. */ private _value; /** * Gets the type of the IFD value. * @returns {IfdValueType} The type of the IFD value. */ get type(): IfdValueType; /** * Gets the length of the ASCII value including the null terminator. * @returns {number} The length of the ASCII value. */ get length(): number; /** * Creates an instance of IfdAsciiValue. * @param {number[] | string} value - The ASCII value as an array of code points or a string. */ constructor(value: number[] | string); /** * Creates an IfdAsciiValue from input buffer data. * @param {InputBuffer<Uint8Array>} data - The input buffer containing the ASCII data. * @param {number} length - The length of the ASCII data. * @returns {IfdAsciiValue} The created IfdAsciiValue instance. */ static data(data: InputBuffer<Uint8Array>, length: number): IfdAsciiValue; /** * Converts the ASCII value to a Uint8Array. * @returns {Uint8Array} The ASCII value as a Uint8Array. */ toData(): Uint8Array; /** * Writes the ASCII value to an output buffer. * @param {OutputBuffer} out - The output buffer to write the ASCII value to. */ write(out: OutputBuffer): void; /** * Sets the ASCII value as a string. * @param {string} v - The new ASCII value. */ setString(v: string): void; /** * Checks if this ASCII 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, false otherwise. */ equals(other: IfdValue): boolean; /** * Creates a clone of this ASCII value. * @returns {IfdValue} The cloned IFD value. */ clone(): IfdValue; /** * Returns a string representation of the ASCII value. * @returns {string} The string representation of the ASCII value. */ toString(): string; }