disintegration / imaging

Imaging is a simple image processing package for Go
MIT License
5.22k stars 433 forks source link

Support HEIF (.heic) files with AutoOrientation #157

Open mholt opened 1 year ago

mholt commented 1 year ago

Thanks for this package! It's really nice. Except that it doesn't seem to extract .heic EXIF data, so it can't get the Orientation. This is unfortunate for all iPhone users (of which I am not, currently, but I need to support this case, ha).

Looks like the package is hard-coded to validate and look for JPEG-specific structure. But even once I took that out, parsing a HEIC failed at this line.

I don't know much about parsing metadata. But would it be possible to use a package like github.com/evanoberholster/imagemeta so you don't have to re-invent the wheel of parsing EXIF data?

cruvie commented 1 year ago

Thanks for this package! It's really nice. Except that it doesn't seem to extract .heic EXIF data, so it can't get the Orientation. This is unfortunate for all iPhone users (of which I am not, currently, but I need to support this case, ha).

Looks like the package is hard-coded to validate and look for JPEG-specific structure. But even once I took that out, parsing a HEIC failed at this line.

I don't know much about parsing metadata. But would it be possible to use a package like github.com/evanoberholster/imagemeta so you don't have to re-invent the wheel of parsing EXIF data?

need too