Fotoapparat icon indicating copy to clipboard operation
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

Open Gary111 opened this issue 6 years ago • 0 comments

I use recommended code to work with Fotoapparat.

  1. In onCreate method I just init camera
    fotoapparat = Fotoapparat(
        context = this,
        view = cameraView,
        scaleType = ScaleType.CenterCrop,
        ...
    
  2. In onStart method I just start() camera
  3. In onStop method I just stop() camera
  4. When photo is taken I immediately open preview, so method stop() is invoked, when I close preview I returned to camera and start()is invoked
  5. In some cases I get incorrect exif orientation tag

How to reproduce

  1. Open camera and call start() method
  2. Rotate your device to landscape for example and fix it manually (do not rotate it after that)
  3. Take a photo and call stop() method
  4. Return to camera and call start() method
  5. 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

Gary111 avatar Jun 26 '18 04:06 Gary111