Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 16
Registered: ‎05-30-2013
My Device: Z10, Q10
My Carrier: Rogers

Bayer mode problem

[ Edited ]

Hey guys,

 

I'm creating an app to retrieve bayer format pictures using the native camera API (but the whole UI was made in QML), but when I try to specify the bayer format I always get an error:

 

camera_frametype_t frametype;
frametype = CAMERA_FRAMETYPE_BAYER;
//frametype = CAMERA_FRAMETYPE_JPEG;

camera_set_photo_property (mCameraHandle,
        		               CAMERA_IMGPROP_FORMAT, frametype)

 If I use the code with the frametype set as CAMERA_FRAMETYPE_JPEG it works perfectly fine. However, if I use CAMERA_FRAMETYPE_BAYER I'll get this message:

 

error: CAMERA_EINVAL
Description: The function call failed because of an invalid argument. 

 And the app will automatically start with jpeg mode.

 

How can I fix it? How can I get bayer format pictures?

 

Thank you!

Contributor
Posts: 16
Registered: ‎05-30-2013
My Device: Z10, Q10
My Carrier: Rogers

Re: Bayer mode problem

I fixed it. The bayer mode just works with 4:3 images and I was using the camera opened as 16:9.