///
export as namespace exifr;
interface Tags {
[name: string]: string | number | number[] | Uint8Array
}
type Input = ArrayBuffer | SharedArrayBuffer | Buffer | Uint8Array | DataView | string | Blob | File | HTMLImageElement
type Filter = (string | number)[];
interface GpsOutput {
latitude: number,
longitude: number,
}
interface FormatOptions {
skip?: Filter,
pick?: Filter,
translateKeys?: boolean,
translateValues?: boolean,
reviveValues?: boolean,
parse?: boolean, // XMP only
multiSegment?: boolean, // XMP and icc only
}
interface Options extends FormatOptions {
// TIFF segment IFD blocks
tiff?: FormatOptions | boolean,
ifd0?: FormatOptions, // cannot be disabled.
ifd1?: FormatOptions | boolean,
exif?: FormatOptions | boolean,
gps?: FormatOptions | boolean,
interop?: FormatOptions | boolean,
// notable properties in TIFF
makerNote?: boolean,
userComment?: boolean,
// Other segments
xmp?: FormatOptions | boolean,
icc?: FormatOptions | boolean,
iptc?: FormatOptions | boolean,
// JPEG only segment
jfif?: FormatOptions | boolean,
// PNG only only segment
ihdr?: FormatOptions | boolean,
// other options
sanitize?: boolean,
mergeOutput?: boolean,
firstChunkSize?: number,
chunkSize?: number,
chunkLimit?: number,
}
interface IRotation {
deg: number;
rad: number;
scaleX: number;
scaleY: number;
dimensionSwapped: boolean;
css: boolean;
canvas: boolean;
}
export function parse(data: Input, options?: Options | Filter | boolean): Promise;
export function gps(data: Input): Promise;
export function orientation(data: Input): Promise;
export function rotation(data: Input): Promise;
export function thumbnail(data: Input): Promise;
export function thumbnailUrl(data: Input): Promise;
export function sidecar(data: Input, options?: Options, type?: string): Promise