Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for auto-rotating images according to the EXIF orientatio…
…n tag Not implemented for multi-page images yet (see technical details after * below). Example images can be found at https://github.com/recurser/exif-orientation-examples.git If the image has an EXIF orientation tag, its abbreviated representation (“code”) is appended to the viewer title, e.g. “R0F0” (no rotation, no flip) or “R1FX” (rotate 90 degrees and flip horizontally). If the script did not auto-rotate the image according to the tag (e.g. because it is a multi-page TIFF image), the code is in lowercase, e.g. “r1f0” (you need to tilt your head to the left to view the image). * Technicalities about multi-page images: To implement the same for multi-page images, one will need to call GdipCloneImage prior to GdipImageRotateFlip (as the latter discards all other pages of the image), apply the rotation/flip to the clone, display the clone, then dispose it appropriately BUT still call GdipImageSelectActiveFrame for the original image.
- Loading branch information
Showing
1 changed file
with
63 additions
and
10 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