The following command will destroy the image data retaining just the metadata.
exiftool - -all= -tagsfromfile @ -all:all -unsafe <in.jpg >out.jpg
I use exiftool exclusively with piped data so this is a big problem for me. Can this be fixed, Phil?
You're right, that won't work. Interesting though. I'll have to think about this...
- Phil
This is the last piece to a puzzle I have worked on for over a year. I'm counting on you, Phil! :)
It was actually a bit tricky since I had to buffer the input in memory because this command reads the file twice, but I have something that seems to work now, but it needs more testing.
If you can run the Perl version, you can help with testing. I have uploaded a pre-release here (https://exiftool.org/Image-ExifTool-9.28p.tar.gz).
- Phil
There was ever a non-Perl version? This version seems to be working for me :)
Great, let me know if you have any problems.
The non-Perl version would be the Windows executable (which is really just a bundled Perl version).
- Phil
I have officially released version 9.28 now. There are substantial changes since the pre-release because I discovered some problems when combined with other options. There may still be some lingering problems if people try to do some obscure things (like using the -fileOrder option with stdin as the input, which doesn't make sense of course), but at least it should be better now than it was.
- Phil
OK Phil I will upgrade to the official release for production use! Do you anticipate any other issues when using the command outlined in the OP that I should look out for?
The original command you gave is quite simple (no extraneous options that may compete for the stdin/stdout streams), so it should be perfectly fine. The only potential issue is that this technique requires the entire file to be buffered in memory, so you need enough available memory to cover this.
- Phil