Fotoapparat
Fotoapparat copied to clipboard
Saving to file write incorrect exif orientation tag in case you invoke start() after stop() with no rotation during this process
I use recommended code to work with Fotoapparat
.
- In
onCreate
method I just init camerafotoapparat = Fotoapparat( context = this, view = cameraView, scaleType = ScaleType.CenterCrop, ...
- In
onStart
method I juststart()
camera - In
onStop
method I juststop()
camera - When photo is taken I immediately open preview, so method
stop()
is invoked, when I close preview I returned to camera andstart()
is invoked - In some cases I get incorrect exif orientation tag
How to reproduce
- Open camera and call
start()
method - Rotate your device to landscape for example and fix it manually (do not rotate it after that)
- Take a photo and call
stop()
method - Return to camera and call
start()
method - Take a photo (here you get incorrect orientation tag, always portrait)
But if you rotate your device to other orientation and back to landscape between 4 and 5 steps you get correct orientation tag