Fotoapparat: jpegQuality doesn't seem to work

I’m trying to compress the image taken by camera and have been using jpegQuality method to do a bit compression, but it doesn’t seem to work. Attached are the code snippets I used to achieve quality reduction.

Before applying: Size: 2.3 MB

After applying: Size: 2.3 MB

    fotoapparat = Fotoapparat
        .with(cameraView.context)
        .into(cameraView)
        .previewScaleType(ScaleType.CenterCrop)
        .lensPosition(back())
        .jpegQuality(manualJpegQuality(70))
        .focusMode(firstAvailable(continuousFocusPicture(), autoFocus(), fixed()))
        .logger(logcat())
        .build()

I also tried setting the quality using a CameraConfiguration. Unfortunately, this also doesn’t work.

fotoapparat.updateConfiguration(CameraConfiguration(jpegQuality = manualJpegQuality(70)))
  • Fotoapparat version: 2.2.0
  • Tested for Android 7.0.1

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

We had. Unfortunately camera 2 is not as performant as camera 1, so we dropped it. Camera 1 can work with all devices. Also the ones 21+