14

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.

Community
  • 1
  • 1
Josh Bleecher Snyder
  • 8,262
  • 3
  • 35
  • 37
  • I am assuming that you are trying to make the preview size decision at compile time rather than runtime, if you are deciding on runtime as you have mentioned getSupportedPreviewSizes() will return the list and you can pick the best one for you. For compile time, isn't it a better idea to decide on runtime because for every new version / device you will need to calculate this table ? – srinathhs Dec 20 '10 at 04:04
  • @srinathhs Not really. What I'm deciding on is the *minimum* resolution I will support, and I need to know what the distribution of resolutions out there is to make the trade-off between quality (higher minimum resolution is better) and availability (higher minimum resolution means fewer devices supported). Supporting a resolution means a lot of work in my case; I can't "just decide at runtime". – Josh Bleecher Snyder Dec 20 '10 at 05:53
  • 1
    I think such a resource to help make general design decisions and strategies about camera apps can be really useful. So I contribute the devices that I have access to. – Jannie Theunissen Jul 10 '13 at 07:44

4 Answers4

7

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

Konstantin Pribluda
  • 12,329
  • 1
  • 30
  • 35
4

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
Jannie Theunissen
  • 28,256
  • 21
  • 100
  • 127
4

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
jacob
  • 2,762
  • 1
  • 20
  • 49
3

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
Jannie Theunissen
  • 28,256
  • 21
  • 100
  • 127