News for hackers. Stuff that matters.
Re:How to strip JPEG metadata in Ubuntu by ajray on Monday February 07, 2011 @03:53AM (#2188263)
Commented on the post as well.

EXIF isn't the only metadata in jpeg files. IPTC and other forms exist, so if you want to really make them clean make sure you get everything.

exiv2[0] can be used to do that. I have a script I use to remove all metadata from sensitive images I collect for research (UAV aerial photography) before posting).

[0]http://www.exiv2.org/

Re:How to strip JPEG metadata in Ubuntu by palish on Monday February 07, 2011 @05:02AM (#2188390)
What metadata is typically found in your sensitive images? What about images in general?

Camera model? Camera serial number? A link to the facebook page of the owner of the camera?

Re:How to strip JPEG metadata in Ubuntu by JonnieCache on Monday February 07, 2011 @06:10AM (#2188509)
GPS coords where the picture was taken seems likely.
Re:How to strip JPEG metadata in Ubuntu by chrisbroadfoot on Monday February 07, 2011 @07:40AM (#2188675)
Aren't those stored (only) in EXIF?
Re:How to strip JPEG metadata in Ubuntu by pbhjpbhj on Monday February 07, 2011 @10:52AM (#2189336)
exiv2 -d a *.jpg
Re:How to strip JPEG metadata in Ubuntu by JonnieCache on Monday February 07, 2011 @06:07AM (#2188502)
jpegtran has always given me good results in this area. It strips all metadata, not just EXIF, and it also losslessly optimises the compression to further reduce the filesize. Obviously this latter operation exacts a fair toll on the CPU. It can also do other wacky stuff like lossless scaling, cropping and rotation.

http://jpegclub.org/jpegtran/

    jpegtran -optimize -copy none -o outfile.jpg image.jpg
EDIT: recursive in-place optimization and stripping of all jpegs under current dir:

    find . -iname \*.jp*g -exec jpegtran -optimize -copy none -verbose -outfile {} {} \;
Re:How to strip JPEG metadata in Ubuntu by ZoFreX on Monday February 07, 2011 @08:33AM (#2188809)
If you want to share images online and mitigate risk, imgur [1] is a great image site for doing so, as it strips all metadata for you.

[1]: http://imgur.com

Re:How to strip JPEG metadata in Ubuntu by pavel_lishin on Monday February 07, 2011 @01:22PM (#2190016)
If it's that important, you probably shouldn't be trusting a third party at their word.
Re:How to strip JPEG metadata in Ubuntu by ZoFreX on Wednesday February 09, 2011 @08:26AM (#2197313)
Unless I intend on writing my own software to strip EXIF and geolocation data from JPEGs, at some point in the process I have to trust a third party. May as well be one under a lot of scrutiny!
Re:How to strip JPEG metadata in Ubuntu by petdog on Monday February 07, 2011 @05:01AM (#2188384)
jpegoptim --strip-all, also optimizes for size without degrading quality.
Re:How to strip JPEG metadata in Ubuntu by xlevus on Monday February 07, 2011 @05:03AM (#2188391)
doesn't

mogrify -strip *.jpg

work just as well?

Re:How to strip JPEG metadata in Ubuntu by code_duck on Monday February 07, 2011 @07:12AM (#2188613)
Last time I looked into this, mogrify will re-encode the image, resulting in a small loss of quality. jpegtrans and other tools will only remove the metadata without altering the image data.
Re:How to strip JPEG metadata in Ubuntu by code_duck on Monday February 07, 2011 @03:40PM (#2190613)
Hey somebody, if I'm wrong let us know the details, and when it was changed.
Re:How to strip JPEG metadata in Ubuntu by AbnormalGun on Monday February 07, 2011 @06:18AM (#2188530)
Personally, I've always used Jhead for this. It is available for Unix and Windows, and I also use it to rename my photos.

http://www.sentex.net/~mwandel/jhead/

Re:How to strip JPEG metadata in Ubuntu by burgerbrain on Monday February 07, 2011 @04:01AM (#2188280)
exiftool can be used in any distro, not just Ubuntu. Specifying ubuntu is just stupid linkbait.
Re:How to strip JPEG metadata in Ubuntu by coderdude on Monday February 07, 2011 @04:30AM (#2188335)
Given that he uses apt-get to install libimage-exiftool-perl I think the title is fine. It's not likely that Matt Cutts requires link bait titles to get clicks or votes anyway.
Re:How to strip JPEG metadata in Ubuntu by burgerbrain on Monday February 07, 2011 @11:46AM (#2189583)
The install line is completely unnecessary, nobody needs to be told how to install it. Make an article "how to install packages in ubuntu" if they do.
Re:How to strip JPEG metadata in Ubuntu by hackermom on Monday February 07, 2011 @09:59AM (#2189087)
Like others have noted, there is a lot more "extra" in the JPEG file format than just the EXIF segment. Colloquially, these segments are referred to as "APP" segments; EXIF being just one out of sixteen total APP segments, of which others include f.e. JPS data, thumbnail data and ICC color profile data, to name a few. I've been using this one for a few years: http://stolendata.net/~djinn/code/appexifstrip.c