Reputation: 8442
I'm working with camera preview frames, and need to make a decision about what minimum preview size I will work with. I need fairly high resolution, and am trying to figure out the highest preview resolution I can get across the more popular Android handsets and OS versions. (Judging by this question about Nexus One / Froyo preview sizes, it looks like they sometimes change across OS versions for the same device.)
Is there a resource anywhere that basically lists the output of android.hardware.Camera.Parameters.getSupportedPreviewSizes()
for lots of different devices (or device/OS version pairs)?
Alternatively, if there is no such listing, this question could become such a resource. I will very happily upvote any answers that include new individual data points for specific handsets / OS versions.
And to forestall the obvious comment: Yes, I know I will need to test my code on lots of devices anyway. But ideally I would like to make some reasonably informed decisions about resolution early on, without having to purchase a bevy of devices just to get started.
Upvotes: 14
Views: 6671
Reputation: 2896
Lots of data here: http://www.kirill.org/ar/ar.php
My Nexus 9 running Lollipop has these front camera sizes:
1472 x 1104 1.333
736 x 552 1.333
1280 x 720 1.778
720 x 480 1.500
640 x 480 1.333
352 x 288 1.222
320 x 240 1.333
176 x 144 1.222
Upvotes: 4
Reputation: 30114
Nexus 4 running Icecream Sandwich
1280 x 720 1.778
800 x 480 1.667
768 x 432 1.778
720 x 480 1.500
640 x 480 1.333
576 x 432 1.333
480 x 320 1.500
384 x 288 1.333
352 x 288 1.222
320 x 240 1.333
240 x 160 1.500
176 x 144 1.222
Upvotes: 3
Reputation: 30114
HTC Wildfire running Froyo
1280 x 720 1.778
800 x 480 1.667
768 x 432 1.778
720 x 480 1.500
640 x 480 1.333
576 x 432 1.333
480 x 320 1.500
400 x 240 1.667
384 x 288 1.333
352 x 288 1.222
320 x 240 1.333
272 x 272 1.000
240 x 240 1.000
240 x 160 1.500
176 x 144 1.222
Upvotes: 4
Reputation: 12367
My experience tells me, that 640x480 is available almost everywhere, and even if bigger resolutions are advertised by camera object, not all of them are actually usable. I experienced segfaults on HTC Hero when I tried maximal resolution - data buffer used for passing preview images is mmaped, and this size seems to be limited
Upvotes: 7