imgbrd-grabber
imgbrd-grabber copied to clipboard
Notice: Grabber is visibly altering image color profiles when "Clear existing metadata" is enabled.
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 and exiftool -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 tested exiftool -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
- OS: [MacOS 14.4]
- Grabber version: [7.12.2 x86]