mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Use exiffix rather than imaging to handle EXIF rotation
exiffix works for more formats than just JPEG
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"kitty/tools/utils/shm"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/edwvee/exiffix"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
@@ -109,7 +110,7 @@ func scale_image(imgd *image_data) bool {
|
||||
}
|
||||
|
||||
func load_one_frame_image(imgd *image_data, src *opened_input) (img image.Image, err error) {
|
||||
img, err = imaging.Decode(src.file, imaging.AutoOrientation(true))
|
||||
img, _, err = exiffix.Decode(src.file)
|
||||
src.Rewind()
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user