photoprism/pkg/clean/orientation.go
Michael Mayer 9ad86ac017 Edit: Change image orientation through the user interface #464
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-20 16:18:27 +01:00

12 lines
222 B
Go

package clean
// Orientation returns the Exif orientation value within a valid range or 0 if it is invalid.
func Orientation(val int) int {
// Ignore invalid values.
if val < 1 || val > 8 {
return 0
}
return val
}