evanoberholster / imagemeta

Image Metadata (Exif and XMP) extraction for JPEG, HEIC, AVIF, TIFF and Camera Raw in golang. Focus is on providing features and improved performance.
MIT License
117 stars 12 forks source link

CRW Canon file support #1

Open matrixik opened 4 years ago

matrixik commented 4 years ago

Hello, thank you for creating this package, it's really useful for my small image renamer.

I found that it's not finding EXIF data in CRW image. Not sure how to read first bytes of files so I'm attaching this image.

CRW_1446.zip

I also found that Darktable have list of headers, maybe it will be useful for you:

https://github.com/darktable-org/darktable/blob/2e18924ffa35128da374e1608521c909260fe26d/src/common/imageio.c#L395-L451

evanoberholster commented 4 years ago

Thanks for opening up this issue and for your sample image. CRW images are not based on Tiff Directories, therefore they have a different directory structure.

See the link below for more information on the CRW file format. https://exiftool.org/canon_raw.html

It doesn't seem too complex of a structure to implement, unfortunately I can't dedicate time to implement this now.

I would welcome a PR if you would be willing to implement this.

evanoberholster commented 4 years ago

I add support for identifying the CRW image type: da0d587ed51c53fa25001343653309fa9cb71950

matrixik commented 4 years ago

I don't have time now for adding support for new formats but I found repository with RAW samples from many cameras on https://raw.pixls.us/

All are licensed with CC0 so could be used as test samples.