0

i am initializing imageReader when setting up the camera:

mImageReader = ImageReader.newInstance(largest.getWidth(), largest.getHeight(), ImageFormat.JPEG, 2);
mImageReader.setOnImageAvailableListener(mOnImageAvailableListener, mHandler);

Is there a way to change mImageReader later, when capturing ? The problem is, that i have two capture modes and want to keep two different largest sizes. Before taking picture i want to set appropriate largest size.

user0770
  • 797
  • 3
  • 11
  • 22

1 Answers1

1

No.

You'll need to create a new capture session with the other size when you want to switch.

It's possible your device supports two JPEG outputs at once, in which case you can create ImageReaders for both sizes and include them in the capture session creation, and then just use the right target for your output. However, supporting two JPEG outputs is not required, so probably won't be widely supported.

Eddy Talvala
  • 17,243
  • 2
  • 42
  • 47