0

my question is about the camera in android ,I wonder if I can set the orientation of preview of camera,How could I set this in android 1.6+ versions.thanks for your answer.

EDIT: thanks for your answers, now I want to know how to save the image depend on its oriention message,after I get the byte[],I want to realize app can save the jpg. image fit its length and height.now I怀write the byte[] directly in the file and the size isn't right.If I use Vertical mode then the image should be more height but it doesn't .Could anyone help me please?thank you

Xoangle
  • 405
  • 6
  • 11

1 Answers1

0

You can use:

preview.set("orientation", "portrait");
preview.set("rotation",90);

and

preview.set("orientation", "landscape");          
preview.set("rotation", 90);

See this thread for a more detailed answer:

How to set Android camera orientation properly?

Community
  • 1
  • 1
Anup Cowkur
  • 20,443
  • 6
  • 51
  • 84