Skip to content
Snippets Groups Projects
Unverified Commit 58f23cd5 authored by Sorunome's avatar Sorunome
Browse files

assume no orientation on bad exif information

parent 9b3a141a
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,8 @@ func MakeThumbnail(src image.Image, method string, width int, height int) (image ...@@ -25,7 +25,8 @@ func MakeThumbnail(src image.Image, method string, width int, height int) (image
func IdentifyAndApplyOrientation(origBytes []byte, src image.Image) (image.Image, error) { func IdentifyAndApplyOrientation(origBytes []byte, src image.Image) (image.Image, error) {
orientation, err := util_exif.GetExifOrientation(ioutil.NopCloser(bytes.NewBuffer(origBytes))) orientation, err := util_exif.GetExifOrientation(ioutil.NopCloser(bytes.NewBuffer(origBytes)))
if err != nil { if err != nil {
return nil, err // assume no orientation if there was an error reading the exif header
orientation = nil
} }
result := src result := src
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment