-
Notifications
You must be signed in to change notification settings - Fork 4
EXIF Data Encoding And Decoding
Yegor Pelykh edited this page Feb 11, 2023
·
1 revision
These functions are a simplification of working with the EXIF data of JPG images, without separate encoding, decoding and changing the EXIF data of MemoryImage.
decodeJpgExif(opt: DecodeOptions): ExifData | undefinedDecode only the EXIF data from a JPEG file.
Parameters:
-
data: The contents of the JPEG file of type
TypedArray.
Returns the decoded ExifData or undefined if the data cannot be decoded.
injectJpgExif(opt: InjectJpgExifOptions): Uint8Array | undefinedInject ExifData into a JPEG file, replacing any existing EXIF data. The new JPEG file bytes will be returned, otherwise undefined if there was an issue.
Parameters:
-
data: The contents of the JPEG file of type
TypedArray. -
exifData: The EXIF data to inject of type
ExifData.
Returns the new JPEG file bytes, otherwise undefined if there was an issue.