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.js doesn't read orientation tags properly #181

Open
jywarren opened this issue Jun 7, 2015 · 9 comments
Open

exif.js doesn't read orientation tags properly #181

jywarren opened this issue Jun 7, 2015 · 9 comments

Comments

@jywarren
Copy link
Member

jywarren commented Jun 7, 2015

http://mapknitter.org/maps/gps-test shows several which seem to be off by increments of 90 degrees;

See how this is done in the backend: https://github.com/publiclab/mapknitter/blob/master/app/models/warpable.rb#L231-L242

EXIF orientation values:

Value 0th Row 0th Column
1 top left side
2 top right side
3 bottom right side
4 bottom left side
5 left side top
6 right side top
7 right side bottom
8 left side bottom
@jywarren
Copy link
Member Author

jywarren commented Jun 7, 2015

Specifically RIM0342.JPG is wrong, and RIM0352.JPG is right, in the CUAS example.

@jywarren
Copy link
Member Author

jywarren commented Jun 7, 2015

So, this is now implemented (a67ff2a) but is not working properly. exif and exifprobe on Ubuntu correctly identifies the two images above as "3" and "8" -- but exif.js reads both as "1".

$:~/Desktop/gps$ exifprobe RIMG0352.JPG | grep Orientation
@0x000003a=58      :        <0x0112=  274> Orientation                 [3 =SHORT         1]  = 3 = '0,0 is bottom right'
$:~/Desktop/gps$ exifprobe RIMG0342.JPG | grep Orientation
@0x000003a=58      :        <0x0112=  274> Orientation                 [3 =SHORT         1]  = 8 = '0,0 is left bottom'

@jywarren jywarren changed the title read and use GPS orientation tags to supplement compass heading exif.js doesn't read orientation tags properly Jun 7, 2015
@jywarren
Copy link
Member Author

jywarren commented Jun 7, 2015

Filed an issue here: exif-js/exif-js#45

@grvsachdeva
Copy link
Member

@jywarren I noticed there was a update in issue exif-js/exif-js#45. Would you like to update here too? Thanks!

@jywarren
Copy link
Member Author

Hmm do you think it was fixed?

@grvsachdeva
Copy link
Member

No @jywarren, the issue is still open.

@jywarren jywarren added the bug label Mar 14, 2019
@jywarren
Copy link
Member Author

I think we'll have to try to help solve it upstream in exif.js. Thanks!

@sashadev-sky
Copy link
Member

@jywarren @gauravano I started working looking at the exif data today when looking at your modularization of exporter code PR. Will definitely look into this more.

Just wondering what API are we using exactly? There wasn't much documentation to guide me

@jywarren
Copy link
Member Author

We're probably going to start doing this in Leaflet.DistortableImage as part of @rexagod's new GPS placement API -- see publiclab/Leaflet.DistortableImage#169 -- although it's still in progress. But It basically uses the Exif.js library to dig GPS tags out of the images, and to auto-place them accordingly!

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

No branches or pull requests

3 participants