Skip to content
Commit 6aa7a11b authored by Tom Moebert's avatar Tom Moebert Committed by Nate Graham
Browse files

Correctly crop embedded thumbs for Canon JPEGs

Summary:
JPEGs created by Canon Cameras have an embedded thumbnail. However only a certain area of the thumb is "valid", i.e. there are black bars on top and bottom. This change moves the thumbnail extraction logic to JpegContent and correctly crops the thumb by reading the Canon specific exif tag. The same black bars can be observed in thumbnails by Sony and Nikon. They however don't seem to provide such an exif tag, AFAIK.

Also suggests to let the thumbnailgenerator use the embedded thumbnail even if applyExifOrientation() is disabled. I don't see how the original image and its embedded thumb can be rotated differently, i.e. effectively being two different images. The only purpose of applyExifOrientation() should be to apply any rotation/transformation consistently to both, the original and its thumb, and not preventing to use the embedded thumb at all.

Reviewers: #gwenview, ngraham

Reviewed By: #gwenview, ngraham

Subscribers: ngraham, #gwenview

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D21329
parent 5ff416f1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment