set capture size for camera android -


i want set capture size camera in android. want user capture image using size alone irrespective of screen size. see approach in instagram application in android 4.x versions.

i used following code, shows camera error.

camera camera = camera.open(); parameters params = camera.getparameters(); list<camera.size> sizes = params.getsupportedpicturesizes(); params.setpicturesize(sizes.get(1).width, sizes.get(1).height);//height-480,width-640 camera.setparameters(params); 

anyone please me. in advance.


Comments

Popular posts from this blog

rest - Spring boot: Request method 'PUT' not supported -

php - Magento - Deleted Base url key -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -