Metadata: Default to landscape orientation if value is invalid #1052

This commit is contained in:
Michael Mayer 2021-02-17 17:10:50 +01:00
parent 2d5c259a7f
commit f326590bb6

View file

@ -804,7 +804,9 @@ func (m *MediaFile) decodeDimensions() error {
return err
}
if m.Orientation() > 4 {
orientation := m.Orientation()
if orientation > 4 && orientation <= 8 {
m.width = size.Height
m.height = size.Width
} else {