Metadata: Default to landscape orientation if value is invalid #1052
This commit is contained in:
parent
2d5c259a7f
commit
f326590bb6
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue