[RFC] Remove JpegContent class, replace with "Exiv2Content"
Needs ReviewPublic

Authored by tommo on Oct 9 2019, 2:47 PM.


Group Reviewers

This a request for comments, not yet ready diff.

I'm suggesting to remove the ancient JpegContent class and replace it with some Exiv2Content or MetadataContent class (currently called Exiv2ImageLoader).

I don't see any reason to give JPEGs that special low-level treatment as implemented by the JpegContent class. Also, the JpegContent class partly is a wrapper for Exif metadata. Instead, having a general wrapper class for Exif metadata would be nice. IMO, this would help to address bugs like 324597 and 139735.

Exif data is not specific to JPEGs only. Instead, it is available for many formats, even RAWs. An instance of Exiv2Content (similar to current handling of JpegContent) would always be created when Exif metadata is available.

With this change in mind, I'm also looking forward to a performance-related improvement: Images that provide Exif would, for instance, be able to immediately display the embedded thumbnail preview, before then going on to do the slow decoding of the full, potentially huge high-resolution image.

I've been working on this for quite a few months now and not really making progress anymore. Hoping for feedback and help here.

Open TODOs: The unit tests currently fail. I need some help here.

Diff Detail

R260 Gwenview
Lint Skipped
Unit Tests Skipped
tommo requested review of this revision.Oct 9 2019, 2:47 PM
tommo created this revision.

Wow, a very ambitious change.

A lot of this code is beyond my capacity to review; @asturmlechner, @davidre, @meven, or @tcanabrava, would any of you guys be interested in checking this out?

Any reason not to use kexiv2?

tommo added a comment.Oct 12 2019, 1:00 PM

Oh, I didn't know about that, thx for the hint. Will see how it can be integrated.