Over in the thread on lightboxes, interest has been expressed in having access to image metadata (EXIF and perhaps XMP and IPTC?) in TiddlyWiki.
A quick search came up with three libraries that might be useful towards this end:
- https://github.com/exif-js/exif-js
- https://github.com/mattiasw/ExifReader
- https://github.com/hMatoba/piexifjs
Of these, only piexifjs allows modifying the metadata as well, and actually seems like it would be very straightforward to implement for embedded (binary) image tiddlers as it works with base64 data. This might make a good beginner project for someone.
exif-js might be easier to get working with non embedded images - it seems to work with any image being displayed - but can only read metadata not modify it. Furthermore having to display every image to retrieve their metadata and then potentially filter based on it may not be ideal.
Is anyone aware of other libraries that are worth consideration?
What isn’t clear and would be helpful is knowing the potential use cases for metadata access. Some user stories or scenarios would be very helpful here.
Off the top of my head some unanswered questions are:
- embedded images, external images on a local drive, or remote online images? In particular external images on a local drive might be difficult to work with.
- a one time extraction of image metadata, or an extraction on demand when display an image?