exifreader
Advanced tools
Comparing version 4.11.1 to 4.12.0
@@ -94,33 +94,23 @@ /// <reference types="node" /> | ||
interface NumberTag { | ||
type TypedTag<V> = { | ||
id: number, | ||
description: string, | ||
value: number | ||
value: V | ||
} | ||
interface RationalTag { | ||
id: number, | ||
description: string, | ||
value: [number, number] | ||
} | ||
type RationalTag = TypedTag<[number, number]> | ||
interface NumberArrayTag { | ||
id: number, | ||
description: string, | ||
value: Array<number> | ||
} | ||
type NumberTag = TypedTag<number>; | ||
type NumberArrayTag = TypedTag<number[]> | ||
type StringArrayTag = TypedTag<string[]> | ||
interface ValueTag { | ||
description: string, | ||
value: String | ||
value: string | ||
} | ||
interface StringArrayTag { | ||
id: number, | ||
description: string, | ||
value: Array<string> | ||
} | ||
interface XmpTag { | ||
value: string | Array<XmpTag> | XmpTags, | ||
value: string | XmpTag[] | XmpTags, | ||
attributes: { | ||
@@ -163,4 +153,4 @@ [name: string]: string | ||
png?: PngTags, | ||
exif?: Tags, | ||
iptc?: Tags, | ||
exif?: ExifTags, | ||
iptc?: ExifTags, | ||
xmp?: { _raw: string } & XmpTags, | ||
@@ -180,3 +170,3 @@ icc?: IccTags, | ||
ImageFlags: { | ||
value: Array<number>, | ||
value: number[], | ||
description: string | ||
@@ -212,11 +202,11 @@ }, | ||
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer): Tags & XmpTags & IccTags; | ||
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer): Tags; | ||
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded: true, includeUnknown?: boolean, length?: number}): ExpandedTags; | ||
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded?: false, includeUnknown?: boolean, length?: number}): Tags & XmpTags & IccTags; | ||
export function load(data: string | File): Promise<Tags & XmpTags & IccTags>; | ||
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded?: false, includeUnknown?: boolean, length?: number}): Tags; | ||
export function load(data: string | File): Promise<Tags>; | ||
export function load(data: string | File, options: {expanded: true, includeUnknown?: boolean, length?: number}): Promise<ExpandedTags>; | ||
export function load(data: string | File, options: {expanded?: false, includeUnknown?: boolean, length?: number}): Promise<Tags & XmpTags & IccTags>; | ||
export function loadView(data: DataView): Tags & XmpTags & IccTags; | ||
export function load(data: string | File, options: {expanded?: false, includeUnknown?: boolean, length?: number}): Promise<Tags>; | ||
export function loadView(data: DataView): Tags; | ||
export function loadView(data: DataView, options: {expanded: true, includeUnknown?: boolean}): ExpandedTags; | ||
export function loadView(data: DataView, options: {expanded?: false, includeUnknown?: boolean}): Tags & XmpTags & IccTags; | ||
export function loadView(data: DataView, options: {expanded?: false, includeUnknown?: boolean}): Tags; | ||
@@ -227,3 +217,3 @@ export namespace errors { | ||
interface Tags { | ||
interface ExifTags { | ||
// Interoperability tags | ||
@@ -378,3 +368,3 @@ 'InteroperabilityIndex'?: StringArrayTag, | ||
'TotalFrames'?: NumberTag, | ||
'Images'?: Array<MPFImageTags>, | ||
'Images'?: MPFImageTags[], | ||
@@ -471,1 +461,8 @@ // IPTC tags | ||
} | ||
export type Tags = XmpTags & IccTags & PngTags & { | ||
'Thumbnail'?: ThumbnailTags; | ||
'Images'?: MPFImageTags[], | ||
} & { | ||
[K in keyof ExifTags]: ExifTags[K] | XmpTag; | ||
} |
{ | ||
"name": "exifreader", | ||
"version": "4.11.1", | ||
"version": "4.12.0", | ||
"description": "Library that parses Exif metadata in images.", | ||
@@ -5,0 +5,0 @@ "author": "Mattias Wallander <mattias@wallander.eu>", |
577613
5918