Languages

Menu
Sites
Language
Camera capture always in landscape

Hi,

I am using Tizen 2.3 SDK. My camera native application always capture in lanscape mode.

I am using Evas Object for rendering and capturing format is JPEG.

camera_start_capture() API return always image in landscape mode.

How to make it portrait? I have tried setting all camera attributes.

Regards,

Giji

Responses

12 Replies
colin Rao

Hi, as the API reference, please try to call this api,

int camera_attr_set_scene_mode  ( camera_h  camera,  
  camera_attr_scene_mode_e  mode  
 )  


enum camera_attr_scene_mode_e 

Enumeration for the scene mode. 

The mode of operation can be in daylight, night, or back-light. 
Since :2.3 Enumerator: 
CAMERA_ATTR_SCENE_MODE_NORMAL  
Normal 
 
CAMERA_ATTR_SCENE_MODE_PORTRAIT  
Portrait 
 
CAMERA_ATTR_SCENE_MODE_LANDSCAPE  
Landscape 

 

Jingbiao Nan

However, the LANDSCAPE scene is always got. Although camera_attr_set_scene_mode() is called, return value is always -1073741822, and the scene is not changed. Just the camera_attr_set_scene_mode() does not work.

Alex Ashirov

Hi

Have you tried the following API?

int camera_attr_set_stream_rotation  ( camera_h  camera,    camera_rotation_e  rotation )

enum camera_rotation_e

Enumeration for the camera rotation type.

Enumerator:

CAMERA_ROTATION_NONE  No rotation

CAMERA_ROTATION_90  90 degree rotation

CAMERA_ROTATION_180  180 degree rotation

CAMERA_ROTATION_270  270 degree rotation 

Giji Gangadharan

Hi,

Thanks for your replies. 

Actually the above two camera attributes (camera_attr_set_scene_mode and camera_attr_set_stream_rotation )

API's returns CAMERA_ERROR_NOT_SUPPORTED. So, only landscape mode is supported?

Thanks.

 

Alex Ashirov

Hi,

It’s strange because I am able to take a shots (jpegs) in the both landscape and portrait modes using standard Camera application. Probably there are some API limitations. I used back camera. Btw, what camera do you use back or front?

Giji Gangadharan

Hi,

I use back camera. Even I tried using front camera. Both are capturing in landscape mode. As you said, it may be the issue with API.

Jingbiao Nan

Could you please tell me, how to get the back camera? I just get the front camera.

colin Rao

as the enum camera_device_e (CAMERA_DEVICE_CAMERA0 ,CAMERA_DEVICE_CAMERA1 ), possible it's can be used to disginguish the front and back camera while call camera_create().

Jingbiao Nan

I can get the rear camera successfully. However, the LANDSCAPE scene is always got. Although camera_attr_set_scene_mode() is called, return value is always -1073741822, and the scene is not changed. Just the camera_attr_set_scene_mode() does not work.

Vikram

Hi,

Did you add the privilege http://tizen.org/privilege/camera

Also, try camera_attr_foreach_supported_scene_mode() to check the tizen supported scene mode. I am just test the camera app on Samsung Z1, seems tizen support both portrait and landscape mode.

 

Jingbiao Nan

Hi,

The privilege http://tizen.org/privilege/camera is added.

And my device is also Samsung Z1.

If it is convenient, could you please send me a simple demo?

jingbiao.nan@samsung.com.

Thanks very much.

Jeongmo Yang

Hi,

 

Have you set EXIF orientation with "camera_attr_set_tag_orientation" API?

In general, camera lens in phone are rotated, so we need to set proper orientation tag if lens rotation and device rotation are different.

Please refer below link to know EXIF orientation.

http://blog.naver.com/chunter99?Redirect=Log&logNo=51770674

but, image is not actually rotated although we set orientation tag.

It sets just orientation in EXIF and image will be shown with orientation tag when we see the image with image viewer which supports EXIF orientation.

and Please note that default image viewer in Windows7 does not support EXIF orientation.