Please, strip away copyrighted ICC profiles

Bug reports and enhancement requests
Post Reply
taffit
Posts: 6
Joined: Mon May 12, 2014 2:34 am

Please, strip away copyrighted ICC profiles

Post by taffit »

While searching for embedded non-free ICC profiles:

Code: Select all

	find . -regextype posix-extended -iregex '.*\.(jpg|png)' \
		-exec sh -c 'identify -verbose "$0" \
		| grep -i copyright && echo "$0"' {} \;
The following four files showed up:

flash16.png, flash32.png, somelight16.png and somelight32.png, inside skin/classic/noscript from chrome/noscript.jar.

The proposed alternative is to simply remove the embedded non-free and anyway useless ICC profiles:

Code: Select all

	exiftool -icc_profile"-<=" $files
It removes the 3144 B binary ICC profile from each file, making them a lot smaller in the process.

Thanks in advance for considering.
Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Iceweasel/29.0.1
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Please, strip away copyrighted ICC profiles

Post by Giorgio Maone »

Done, thanks.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
boardhead
Posts: 1
Joined: Mon May 12, 2014 2:34 pm

Re: Please, strip away copyrighted ICC profiles

Post by boardhead »

taffit wrote:While searching for embedded non-free ICC profiles:

Code: Select all

	exiftool -icc_profile"-<=" $files
The correct exiftool command is:

Code: Select all

exiftool -icc_profile= $files
The "-<=" operator is for conditionally deleting a tag if it matches the value in a specified file. I'm not sure why your command even worked with this operator.

- Phil
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.71 (KHTML, like Gecko) Version/6.1 Safari/537.71
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Please, strip away copyrighted ICC profiles

Post by Giorgio Maone »

boardhead wrote: The "-<=" operator is for conditionally deleting a tag if it matches the value in a specified file. I'm not sure why your command even worked with this operator.
It apparently worked for me, i.e. it stipped about 3KB away from those files while keeping them usable (I didn't check what data went away exactly, though).
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
Post Reply