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:

  1. use camera.getparameters().getsupportedpicturesizes() complete list.
  2. decide best fit depending upon constraints.
  3. some apps implement device specific best fit logic. mostly, popular devices targeted.

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -