>>>>> Steinar Bang <[email protected]>: > But both those configs and nginx configs for serving static files > would kind of explode the size of a HOWTO for using oldalbum to fix > EXIF metadata for scanned files.
The thing is, oldalbum was written around the idea of "pointing to images served with HTTP from elsewhere" https://steinar.bang.priv.no/2022/02/12/1990-ies-picture-archives-in-modern-skin/ I wrote oldalbum for its original purpose back in 2020 (making a modern wrapper around old web picturees from the 1990-ies). Then for christmas 2022 I got an USB drive with slides from my childhood, that my dad finally had gotten around to scanning. But importing those images into various cloud web storages looked kind of silly, since they all were dated from the time of the scanning, i.e. sometime in 2022, rather than 1968 or 1971 or whenever the image was actually from. So I looked into how the web image services found the date of the pictures they imported, and that for JPEG (or actuallt "JFIF") files, there is something called EXIF metadata. https://en.wikipedia.org/wiki/Exif Basically all electronic cameras, on cell phones, and otherwise, write a lot of metadata as EXIF metadata in the JPEG files they store. Geographic location and date of the picture, are among them. https://www.canon.no/pro/infobank/all-about-exif/ I wanted something that would let me walk through the images, look at them, add a date and reorder the images to get them in the correct order. I looked at available image programs but found none that behaved the way I wanted to. If they had metadata editing there was too many mouse clicks to get at it and modify it, and also much of the metadata editing in the various applications had bugs. There is a very flexible command line tool called exiftool, that can read and modify all exif metadata in images. But it doesn't let you interactively flip through images to see what on them. https://exiftool.org But then I thought: I already had oldalbum which had the capability of navigating through an image collection. Maybe I could use oldalbum as a base for my own EXIF metadata manipulation tool...? oldalbum was written in Java, and run from inside karaf, so it would be nice to hava a pure Java solution. I remembered this talk from JavaZone 2015 https://2015.javazone.no/details.html?talk=9ed5444182c191fa43e5ef6a3dfe968cfcef9d5327b500f305aaf689a2be5a77 and I looked up TwelveMonkeys and it looked like it could do the job https://github.com/haraldk/TwelveMonkeys First hurdle was that TwelveMonkeys didn't support OSGi, and the second hurdle was that TwelveMonkeys consists of a set of ImageIO plugins, using an old Java plugin mechanism called SPI to start and register the plugins: https://www.baeldung.com/java-spi Luckily for me, I had run into SPI before, because I use liquibase to set up data base schemas, so I knew that there is something called Apache Aries SPIfly that can be used to make SPI work inside OSGi: https://aries.apache.org/documentation/modules/spi-fly.html So I offered to make the OSGi-ification changes to TwelveMonkeys and the changes were accepted: https://github.com/haraldk/TwelveMonkeys/issues/794 https://github.com/haraldk/TwelveMonkeys/issues/855 Once the OSGi changes were in place I could get to work on actually using TwelveMonkeys to sort and date the old places. I implemented the servlet streaming API so that downloading images would modify the downloaded image's metadata during download with new dates and title and description, leaving the original in place. I also implemented the possibility of downloading an entire image collection as a zip file, containing JPEG files with modified metadata. And then I thought "this may be useful for others" and back in November 2023, started on a blogpost that was to serve as a HOWTO for others. But the HOWTO sort of stranded on that oldalbum needs the original pictures to be served from an HTTP server, and that was hard to explain in the HOWTO without the HOWTO exploding in size, obscuring what it really is about which is fixing EXIF metadata in scanned images. In the last months I have done a bit of scanning myself and have been picking up the thread of writing the HOWTO on how to fix EXIF metadata. But the HOWTO is still blocked on how to simply provide someone on, say windows, a way of serving up the images that are to have their EXIF data fixed. > Hm... still thinking, but thanks for the pointers and heads up/reminder > on the resource serving. Maybe write a separata HOWTO blogpost first, on using karaf to serve a directory of static image files with HTTP? Still thinking?
