Skip to content

Conversation

kamil4
Copy link

@kamil4 kamil4 commented Oct 22, 2022

Fixes LycheeOrg/Lychee#1548

When I added a few more test images I realized how incomplete our support was across multiple adapters so I patched up what I could:

  • Added an abstract MapperAbstract class which implements one method: a recursive trim.
  • Added support for IPTC CopyrightNotice to the Exiftool mapper.
  • Added support for EXIF Artist, Copyright, and ImageDescription to the ImageMagick adapter.
  • Added support for EXIF ImageDescription.
  • Added two more test files and extended side-by-side testing of different adapters to cover another existing file.

UTF8 handling is still hit-and-miss though. For instance, the ImageMagick adapter tends to just replace "strange" characters with a dot (.). I added an invocation of convertToUTF8 (which we use in other adapters) in the hope of fixing it but it didn't seem to improve anything. For best results, one should use Exiftool (as always, really...).

@codecov
Copy link

codecov bot commented Oct 22, 2022

Codecov Report

Merging #55 (8c9f7c9) into master (ada5def) will decrease coverage by 0.62%.
The diff coverage is 56.25%.

Additional details and impacted files

@kamil4
Copy link
Author

kamil4 commented Oct 22, 2022

The added images triggered some more issues with the recent rounding changes from #54 but this should be all good now...

@qwerty287
Copy link

To fix the codecov status you have to add some more tests to increase the coverage :D
Or you change the config for it to not fail anymore.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
7.5% 7.5% Duplication

@ildyria ildyria merged commit c0d1ce4 into master Oct 28, 2022
@ildyria ildyria deleted the fix-1548 branch November 26, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Metadata Exif description field

3 participants