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.72 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';
/**
* Class representing a double value in an IFD (Image File Directory).
*/
export declare class IfdDoubleValue extends IfdValue {
/**
* The internal value stored as a Float64Array.
*/
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 internal Float64Array.
* @returns {number} The length of the internal Float64Array.
*/
get length(): number;
/**
* Creates an instance of IfdDoubleValue.
* @param {Float64Array | number} value - The initial value.
*/
constructor(value: Float64Array | number);
/**
* Creates an IfdDoubleValue 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 {IfdDoubleValue} The created IfdDoubleValue instance.
*/
static data(data: InputBuffer<Uint8Array>, length: number): IfdDoubleValue;
/**
* Converts the value at the specified index to a double.
* @param {number} [index=0] - The index of the value to convert.
* @returns {number} The double value.
*/
toDouble(index?: number): number;
/**
* Converts the internal value to a Uint8Array.
* @returns {Uint8Array} The Uint8Array representation of the internal value.
*/
toData(): Uint8Array;
/**
* Writes the internal 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 to the given double.
* @param {number} v - The double value to set.
* @param {number} [index=0] - The index at which to set the value.
*/
setDouble(v: number, index?: number): void;
/**
* Checks if this 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 IFD double value.
* @returns {IfdValue} The cloned IFD double value.
*/
clone(): IfdValue;
/**
* Converts the internal value to a string representation.
* @returns {string} The string representation of the internal value.
*/
toString(): string;
}