pi-top-Python-SDK icon indicating copy to clipboard operation
pi-top-Python-SDK copied to clipboard

Provide simple interface for selecting pi-top camera resolution profile

Open m-roberts opened this issue 4 years ago • 2 comments

Something like this:

camera = Camera(resolution="720p")

For these values:

  • 720p
  • 480p
  • 360p
  • 240p

But without strings. Discuss.

m-roberts avatar Apr 13 '21 14:04 m-roberts

I don't think there's a better way to do this than using a string, the fact the names start with a number makes any other method difficult. Other options:

  • Use names like HD, SD, QVGA etc - cumbersome and non-specific, they have a one-to-many relationship with actual resolutions
  • Large/medium/small/smallest - simple but lacks direct relationship, completely ambiguous as to what resolution is actually being used.

I also don't think it's a good idea to use a string like "720p" either as even those are one-to-many: 720p can mean 1280×720, 1360×768 and 366×768 according to Wikipedia. I'd prefer to stick to the tuple method so that users know exactly what the width and height of the image are - they generally need this information even when doing simple challenges on Further.

duwudi avatar Jun 11 '21 03:06 duwudi

Instead, we should just add a check to make sure that a valid resolution has been passed, and if it is invalid provide clear instructions on what resolutions they can use.

duwudi avatar Jun 11 '21 03:06 duwudi