I want to get a full resolution(and not compressed)image data, then i can do some image processing.
As far as i know, the android api takePicture (shutter, raw, jpg) can do something.But what i need is not a compressed JPEG data, a uncompressed image data instead.Also I knew the raw callback doesn't work according to some posts i have read.
I also found the api onPreviewFrame, and the larggest picture size i got from this is 1280*720(use setPreviewSize) while the original image i caputure from the camera is a resolution of 1952*3264.
Also, Intent.putExtra(MediaStore.EXTRA_OUTPUT, uri) may be help, but it likely that the file of the uri should be a jpeg file which is a compressed format.
But is there anyway to get a full size(the same as captured) and uncompressed(not a JPEG) image data?
The documentation for takePicture() clearly says that raw data can be requested, but the callback is optional. Today, most of devices do not support raw callback. This should not be a surprise: modern cameras perform Jpeg compression in hardware, and the memory bus between the camera and the application processor cannot handle 24 Megabyte of raw data fast enough (for a modest 8 megapixel camera).
Avoid temptation to use preview callback instead of takePicture(): even at same resolution, image qualiity of a still picture will be better. Preview image may have imprecise autofocus, stabilization, exposure and even white balance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With