Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bad photo orientation when file picked on mobile #207

Closed
s7anley opened this Issue · 9 comments

2 participants

@s7anley

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

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

Tried it?

@s7anley

Yes, still same result.

@RubaXa
Owner

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

Can you show an example on jsfiddle?

@s7anley

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.

@RubaXa
Owner

Update the code from the master and try again.

@s7anley

Thanks!

@s7anley s7anley closed this
@RubaXa
Owner

thx too.

@s7anley

What about support all orientation?

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

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 referenced this issue from a commit in s7anley/FileAPI
@s7anley s7anley + #207: support EXIF.Orientation == 7 & 4 79963f2
@s7anley s7anley referenced this issue from a commit in s7anley/FileAPI
@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
Something went wrong with that request. Please try again.