-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GH-329: (android) Fixes issue: Exif data lost on many cases #331
Conversation
src/android/CameraLauncher.java
Outdated
@@ -994,6 +994,7 @@ private Bitmap getScaledAndRotatedBitmap(String imageUrl) throws IOException { | |||
// read exifData of source | |||
exifData = new ExifHelper(); | |||
exifData.createInFile(filePath); | |||
exif.readExifData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this variable used? If this.correctOrientation
is true, it is overwritten again and then used to get the orientation, but otherwise?
@@ -994,6 +994,7 @@ private Bitmap getScaledAndRotatedBitmap(String imageUrl) throws IOException { | |||
// read exifData of source | |||
exifData = new ExifHelper(); | |||
exifData.createInFile(filePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OT to your PR, but man is this a bad variable file. I read it as "create in file", but it actually means "create in(put)file".
@@ -994,6 +994,7 @@ private Bitmap getScaledAndRotatedBitmap(String imageUrl) throws IOException { | |||
// read exifData of source | |||
exifData = new ExifHelper(); | |||
exifData.createInFile(filePath); | |||
exifData.readExifData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't really understand how reading some data into a property/class variable of exifData
influences the further execution of code. Can you explain?
|
I have tested this and it works as intended. Voting for a pull of this fix. |
(@ddsky You should be able to leave an actual "Approve" review in the "Files changed" tab - that will make it easier for us to spot the positive review. Thanks!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me and saved my day!
any news on when this will be merged? |
You will learn about it here by an update to the PR being posted by GitHub. (If I am involved, it will now happen 2 minutes later as I had to open this notification, read your message and reply.) |
Includes the pull request apache#331 (apacheGH-329) from the main fork Includes the pull request apache#238 from the main fork
Can I help in anyway to get this PR merged? It has been quite some time and it seems like everything is ok 🙂 |
thanks all for merging! Could someone tell me when the next version release is planned? 🙂 |
No, as there is not ETA for releases. Someone from the committer team will have to take the time to prepare the release (which means understanding all the PRs merged, giving them another round of testing, doing the actual release. this time probably also updating CI configuration as the last release was some time ago and new OS versions were released - which of course also have to be tested.) |
Exif metadata are not saved on iOS either (iOS 12) with the following settings:
Is this issue related? |
It should not. I just fixed the Java code for Android. |
I will have to open another issue then, could not find any existing one about EXIF data missing on iOS. |
@mirko77 EXIF data is working fine for us on iOS 12 |
@BorntraegerMarc I cannot figure it out. Even if I take a picture with the camera app and send it to me via Gmail, the image does not have any EXIF metadata in it. Any suggestions? |
I am also facing this issue. let me once you create special issue for it, so I can also follow progress on it. |
Do you mean you cannot get the EXIF data in iOS as well? |
i also do not get EXIF data on iOS when using the camera with: |
Yes in case of IOS HEIC image format We are loosing metadata from image. |
Has this issue been reported yet? @chintan13 @dlydiard |
no but there is open pr from last two years, |
Please open an issue @chintan13 and link to the PR - this will greatly improve the chance that the PR gets merged. |
I added an issue for the problem with EXIF on iOS (see #524) and provided a potential fix (see #525) |
Platforms affected
Android
What does this PR do?
Reads the exif data from the file on these cases:
-When destType = DATA_URL
-When file is selected from gallery.
-When targetHeight or targetWidth is set, quality is not 100 or correctOrientation is true
What testing has been done on this change?
Tested on two differente android devices.
Checklist
closes #329