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 info not recognized in HEIC image #35

Closed
mshgh opened this issue Sep 6, 2020 · 6 comments
Closed

EXIF info not recognized in HEIC image #35

mshgh opened this issue Sep 6, 2020 · 6 comments

Comments

@mshgh
Copy link

mshgh commented Sep 6, 2020

In this photo Sample.heic, taken by Samsung Galaxy A40, there was not found any EXIF info using this library.
I know there is EXIF info in it as Windows 10 and imagemagick can see it.

MikeKovarik added a commit that referenced this issue Sep 6, 2020
MikeKovarik added a commit that referenced this issue Sep 6, 2020
@MikeKovarik
Copy link
Owner

Hi, so it should be fixed right now. I just released 5.0.4!

@mshgh
Copy link
Author

mshgh commented Sep 6, 2020

Thank you for the quick response. Unfortunately upgrade to the new version didn't help for me. I have prepared simple test app and it doesn't work either. Here is my code. (node version v12.18.3) Any idea what I am doing wrong?

index.mjs

import {promises as fs} from 'fs'
import exifr from 'exifr'

async function main() {
  const file = await fs.readFile('/tmp/issue-exifr-35.heic')
  const output = await exifr.parse(file, true)
  console.log('exifr:', output)
}

package.json

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "exifr": "^5.0.4"
  }
}

To be sure I use the same file I re-downloaded the image

curl https://raw.githubusercontent.com/MikeKovarik/exifr/master/test/fixtures/issue-exifr-35.heic --output /tmp/issue-exifr-35.heic

@MikeKovarik
Copy link
Owner

Aaaah, you're not doing anything wrong. It's my bad. I accidentally released 5.0.4. with code from 5.0.3.

So i released 5.0.5. and tested it with your code and it works now.

@mshgh
Copy link
Author

mshgh commented Sep 6, 2020

Works fine for me now. Thanks!

@mshgh
Copy link
Author

mshgh commented Sep 6, 2020

Heads-up, I got exception when using

exifr.parse('/tmp/issue-exifr-35.heic', true).then(console.log).catch(console.log)

RangeError: Offset is outside the bounds of the DataView
    at DataView.getUint32 (<anonymous>)
    at Object.getUint32 (/root/test/node_modules/exifr/dist/full.umd.js:1:3533)
    at Oe.parseBoxHead (/root/test/node_modules/exifr/dist/full.umd.js:1:29964)
    at Oe.parse (/root/test/node_modules/exifr/dist/full.umd.js:1:30474)
    at q.parse (/root/test/node_modules/exifr/dist/full.umd.js:1:11345)
    at Object.Q [as parse] (/root/test/node_modules/exifr/dist/full.umd.js:1:12078)

Not sure if this is connected to the recent change, or not.

@MikeKovarik
Copy link
Owner

Hello @mshgh . I'm sorry, I didn't notice the last comment in closed issue. I just fixed that and released 5.0.6

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

2 participants