RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.82k stars 405 forks source link

Read out biggestSize() width and height #155

Closed koenschauwaert closed 6 years ago

koenschauwaert commented 6 years ago

I want to read out the actual sizes (width and height) of

Fotoapparat.photoSize(standardRatio(biggestSize()))

How do I accomplish this?

Diolor commented 6 years ago

You can read the bitmap dimensions from the bytearray

dmitry-zaitsev commented 6 years ago

Alternatively, you can apply selector function (that's what biggestSize() is) to the Capabilities. Like that:

val result = biggestSize().select(capabilities.supportedPictureSizes())

To get capabilities check fotoapparat.getCapabilities.