remvee / exifr

EXIF Reader
https://remvee.github.io/exifr/
MIT License
489 stars 66 forks source link

IPTC and XMP #42

Closed sj26 closed 8 years ago

sj26 commented 8 years ago

EXIFR is great at reading exif, but that's only the beginning of photo metadata. To extract more, we need a deeper understanding of JPEG, so JPEG parsing has been changed quite a lot. IPTC parsing has been added, too, including value casting and basic string encoding support. Also added support for using the xmp_fixed gem to parse XMP data embedded in JPEGs.

I've removed the method_missing dispatch in favour of hash access. I'd love to rework the TIFF class to do so also. It might also be nice to vendor the XMP parser (it's not large) to remove a confusing gem dependency, and could give similar treatment. However, this is a major API change. If you're not keen on this please let me know. Alternately I could start a fork.

Thanks!

remvee commented 8 years ago

Thanks but I won't merge this. Yes, EXIF is just a tiny amount of information stored in an image but this library does just that. Otherwise I would have named it JpegInfoExtractorator or whatever. There's actually a lot of vendor specific information in EXIF too but I don't want to go that route. Too much work.

I will except pull request to facilitate integration for IPTC like I did for XMP. See the discussion in the #16 pull request.

Also note this library supports Ruby 1.8.7 and up, and will do so in the forseeable future.

sj26 commented 8 years ago

Thanks, I've extracted independent readers as iptcr and xmpr and will use image magick's convert to extract the segments.