Initial Query -- EXIF data extraction from images?

104 views
Skip to first unread message

@TiddlyTweeter

unread,
Oct 17, 2018, 1:53:46 PM10/17/18
to tiddl...@googlegroups.com
I have a long term project to showcase 4000 images of paintings made by children of Bonfire Night (a great UK festival held on the 5th of November).

I already figured out how to show them without them ever having Tiddlers in TW (too many to do one by one). Showing is done using numbers generated between 0 & 3999 rather than calling on individual Tiddlers. It works.

The remaining issue is meta data that is held in the image files as EXIF data. And that is my concern here.

I'm wondering if anyone knows of a way to extract EXIF data from image files using TW?

The great advantage of EXIF is that every image caries with it its own data record (like: description, date shot, and any details I add) so there is no need for a second external set of documentation or database. Being able to access EXIF data in images loaded into TW would keep it very lightweight and efficient for large galleries of images--whilst providing useful displayable information.

This is just an initial query to see if anyone here may have understanding of what I am getting at.

Any tips appreciated.

Best wishes
Josiah

Mark S.

unread,
Oct 17, 2018, 4:43:57 PM10/17/18
to TiddlyWiki
Until someone with the answer shows up, a few questions.

What information are you storing in the TW (if not EXIF, then what?) ?

Is this being served up via Bob, or single-file?

I'm sure there are tools for extracting and making files from EXIF data (DigiKam will make sidecars, for instance). So if you had 4000 exif files, it should be possible to make 4000 tid files that could then be either combined or linked to existing image tiddlers.

-- Mark

@TiddlyTweeter

unread,
Oct 17, 2018, 5:19:05 PM10/17/18
to tiddl...@googlegroups.com
In the TW nothing at all for the images:-) They are presented by simply generating a random number in the range 0000 to 3999. All the files are numbered like "fw_1234.jpg" and presented one at a time. It works for that app as they are simply a vast set of images so no persistent tiddlers are needed. I do intend to add ability to add favourites  eventually, but that would simply be a list of pointers to external files. I aim to use EXIF without creating 4000 Tiddlers or any external lists. If I wanted I could do that already simply extracting the EXIF to spreadsheet and importing them.Its that I'm trying to avoid. I'm hoping, if I can figure it out, how to use embedded EXIF data in images dynamically only when showing the image. It won't persist beyond that as it would not be needed.

Hope this is clear!

Josiah

Mark S.

unread,
Oct 17, 2018, 5:31:54 PM10/17/18
to TiddlyWiki
You didn't mention if it was node or static file.

The reason I ask is because, as you have mentioned, you can call scripts from Bob. So I was just thinking that it might be possible to call a script on the fly that would extract the data as needed. But that wouldn't be possible from a stand-alone TW file.

There is a plugin for FF that presents EXIF data.

-- Mark

On Wednesday, October 17, 2018 at 2:19:05 PM UTC-7, @TiddlyTweeter wrote:
In the TW nothing at all for the images:-) They are presented by simply generating a random number in the range 0000 and 3999. All the files are numbered like "fw_1234.jpg" and presented one at a time. It works for that app as they are simply a vast set of images so no persistent tiddlers are needed. I do intend to add ability to add favourites  eventually, but that would simply be a list of pointers to external files. I aim to use EXIF without creating 4000 Tiddlers or any external lists. If I wanted I could do that already simply extracting the EXIF to spreadsheet and importing them.Its that I'm trying to avoid. I'm hoping, if I can figure it out, how to use embedded EXIF data in images dynamically only when showing the image. It won't persist beyond that as it would not be needed.

@TiddlyTweeter

unread,
Oct 17, 2018, 5:44:37 PM10/17/18
to TiddlyWiki
The end aim here is single file stand alone. Thanks for the note of an FF add-on for EXIF. I'll take a look. There are EXIF tools and extractors on Github. I need study them more to even guess what might work.

-- J.

TonyM

unread,
Oct 17, 2018, 9:06:35 PM10/17/18
to TiddlyWiki
Josiah et al

I imagine there would be a JavaScript solution somewhere that extracts exif information from images. Ideally if someone could turn it into a TiddlyWiki plugin it would help. The design would need to allow both extracting the exif data from external as well as tiddler based images.

