skvark / Textractor

OCR application for Sailfish OS. Based on Tesseract OCR engine and Leptonica image processing library.
MIT License
20 stars 6 forks source link

Rotate images which are taken with Jolla's camera app #6

Open skvark opened 9 years ago

skvark commented 9 years ago

If user tries to process an image which was taken with Jolla's camera app and the orientation was not standard, image will appear in wrong orientation after preprocessing since afaik Jolla's camera app only adds exif orientation information and does not actually rotate the image and seems that Leptonica does not support exif data.

Fix: find a way to read the exif data and rotate the image before preprocessing.

skvark commented 9 years ago

This issue is resolved/tested partly in d6305bd. I did some testing with Jolla's camera app and exif orientations 1, 3 and 6 work now correctly. The mirrored orientations haven't been tested.

Jolla's camera app doesn't tag the image correctly if the phone is upside down (usb port points down to earth) - the orientation tag should be 8 but the app tags it as a 1. This incorrect behaviour can be observed in the Jolla's gallery app too.

See http://www.impulseadventure.com/photo/exif-orientation.html for more info about the orientation tag.