From ed345f837e00cf39429b16e3cf9a2fc0ae2c8e48 Mon Sep 17 00:00:00 2001 From: Moshe nehemiah Date: Tue, 13 Jul 2021 19:22:36 +0300 Subject: [PATCH] add piexif.d.ts typescript definition - will help a lot to TS Developers :) --- piexif.d.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 piexif.d.ts diff --git a/piexif.d.ts b/piexif.d.ts new file mode 100644 index 0000000..542a402 --- /dev/null +++ b/piexif.d.ts @@ -0,0 +1,30 @@ +export function load( dataURL: string ): any; +export function dump( exifObject: any ): string; +export function insert( exifData: string, jpegData: string ): string; +export function remove( jpegData: string ): string; + +export default _default = { + /** + * Get exif data as object. + * @param dataURL base64 Data Url or "\xff\xd8", or "Exif". + */ + load, + /** + * Get exif as string to insert into JPEG. + * @param exifObject exif object + */ + dump, + /** + * Insert exif into JPEG. + * @param exifData data to pass as a string, use `dump` to convert object to string. + * @param jpegData can be dataURL or binaryString. + * @returns same type as pass to `jpegData`, dataURL or binaryString. + */ + insert, + /** + * Remove exif from JPEG. + * @param jpegData can be dataURL or binaryString. + * @returns same type as pass to `jpegData`, dataURL or binaryString. + */ + remove +};