How to solve different Preview/Picture sizes returned by android.hardware.camera? -
so i've been playing android camera library , using in surfaceview. have found there's no way capture pictures match preview. in fact, 1 has check preview , picture sizes , set camera parameters best match possible. also, can't set camera have same sizes both since app crash if camera doesn't support them.
how can be? there no other solution? mean instagram seems use (it doesn't launch phone's camera app) , there seems perfect match.
any ideas? thanks!
simplest, , largely practical, approach treat preview mere feedback mechanism , concentrate program logic on getting best - , desired - quality of image capture.
there little novelty in mixing 2 together.
also, desired image capture quality may depend on different factors/options. based on post capture processing times, storage constraints, upload constraints, , more; best quality image may not desired one.
implementation wise, camera apps follow common practices below:
- use camera.getparameters().getsupportedpicturesizes() complete list.
- decide best fit depending upon constraints.
- some apps implement device specific best fit logic. mostly, popular devices targeted.
Comments
Post a Comment