Bad photo orientation when file picked on mobile #207

Closed
s7anley opened this Issue Feb 24, 2014 · 9 comments

Comments

Projects
None yet
2 participants
Contributor

s7anley commented Feb 24, 2014

Hi,

when photo is picked on mobile (tried on iPhone and some HTC) preview has bad orientation. I tried include pluginFileAPI.exif.js, but result is the same. We don't use FileAPI to upload, so I cannot say if this is issue also after upload.
From quick look I don't see any options which enable transformation of photo by EXIF. I miss something or is this a known bug?

Thanks

Contributor

RubaXa commented Feb 24, 2014

FileAPI.Image(file).rotate('auto').get(function (err, img){
     // some code
});

Tried it?

Contributor

s7anley commented Feb 24, 2014

Yes, still same result.

Contributor

RubaXa commented Feb 24, 2014

Checked demo, auto orientation by EXIF works.
http://mailru.github.io/FileAPI/examples/demo.html

Can you show an example on jsfiddle?

Contributor

s7anley commented Feb 24, 2014

I tried demo and also userpic examples without success. For example this image is badly detected also from PC https://f.cloud.github.com/assets/640131/2244664/d577fe54-9d41-11e3-99ab-0496d739fd96.jpg. Any photo from mobile phone have bad orientation.

Contributor

RubaXa commented Feb 24, 2014

Update the code from the master and try again.

Contributor

s7anley commented Feb 24, 2014

Thanks!

s7anley closed this Feb 24, 2014

Contributor

RubaXa commented Feb 24, 2014

thx too.

Contributor

s7anley commented Feb 25, 2014

What about support all orientation?

exifOrientation = {
      8:    270
    , 3:    180
    , 6:    90
    , 7:    270
    , 4:    180
    , 5:    90
}
Contributor

s7anley commented Feb 25, 2014

Is there possible to support proper orientation? I mean photos with orientation 2, 5, 4 and 7, because they are "mirrored". Images for testing https://www.dropbox.com/sh/9tr7hj8kzdw7swh/rDVG6sf3zS.

@s7anley s7anley added a commit to s7anley/FileAPI that referenced this issue Mar 4, 2014

@s7anley s7anley + #207: support EXIF.Orientation == 7 & 4 79963f2

@s7anley s7anley added a commit to s7anley/FileAPI that referenced this issue Mar 4, 2014

@s7anley s7anley + #207: support EXIF.Orientation == 7 & 4 4f7eed3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment