-1
\$\begingroup\$

I'm looking for a way to get rid of ALL metadata associated with an image. What should I do?

\$\endgroup\$
2
  • \$\begingroup\$ I consider the tags pools of thought that have something to offer. \$\endgroup\$ Commented Mar 5, 2014 at 22:23
  • \$\begingroup\$ Actually, that one is better... \$\endgroup\$ Commented Mar 5, 2014 at 22:52

3 Answers 3

1
\$\begingroup\$

A big-hammer approach is jhead's -purejpg option, which, according to the documentation:

Deletes all JPEG sections that aren’t necessary for rendering the image. Strips any metadata that various applications may have left in the image.

This is a cross-platform (Mac, Linux, Windows) command-line program. For example, if you want to remove metadata from a file named "image.jpg" in the current directory, you would run

jhead -purejpg image.jpg 

and that is all there is to it.

\$\endgroup\$
6
  • \$\begingroup\$ Define "big-hammer", please. I vote for mattdm so far, namely because of your other accounts. \$\endgroup\$ Commented Mar 5, 2014 at 22:43
  • \$\begingroup\$ Hey, mattdm, how do I install this in the terminal? \$\endgroup\$ Commented Mar 5, 2014 at 22:45
  • \$\begingroup\$ @user3333975 Depends on your operating system. On Fedora, sudo yum install jhead. On Ubuntu or Debian, sudo apt-get install jhead. On Mac or Windows, you download them from the web site above and put them in your $PATH. If you don't know how to do that, this becomes a question for superuser.com :) \$\endgroup\$
    – mattdm
    Commented Mar 5, 2014 at 22:47
  • 1
    \$\begingroup\$ Big hammer: it's not very smart and doesn't give you any fine control,but it will definitely smash the metadata. \$\endgroup\$
    – mattdm
    Commented Mar 5, 2014 at 22:48
  • \$\begingroup\$ I see... Well, never mind about the terminal; I've got it. \$\endgroup\$ Commented Mar 5, 2014 at 22:48
0
\$\begingroup\$

Exiftool is able to do this using the -ALL= (see the linked documentation). You can apply better control on this, however, and I would recommend that instead of just deleting all metadata. If you're looking to remove the location information, for example, just use some pattern matching.

\$\endgroup\$
1
  • \$\begingroup\$ Oh, no, I want all the data stripped, but yeah I get you with the regex that's easy enough to do if I just pipe it like this or something: exiftool img.jpg | tr 'MASTER PATTERN' '\.' \$\endgroup\$ Commented Mar 5, 2014 at 22:40
0
\$\begingroup\$

I use jpegoptim for stripping metadata:
jpegoptim --strip-all filename

You could also open the image with Gimp and save it without the metadata.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.