Code Monkey home page Code Monkey logo

Comments (14)

viskin avatar viskin commented on August 22, 2024 1

Ok, I see it. Let me see what can be done...

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

Checking this...

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

I saw 226026d in your PR #12.
You added orientation value to library item.
I wonder how orientation value can be used in JavaScript? I'd prefer that photos just appear in correct orientation as I ask for them, and if it will work, is there any value in orientation field for the app?
I think making user of the library know about orientation complicates things, the library should take care of orientation by itself.

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

I tried values you provided on different photos taken in different orientation on my device (nexus 5x), thumbnails appear right.
Can you please send a photo that appears rotated to my email, so I will try to debug it.

from cordova-plugin-photo-library.

endoplasmic avatar endoplasmic commented on August 22, 2024

Sent to your e-mail and also attaching here. Tested on Note 5, S6 Edge+, S7 Edge.

20161111_095127

edit: interesting, it's showing rotated here as well in GitHub.

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

Yeah, the photo definitely has interesting property inside that causes rotation.
I'll check it tomorrow.

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

Wow, orientation issue is total mess. Here's article I found about the issue:
http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/
And this repo contains test images of all possible orientations:
https://github.com/recurser/exif-orientation-examples

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

browser platform of photo-library displays images incorrectly because browsers display them incorrectly. I use it only for development, so I don't feel correcting the issue for browser makes sense. Most of sites, including github, have this issue.
iOS looks free of this issue, so only platform to fix is android.

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

Oh man, rotation and EXIF is so hardly broken on android that fixing this bug ended up in project of itself.
For example, MediaStore.Images.ImageColumns.ORIENTATION returns incorrect rotation for some images.
Happily, ExifInterface always works.
I published version 1.1.8, please try it on your file.
I checked it with all images of https://github.com/recurser/exif-orientation-examples, and it looks fine.

from cordova-plugin-photo-library.

endoplasmic avatar endoplasmic commented on August 22, 2024

I will give this a whirl later on. But thanks for looking into this. I'm replying on my iOS device and my attached photo looks fine. Go figure.

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

Closing it after checking on device.

from cordova-plugin-photo-library.

endoplasmic avatar endoplasmic commented on August 22, 2024

The rotation portion is working great now, but it's ignoring the image itself and putting black bars on the sides.

The image I posted is rotated correctly, but I can see the whole image instead of cropping and centering like you do with images that are not rotated.

from cordova-plugin-photo-library.

viskin avatar viskin commented on August 22, 2024

I use ThumbnailUtils.extractThumbnail method now and it seems to work.
Please confirm that this branch solves the black borders problem for you:
https://github.com/terikon/cordova-plugin-photo-library.git#fix-rotated-thumbnail

from cordova-plugin-photo-library.

endoplasmic avatar endoplasmic commented on August 22, 2024

Yup, that did the trick. Nice work!

from cordova-plugin-photo-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.