-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemention of PLIP 1673: Automatic image rotation based on Exif data
PLIP 1673: plone/Products.CMFPlone#1673 This PLIP implementation introduced a straight foreward image rotation based on Exif information for JPEG and TIFF Images stored in plone.namedfile Image fields. The concept of Exif orientation is described in detail in the following blog: http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/ It requires an additional external library as dependency: piexif (package: https://pypi.python.org/pypi/piexif; docs: http://piexif.readthedocs.org/en/latest/; github: https://github.com/hMatoba/Piexif) piexif, allows reading and writing of Exif information, which offers more powerful image handling than a read only library. piexif also works very smart together with Pillow. This PLIP superseeds prior attemts to add Exif based image rotation to plone.namedfile: #12, #13, #14 For testing of orientation change, images where needed to include for test files. This is not part of this implementation. The following github repositories have several examples of Images for orientation testing: * https://github.com/recurser/exif-orientation-examples (JPEG Images with orientation 1-8 in Landscape and Portrait orientation) * https://github.com/ianare/exif-samples (lots of different JPEG and TIFF Images, even corrupted images) Additional to the PLIP implementation this commit includes a restructuring of the package. * Image meta data detection has been moved to a subfolder utils and splited into several files for each image type * Moved functions to utils as those are helper methods, so that base functionallity is easier to read * Added basic TIFF Image handling. Prior TIFF were handled as Files not Images. Last but not least: Moved package version from 4.1.x to 4.2.0 as it introduced new features, following semantic versioning.
- Loading branch information
Showing
8 changed files
with
471 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
df59b59
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.
@loechel Jenkins CI reporting about code analysis
See the full report here: http://jenkins.plone.org/job/package-plone.namedfile/56/violations
Follow these instructions to reproduce it locally.