Thursday, January 31, 2013

How To Remove Metadata From Images (jpeg, png...)

Along a year I am requested to referee a certain number of scientific papers. Referees are usually anonymous in order to be free to make every necessary observation without incurring in the wrath of the authors. In many cases it is not necessary to include figures in the review report, but sometimes it is. Now, as it happens, many image formats (jpeg in primis) include every possible kind of metadata, and among them it is often possible to find the name of the image author depending on the editing software. The same applies if you take a picture with a digital camera: the metadata might contain technical details about the pictures (exposure time, aperture...), but also your location and again, even your name.

In order to preserve my anonymity as a referee, I began the search for a Linux program with the ability to manipulate image metadata. Long story short, I found Exiv2, a wonderful command line tool which can manipulate Exif, IPTC and XMP metadata.

Here is an example to list all the metadata of one of my favourite wallpapers:

exiv2 -pa pr Hokusai-Katsushika-Wallpaper-21.jpg


All the metadata are cleaned by a simple:

exiv2 -da rm Hokusai-Katsushika-Wallpaper-21.jpg 


As you can see, no metadata are left and your privacy is hopefully safe.

Another One Bite To Tux

Hi There! I happen to use Linux all day long for my research work (I am a physics post-doc). In the case I find a bit of interesting information I will post it here to remind it myself, with the hope that someone else might find it useful too. Happy Computing!

Giovanni