commons-imaging icon indicating copy to clipboard operation
commons-imaging copied to clipboard

[IMAGING-105] Add methods for editing EXIF-value for rotation for jpeg-files

Open snumlautoken opened this issue 2 years ago • 11 comments

This PR is for an issue whose 10th anniversary was a week ago, so might not be the most important issue.

Nevertheless, we feel as though, among metadata operations, rotation is probably the one most commonly used, and thus most deserving of a more streamlined process.

We also feel that our contribution could serve as a base for other streamlinings of exif-data manipulation, such as for GPS-data.

snumlautoken avatar Mar 07 '23 09:03 snumlautoken

Codecov Report

Attention: Patch coverage is 72.88136% with 16 lines in your changes missing coverage. Please review.

Project coverage is 70.78%. Comparing base (ff13fa4) to head (0ab16f7). Report is 858 commits behind head on master.

Files with missing lines Patch % Lines
...ing/formats/jpeg/exif/ExifOrientationRewriter.java 72.88% 13 Missing and 3 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #283      +/-   ##
============================================
+ Coverage     70.74%   70.78%   +0.03%     
- Complexity     3369     3381      +12     
============================================
  Files           332      333       +1     
  Lines         16942    17001      +59     
  Branches       2647     2655       +8     
============================================
+ Hits          11986    12034      +48     
- Misses         3910     3918       +8     
- Partials       1046     1049       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 07 '23 09:03 codecov-commenter

@kinow We have been working as a group (school project), and have thus been aiming to work in a very fractured manner, with many small commits. So no error on that front. But a squash may have been appropriate...

snumlautoken avatar Mar 07 '23 10:03 snumlautoken

We have been working as a group (school project)

Interesting!

and have thus been aiming to work in a very fractured manner, with many small commits. So no error on that front.

Got it.

But a squash may have been appropriate...

Yes, please it is alright to have multiple commits as long as it is intentional and with a good reason.but otherwise squashed it is.

Thanks!

kinow avatar Mar 07 '23 11:03 kinow

Should we send in a new, squashed, PR? Or just let it be?

snumlautoken avatar Mar 07 '23 11:03 snumlautoken

Should we send in a new, squashed, PR? Or just let it be?

We can use this PR. You should be able to squash the commits in this PR, then push -f to your branch.

kinow avatar Mar 07 '23 13:03 kinow

Maybe not the ideal way to add co-authors, but this will hopefully work

snumlautoken avatar Mar 07 '23 14:03 snumlautoken

Maybe not the ideal way to add co-authors, but this will hopefully work

If you would like to credit others, we can add it to the src/changes/changes.xml. That's where we record the entry for the issue (IMAGING-105). Alternatively, you can add multiple authors to a commit too - e.g. https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors (feel free to edit your commit and push -f to this branch as you did, until you are happy with the code :+1: )

kinow avatar Mar 07 '23 15:03 kinow

e.g. https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors

That was the way I added them, so it should be fine as it is!

snumlautoken avatar Mar 07 '23 15:03 snumlautoken

Re-requesting review as the change is still requested Just making sure that a misunderstanding has not occured

snumlautoken avatar Mar 09 '23 10:03 snumlautoken

No misunderstanding. Just busy, sorry. Thanks for checking though 👍

kinow avatar Mar 09 '23 11:03 kinow

@snumlautoken I share your opinion about the importance about the orientation flag. That’s why I recently wrote a logic dedicated to finding and updating that flag.

You may want to rewrite https://github.com/Ashampoo/kim/blob/main/src/commonMain/kotlin/com/ashampoo/kim/format/jpeg/JpegOrientationOffsetFinder.kt in Java and contribute this. :)

StefanOltmann avatar Nov 08 '23 18:11 StefanOltmann