camera captured image default rotating with 90 degree angle.

Posted by kamiomar on Stack Overflow See other posts from Stack Overflow or by kamiomar
Published on 2010-04-08T13:12:06Z Indexed on 2010/04/08 14:13 UTC
Read the original article Hit count: 228

Filed under:
|

Dear,

currently i am using android Api 4. my camera initializing code is follow:

public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
  // Now that the size is known, set up the camera parameters and begin
  // the preview.
  Parameters parameters = camera.getParameters();
  parameters.set("jpeg-quality", 100);
  parameters.set("orientation", "portrait");
  parameters.set("picture-size", "320X430");
  parameters.set("rotation", 0);
  parameters.setPictureFormat(PixelFormat.JPEG);
  camera.setParameters(parameters);
  camera.startPreview();

 }

i set the orientation portrait, camera preview working appropriately. but when i captured the image ,its rotating the image with 90 degree.In the landscape orientation its working perfectly. so how i can capture normal image using portrait orientation.

thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about camera