I discovered in the past it was possible to import images from a mobile phone camera or gallery into a Android based TiddlyWiki (I do not currently recall how), which could be used to capture and document an image, later exporting it to a repository where a tiddler may be retained for describing it, but the image moved outside the wiki. This would be very good if the exif, and geolocation data could be imported into a tiddler, perhaps even with a thumb nail link to the external file. Using a recent Geolocation plugin you could show images near me.

In your case the import exif data may not be such a chore or excessive space as you think. Say you had 1KB of exif data per image and 4000 images this is only 4MB which is acceptable for a single function tiddlywiki. And once you have tiddlers for each image you have the power to tag and manipulate in other ways.

Interesting work Josiah

Regards
Tony

Mark S.

unread,
Oct 17, 2018, 10:52:12 PM10/17/18
to TiddlyWiki
Sure enough, you can find one with the first google search (called, surprisingly, EXIF.js).

But it wants as input an image element from the DOM. Can you get that in TW ?

I too am puzzled why you would need/want the TW file to be nearly empty. The information is not going to be searchable , if that is a goal, unless it is loaded in the TW.

-- Mark

PMario

unread,
Oct 18, 2018, 6:10:01 AM10/18/18
to TiddlyWiki
On Thursday, October 18, 2018 at 4:52:12 AM UTC+2, Mark S. wrote:
Sure enough, you can find one with the first google search (called, surprisingly, EXIF.js).

IMO exif.js contains all the functionality, that is needed to extract the different values.

One problem I see is, that the value description is hard-coded english language. For a TW plugin, we would want that to be translatable.
 
But it wants as input an image element from the DOM. Can you get that in TW ?

That's a point. Especially, since TW uses the DOM src-element if an image is imported with _cannonical_uri. .. This means: all the work is done by the browser, when it shows the image. TW does almost nothing with the image data. ... So we would need a way, to extract the exif data, after the browser did load / show the image.
 
I too am puzzled why you would need/want the TW file to be nearly empty.

I think, that's obvious. All the image related data can be stored and distributed with the image. TiddlyWiki is "just" the app, that lets you have a nice presentation of this data. ... I do like the idea.
 
The information is not going to be searchable , if that is a goal, unless it is loaded in the TW.

That's right.

-m

@TiddlyTweeter

unread,
Oct 18, 2018, 6:16:23 AM10/18/18
to tiddl...@googlegroups.com
Thanks TonyM & Mark S. for prod to extract some EXIF data to the TW.

My focus, I think, simply comes from work on photographs in Adobe Lightroom. It uses embedded data directly to organise its entire non-destructive editing system.

So part of it is a kind of mindset *I* have about EXIF outside TW. Why bother importing it?

On reflection, for the use case, you may be right in that it may be better to have the basic EXIF data in the TW. There could also be some benefits for the user--like being able to export all the meta data without the end user needing specialised software to do so.

FWIW, I'm now thinking of extracting all the needed metadata into a single data-tiddler, with each line an array for each image and with the child painter's details, i.e.: Image-File-Number: Name, Age, School, Gender, Year.

I'll give it a go and see.

Thanks, Josiah


Mark S. wrote:
I too am puzzled why you would need/want the TW file to be nearly empty. The information is not going to be searchable , if that is a goal, unless it is loaded in the TW.

@TiddlyTweeter

unread,
Oct 18, 2018, 6:44:12 AM10/18/18
to TiddlyWiki
Thanks PMario & Mark S.

Very useful thread for me. Very clarifying.

Mark S.

I too am puzzled why you would need/want the TW file to be nearly empty.

PMario...

I think, that's obvious. All the image related data can be stored and distributed with the image. TiddlyWiki is "just" the app, that lets you have a nice presentation of this data. ... I do like the idea.

I do think there is merit is using TW as a minimalist "shell" for some uses. I think this is an example where it could be appropriate.

My starting idea was that I want the image meta-data handing to be done dynamically via a plugin. Partly this was, as PMario, you understood, so I can concentrate in the TW on getting the visual presentation right. It really is not necessary that you have 4,000 individual tiddlers. What could be good is when a specific dynamically shown image is interesting you can favourite it and in that case create a tiddler for it.

My main technical issue is I can't program Javascript. I maybe could work out, with a bit of help, porting some JS based EXIF extractor IF I knew it were not in conflict with TW's way of working. There are several. I look at them a bit more and see where I get.

Where I am: Two possible routes: minimal image data extracted to TW; or, plugin based dynamic EXIF extraction.

Both look workable.

Thanks
Josiah
Reply all
Reply to author
Forward
0 new messages