android / android/camera-samples
Do we need to set up targetResolution based on orientation?
- Vorherrschende Sprache
- Kotlin
- Sterne
- 5.5k
- Forks
- 2.4k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
In the [docs](https://developer.android.com/reference/kotlin/androidx/camera/core/ImageAnalysis.Builder#setTargetResolution(android.util.Size)), it says the following:
The resolution [Size](https://developer.android.com/reference/android/util/Size.html) should be expressed in the coordinate frame after rotating the supported sizes by the target rotation. For example, a device with portrait natural orientation in natural target rotation requesting a portrait image may specify 480x640, and the same device, rotated 90 degrees and targeting landscape orientation may specify 640x480.
So do we need to switch width and height based on orientation like this: https://gist.github.com/ldstein/bf8b88fabc27617dca891aa3be58f9d7
I cannot find an official example.
Beitragsleitfaden
Rechercherichtung
Beginne mit der verlinkten Dokumentation zu ImageAnalysis.Builder#setTargetResolution und vergleiche deren Hinweise zur Ausrichtung mit dem Kamerabeispielcode; das Issue nennt keine Datei und keinen Test. Als erledigt gilt, wenn die erwartete Behandlung von Breite und Höhe dokumentiert ist, idealerweise mit einem offiziellen Beispiel oder einem präzisen Verweis auf die relevante Konfiguration.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, kotlin
- Bereich
- documentation, mobile
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100