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)
75 lines (74 loc) • 2.57 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 long value in an IFD (Image File Directory).
*/
export declare class IfdLongValue extends IfdValue {
/**
* The underlying value stored as a Uint32Array.
*/
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 value.
* @returns {number} The length of the value.
*/
get length(): number;
/**
* Constructs an IfdLongValue instance.
* @param {Uint32Array | number} value - The value to be stored.
*/
constructor(value: Uint32Array | number);
/**
* Creates an IfdLongValue 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 {IfdLongValue} The created IfdLongValue instance.
*/
static data(data: InputBuffer<Uint8Array>, length: number): IfdLongValue;
/**
* 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 value to a Uint8Array.
* @returns {Uint8Array} The converted value.
*/
toData(): Uint8Array;
/**
* Writes the value to the output buffer.
* @param {OutputBuffer} out - The output buffer to write to.
*/
write(out: OutputBuffer): void;
/**
* Sets the integer value at the specified index.
* @param {number} v - The integer value to set.
* @param {number} [index=0] - The index at which to set the value.
*/
setInt(v: number, index?: number): void;
/**
* Checks if this value is equal to another IfdValue.
* @param {IfdValue} other - The other IfdValue to compare with.
* @returns {boolean} True if the values are equal, otherwise false.
*/
equals(other: IfdValue): boolean;
/**
* Creates a clone of this IfdLongValue.
* @returns {IfdValue} The cloned IfdLongValue.
*/
clone(): IfdValue;
/**
* Converts the value to a string representation.
* @returns {string} The string representation of the value.
*/
toString(): string;
}