Supporting auto rotate for HEIF/HEIC images.

This commit is contained in:
Jeremy Gordon 2019-10-25 10:48:16 -07:00 committed by Paul van Santen
parent f9eadf55bb
commit 474300f17e
No known key found for this signature in database
GPG key ID: AD10F40CB69516B6

View file

@ -39,8 +39,8 @@ func resizer(buf []byte, o Options) ([]byte, error) {
return nil, err
}
// If JPEG image, retrieve the buffer
if rotated && imageType == JPEG && !o.NoAutoRotate {
// If JPEG or HEIF image, retrieve the buffer
if rotated && (imageType == JPEG || imageType == HEIF) && !o.NoAutoRotate {
buf, err = getImageBuffer(image)
if err != nil {
return nil, err