Using a lua script which runs after export could be an option.
I create this script which calls the exiftool on the exported image with the selected argument.
I mainly use it to copy exif tags to IPTC. The option ‘all=’ should strip all metadata. The script get excuted before the image get moved to its final export destination. So it works for me with flickr export as well …
It would be ‘yet another tool’, but I wrote output parameters to do precisely that in my img command line program. I use it to make really small thumbnails like this:
This would batch-produce thumbnail images in a thumbs/ subdirectory.
The latest release downloads are here:
The Windows installers will install img and add it’s location to the PATH, if you use the AppImage, put it in your /usr/local/bin directory and make a symbolic link to it like this:
It should be, but given the state of the code that does it, it’s actually not as straightforward as it sounds, and that explains why this has never been done even if asked for many years.
It would be incredibly nice if all editing softwares and especially all raw processors would allow to not export exif/xmp/etc data (with the “comment” field apparently going under “etc”).
There is one bit of metadata that GIMP doesn’t (yet?) allow to automatically not export, and that’s the comment field. Apparently many file types have their own file-type-specific “comment” field, which I totally didn’t realize - I just always assumed there was one “comment” field that was part of exif data.
How GIMP currently handles the comment field does vary from one file type to another:
darktable currently puts in the comment field something like the following:
Developed using darktable 2.5.0+980~g06471ce73
@anon41087856 - would it be possible to put in darktable preferences the option to disable adding any content to comment fields? Or is this also inextricably intertwined with the rest of the exif and other metadata?
The output exif writing relies on a bunch of nested functions that are called several times since there are at least 2 variants of the output pipeline (TIFF and rest of the world if I recall). So one would have to unknit that thread first, then follow it to repercute the changes through several functions. That code is really unmaintainable. I tried, thinking it would be simple (deleting class properties should be easy), but I gave up after a few hours of treasure quest.
Hmm, well, maybe this won’t help in case some very brave person wants to tackle darktable handling of exif and other metadata. But maybe it will. Not too long ago it seems digiKam handling of metadata was completely revamped. The digiKam UI now provides the most granular handling of metadata I’ve ever seen, so possibly the digiKam metadata code might serve as a model or guide.
Normally I’ve been using the following exiftool command to remove all metadata before uploading images to the web. Or at least I thought I was removing all metadata:
exiftool -all= filename.extension
But checking a tif exported from GIMP with the darktable “comment” in it, after removing (I thought) all the metadata and checking to see what was left, the darktable “comment” - which is actually written to “ImageDescription” field at least for tiffs - was left behind:
Notice some of the metadata can’t actually be removed and that’s OK, it’s used to identify the file type and such.
But the “ImageDescription” tag (that says "Developed using darktable . . . " shouldn’t be one of these non-removeable tags, it seems to me. And the tag really can be removed using exiftool, like this:
exiftool -ImageDescription= comment-test.tif
Anyone using exiv2 or exiftool and lua to remove tags, it might be good to check to see what all is left behind, that you might actually want to remove. All these years of using exiftool to strip metadata, and I had no idea the “ImageDescription” tag was being left behind, if some software had actually written to this field.
FWIW, the exif “ImageDescription” tag is supposed to actually be the title of the image, though sometimes it’s used as a place to put comments.
If this tag is already filled by an actual image description, I wonder what darktable does - does it overwrite the existing text? Add to the existing text?
About this lua script thing for removing unwanted metadata:
When using GIMP to open a raw file using the darktable plug-in, can a lua script be used to remove all the unwanted metadata - during the process of interpolating the raw file and passing the resulting image file to GIMP - so the metadata never gets to GIMP in the first place?
If yes, how? step by step please! Again, the goal is having the image transferred from darktable to GIMP via the darktable GIMP plug-in, with the unwanted metadata already removed.
I found this (https://trimage.org/) little program in the ubuntu-studio repository!
It batch removes exif data and compresses the files!
I didn’t find any settings to play with?
But it seems to do the job
Wrote to the Trimage project to suggest tweeking features.
This is the responce i got back:
Trimage has no configuration options. If you want to manually tweak the
settings it’s best to use the underlying command line applications, as
they offer more flexibility.
Best,
Kilian"
So it seems like tweeking is posible, just without gui!
Anyway for batch exif removal for non printable images, it gets the job done, at least for me