Hello,
when we are capturing photo (in portrait mode) callback function OnCameraCaptured gives as first parameter buffer with JPG image, which contains all EXIF data.
If we make photo in portrait or landscape mode and we are using SetExifOrientation well, our EXIF data tags (for 8MPx photo) are like:
<tiff:ImageWidth>3264</tiff:ImageWidth><tiff:ImageLength>2448</tiff:ImageLength><exif:PixelXDimension>3264</exif:PixelXDimension><exif:PixelYDimension>2448</exif:PixelYDimension>
only tiff:Orientation element holds information about JPG orientation/rotation ...
Now if we want to change our picture/make some filter/whatever we need to covert our JPG buffer to ARGB8888 bitmap:
Bitmap* bmp = img.DecodeN(capturedData, IMG_FORMAT_JPG, BITMAP_PIXEL_FORMAT_ARGB8888)
but there is a probelm our bitmap will be in landscape orientation because it decode using "ImageWidth" and "ImageHeight" element value.
but there is a probelm our bitmap will be in landscape orientation because it decode using "ImageWidth" and "ImageHeight" element value.
So by decoding our bitmap will always be landscape orietation, and by decoding we lose all EXIF data...
We make some fancy things with our bitmap, and now we want to save it as JPG.... whatever we do... EncodeToBufferN and CreateContent, or EncodeToFile we have no EXIF data, no orientation data, so our JPG will be landscape always...
There is no API for managing exif data....
Is using external managing EXIF library is only way to read EXIF from captured image, and then Write it to our decoded->changed->encoded JPG?
Any ideas?
Regards