Different Capture Output Size On Certain Camera Resolutions In Android
Solution 1:
Up to a certain point,the camera device will round your requested size to a supported one, to make camera preview more flexible to set up, but only up to 1080p (to generally guarantee a reasonable frame rate for preview).
Past that, you need to actually select a supported resolution from the list provided by the device, or you'll just get rounded down to 1080p.
The camera's supported output sizes and formats can be queried with StreamConfigurationMap.getOutputSizes(). You'll need to scan the list for a size that matches your requirements and has an aspect ratio that matches the aspect ratio of the image sensor (available through activeArraySize)
I'd double-check all the sizes below 1080p as well, to make sure you're actually getting what you want. The rounding is always to a lower resolution, to minimize performance and memory requirements.
Post a Comment for "Different Capture Output Size On Certain Camera Resolutions In Android"