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
Developer
slashkyle
Posts: 818
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Z30 Camera output size

no problem, a delayed answer will be faster than the no answer that's came from a several week old jira ticket

 

Thanks peardox

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Z30 Camera output size

I'll pass this on

 

Sorry - ain't got one myself so have to use my friends




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 820
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: Z30 Camera output size

So Peardox got me taking a look at this (I have a Z30 with me right now) and I think I found something strange:

 

In 16:9 mode, the Z30 is taking an image of 3072x1728px, which is only 5mpx.

 

In 4:3 mode, the image is 3264x2448px, which is 8mpx.

 

16:9 should be creating an image of 3264x1836px the same as the Z10. I'll contact the camera team about this.

 

The same issue is apparent when using the front camera: 1536x864 in 16:9, and 1600x1200 in 4:3.

 

 

Now, that all said - I do not understand why you are hardcoding these values in your application. Regardless of the dimensions of the camera image, why aren't you dynamically reading the image dimensions?

 

Tim Windsor
Application Development Advisor II
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Z30 Camera output size

As I say - I've asked

 

Either myself or Tim will reply (Tim's a BB, Im me)

 

There is nothing I can do before I or Tim provide the info

 

Sorry - best I can do




Click the like button if you find my posts useful!
Please use plain text.
Developer
slashkyle
Posts: 818
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Z30 Camera output size

[ Edited ]

Thanks for looking into this, and it's awesome that this bug was spotted before the Z30 made it out the door.

 

In my application I query for the capture resolution, but then use use harcoded width or height value to choose my selection depending on if i need 16:9, 4:3 or 1:1.  It's easier for me to hardcode one value when im making my selection so I know what's going to be selected and there's no chance of varied results

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Z30 Camera output size

I've got someone talking a photo in Canada with a Z30

 

All we can do now is wait




Click the like button if you find my posts useful!
Please use plain text.
Regular Contributor
namit2013
Posts: 53
Registered: ‎02-15-2013
My Device: Z10

Re: Z30 Camera output size

Oh, I didn't know images could be taken in 16:9 mode, I was always using and testing with 4:3 mode for Z10 and 3:3 for Q5. I will have to test with 16:9

 

Also yeah I'm dynamically reading the dimensions of the image while processing but using the phone screen sizes while making the imageview - Will look into how to do this for the multiple phone sizes and multiple image size

Please use plain text.
Developer
slashkyle
Posts: 818
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Z30 Camera output size

[ Edited ]

the dimension you have the capture resolution determines the viewfinder size, 16:9 fills the screen =)

 

4:3 has slight letter boxing in the VF but no distortion in the image give a little, take a  little

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Z30 Camera output size

[ Edited ]

there should be no reason to hardcode camera resolutions ever.

these are readily query-able on all devices in both Cascades and in C.

 

 

FYI, when I query what is available on Z30 rear camera, I see:

supported photo resolutions:
2448 x 3264
1728 x 3072
2448 x 2448

For front camera:

supported photo resolutions:
1200 x 1600
864 x 1536
1200 x 1200


I also checked, and when I take a photo, this is the size produced.

 

Cheers,

Sean

 

 

Please use plain text.
Developer
slashkyle
Posts: 818
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Z30 Camera output size

[ Edited ]

They are queryable, this is how I find them however this can only be done with a device (Z30 currently isn't out) so it's not currently possible for me to design my apps for the Z30 which I would like to have done prior to launch.

 

this is an example of how I get a fullscreen video viewfinder on the Z10, the code is mainly the example you gave me previously only adopted to fit my needs (which requires knowing 1 value)  there is probably a better way to do it, but this works for me on Z10 and Q and I always know what the selection will be

void ApplicationUI::Z10RatioV(bb::cascades::multimedia::Camera *camera, const float aspect)
{
	qDebug() << "Z10RatioV";
#define DELTA(x, y) (x>y?(x-y):(y-x))
    CameraSettings camsettings;
    camera->getSettings(&camsettings);
    QVariantList reslist = camera->supportedCaptureResolutions(CameraMode::Video);
    QSize captureRes = camsettings.captureResolution();
    qDebug() << "current resolution: " << captureRes.width() << "x" << captureRes.height();
    for (int i=0; i<reslist.count(); i++) {
        QSize res = reslist[i].toSize();
        qDebug() << "supported resolution: " << res.width() << "x" << res.height();
        // check for w:h or h:w within 5px margin of error...
        if (((DELTA(res.width() * aspect, res.height()) < 5) ||
            (DELTA(res.width(), res.height() * aspect) < 5)) && res.width() == 1080) {
            qDebug() << "picking resolution: " << res.width() << "x" << res.height();
            if (res != captureRes){
                        	qDebug() << "setting resolution: " << res.width() << "x" << res.height();
                        	camsettings.setCaptureResolution(res);
                        } else {
                        	qDebug() << "No need to set resolution";
                        }
        }
    }
    camera->applySettings(&camsettings);
}

 Thanks for the list shawn, is there any chance i could get you to check video mode as well for front & rear(if they vary)

Please use plain text.