Tweak, process and optimize your JPEGs with Jhead
Jhead is a free command line tool which crams a host of JPEG-tweaking power into its tiny 163KB executable.
The program can strip out all unnecessary metadata, reducing file size a little (occasionally, a lot), and maybe protecting your privacy.
If you’d like to be more selective then there are commands to delete individual sections of the header (IPTC, XMP, the comment field). Jhead can also extract comments from your JPGs to a file, replace them with custom text of your own, even transplant the Exif header from one image into one or more others.
There’s a command to save the thumbnails you’ll find in some JPEG headers. This might be useful if a JPEG is corrupted and you can’t view the main image, or you just need some thumbnails and don’t have any other tools to produce them.
None of this is particularly complicated to use. Jhead requires that you specify a command, then your target files, so for example this is how you’d strip out all the surplus metadata from a set of files:
jhead -purejpg c:\folder\*.jpg
Entering jhead -h at the command line provides a lot of detail on the available commands.
The program does have many plus points, though: it’s small, fast, has no dependencies, is well documented and (relatively) easy to use. If you regularly need to batch process JPEGs in this way then we’d give it a try.