In preparation for publishing my post about setting up a USB RAID box I wanted to strip the metadata (mainly GPS location) from the photos I took while setting it up, before publishing them publicly on this blog. Fortunately ImageMagick makes this easy.

To display the metadata, the identify command can be used:

identify -verbose *.png

To clean (remove) the meta data, the mogrify command can be used - but be warned, it will strip orientation information (particularly relevant for mobile phone cameras):

mogrify -strip *.png

If you want to rotate images, before destroying the rotation metadata, mogrify can again be used:

mogrify -auto-orient *.png