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

c++11 - Intel compiler and "cannot have an in-class initializer" when using constexpr -

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

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -