Open user0382906 opened 6 months ago
This thread in the exiftool forms discusses the topic Recommended "safe" option to strip metatdata? where the solution to preserving color profiles appears to be
exiftool -all= --icc_profile:all -tagsfromfile @ -colorspacetags file.jpg
see FAQ. 32 for more info. This does erase all metadata while preserving the color profile for me in MacOS terminal.
This could probably be added as an option like Keep color profile when possible
to select just below Clear existing metadata
.
Perhaps, but people should be aware that there is no "safe" way to delete all metadata, because there is no metadata standard. The creator of exiftool has said this repeatedly in the forums, and that's why "safe" is in quotation marks. You would still be deleting or changing image resolutions and other technical information. I don't think there would be a visual difference, but the metadata would be wrong. I read in the forums that if you delete the DPI it gets replaced with the "standard value" which might not be the true value of the image. That's why I also posted a code below which should preserve more technical info according to their user forms, but I'm not an exiftool expert or anything so maybe the "safe" way is still best.
It makes no difference to me what everyone one wants to do. I think the feature is too risky for me to personally use. I just wanted to post a warning because I downloaded a few GB's before I realized what was happening and had to delete everything. 😄
Bug description
I'm not sure if this is technically a "bug report" or if the software is functioning as intended, but I figured I'd post a warning to raise awareness.
I noticed the error
[Warning] [Exiftool] Warning: ICC_Profile deleted. Image colors may be affected -
appearing in the log when "Clear existing metadata" was enabled in settings. I went thru and checked a few images and found that in some cases (not all) Grabber was visibly altering the color profile of downloaded images.Note: Every monitor will display this change differently it might be harder to notice the differences on older tech.
Examples:
Note: Download the original image the sample image also has an altered color profile. The original Color profile is Display P3 and is being changed to sRGB IEC61966-2.1 . The most noticeable change is the reds being dulled.
https://safebooru.org/index.php?page=post&s=view&id=3769258 md5:0bff5c4564e6c93efb73df415b532cc7
https://safebooru.org/index.php?page=post&s=view&id=4432730 md5:de3c9cc4c549db4e47072e325f0b6564
There was another less "safe" image that had its color profile changed from Adobe RGB (1998) to RGB, which produced a grey hue over the entire image.
Possible Solution? I am not very profecent with code or exiftool myself and I don't really know how the "Clear existing metadata" feature works. I did see
-all=
in the commit fix #3114 andexiftool -all= -overwrite_original 'DIR'
seems to produce similar results.This thread in the exiftool forms discusses the topic Recommended "safe" option to strip metatdata? where the solution to preserving color profiles appears to be
exiftool -all= --icc_profile:all -tagsfromfile @ -colorspacetags file.jpg
see FAQ. 32 for more info. This does erase all metadata while preserving the color profile for me in MacOS terminal.This thread also discusses how exiftool changes resolutions (this is also happening in Grabber when you delete metadata). DPI Changed
Perhaps a safer solution might be to use something like
exiftool -all= --icc_profile:all --jfif:all -tagsfromfile @ -colorspacetags -photoshop:all -orientation
could be used. I testedexiftool -all= --icc_profile:all --jfif:all -tagsfromfile @ -colorspacetags -photoshop:all -orientation -overwrite_original -r 'Dir'
in Terminal with some success. Of course the resolution can be stored in multiple locations, and this doesn't always work. It still gets deleted from Tiff and General (in macOS Preview may have different names in other programs).I know clearing "all" metadata was a requested feature #3114, but I don't think the average person really knows what "Clear existing metadata" means, and a lot of future problems could be solved by placing a warning on the feature. I know I personally never would have guessed that deleting an image's metadata could change its appearance without having wasted several hours in exiftool's forum first.
Thanks
System information