mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
Use exiffix rather than imaging to handle EXIF rotation
exiffix works for more formats than just JPEG
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"kitty/tools/utils/shm"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/edwvee/exiffix"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
@@ -254,7 +255,7 @@ func OpenNativeImageFromReader(f io.ReadSeeker) (ans *ImageData, err error) {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
img, err := imaging.Decode(f, imaging.AutoOrientation(true))
|
||||
img, _, err := exiffix.Decode(f)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user