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

Can read img tag ? #167

Closed
hasban12138 opened this issue Nov 18, 2021 · 10 comments
Closed

Can read img tag ? #167

hasban12138 opened this issue Nov 18, 2021 · 10 comments

Comments

@hasban12138
Copy link

const img = document.createElement('img')
img.src = src
ExifReader.load(img)

It support?

@mattiasw
Copy link
Owner

Yes: https://github.com/mattiasw/ExifReader#let-exifreader-load-the-file-asynchronous-api

Like this:

ExifReader.load(img.src);

But the remote server has to set CORS headers that allow for remote loading of the file. Unless the file is on the same server as the web page.

@hasban12138
Copy link
Author

Thanks!
But I use like this:

ExifReader.load(img.src).then((res)=>{
    console.log(res)
})

In browser I get this
image
It doesn‘t have exif
I use a worry way?

@mattiasw
Copy link
Owner

Can you share the file? I need it to be able to debug.

@hasban12138
Copy link
Author

https://github.com/hasban12138/img
this is my file

@mattiasw
Copy link
Owner

I will have a look after work tonight.

@hasban12138
Copy link
Author

Thanks!

@mattiasw
Copy link
Owner

When I try that image I can see the Exif info. Do you have the image on a web server somewhere that I can try to use directly? In case there is an error in the server setup.

@hasban12138
Copy link
Author

During this time ,I try to find it too ,and I find this image has Exif but if I put it in Excel , it from Exif change to JFIF . That's why we can't find Exif
Thanks!
And by the way . Dose JFIF have Orientation too ?

@mattiasw
Copy link
Owner

JFIF does not have orientation: https://exiftool.org/TagNames/JFIF.html
It may not help you but I'm working on better JFIF support. I hope to have it released within a week.

@hasban12138
Copy link
Author

Thanks! My problem may not in Exif . Thank you very much ! : )

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