Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exif extraction fails for jpg files with Exif version 2.2 (specially for ExifImage.TAGS.exif[37500]]) #88

Open
Theflyyy opened this issue Jun 20, 2023 · 0 comments

Comments

@Theflyyy
Copy link

When attempting to extract EXIF data from a jpg file using exifImage.js, I receive a TypeError when dealing with Exif version 2.2. The error suggests that the 'getString' function doesn't exist.

Here is the error stack trace for reference:

ERROR {
error: TypeError: exifData.exif[ExifImage.TAGS.exif[37500]].getString is not a function
at ExifImage.extractExifData (/var/task/node_modules/exif/lib/exif/ExifImage.js:435:52)
at ExifImage.processImage (/var/task/node_modules/exif/lib/exif/ExifImage.js:189:14)
at ExifImage.loadImage (/var/task/node_modules/exif/lib/exif/ExifImage.js:146:10)
at /var/task/src/s3/sharps_handlers.js:1:94922
at new Promise ()
at t.SharpController.exifReader (/var/task/src/s3/sharps_handlers.js:1:94884)
at generateSmallPhotoTrigger (/var/task/src/s3/sharps_handlers.js:1:93660)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Runtime.handler (/var/task/node_modules/@sentry/serverless/dist/awslambda.js:203:18) {
code: 'PARSING_ERROR',
source: 'Buffer'
}
}

Steps to Reproduce

  1. Load a jpg file with Exif version 2.2
  2. Attempt to extract EXIF data with exifImage.js

Expected behavior

The library should be able to handle jpg files with Exif version 2.2 without throwing an error.

Actual behavior

An error is thrown when attempting to extract EXIF data from jpg files with Exif version 2.2.

Debug Information

  • Library Version: 0.6.0

Here, the image causing the issue

If you have suggestions on how to fix this issue or why this issue is happening, please write them here.
20230618-195227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant