Circuit Negma

C++, C, VB.NET, PCB, Electronics, Circuit Design

How to Remove Metadata

Posted by Circuit Negma on January 16, 2008

Source: Netzreport

If you want to remove metadata from JPEG files, you should keep in mind that these data can provide useful information (such as focal length, shutter speed, etc.). Therefore, you should never remove them from your original pictures. Instead, you should make a copy of the picture you want to publish and then remove the metadata from this copy.

Several software tools support the removal of metadata. A recommendable one is jhead. It is a free open source program that runs on a variety of operating systems (Windows/Linux/BSD/Mac). Because jhead is a command line tool, it is particularly suitable to be used with batch files.

Less experienced users should adhere to this step-by-step guide (Windows):

  1. Create the directory C:\jpeg.
  2. Copy all pictures whose metadata you want to remove to C:\jpeg.
  3. Download the program file jhead.exe to C:\jpeg.
  4. Click on “Start” and then “Execute…”.
  5. Windows 95/98/Me: Type and click on “OK”.
    Windows NT/2000/XP: Type cmd.exe and click on “OK”.
  6. Change to C:\jpeg. To do so, type the following (the words in brackets are instructions to be executed, not to be typed):
    c:  (press return)
    cd\  (press return)
    cd jpeg  (press return)
  7. To remove all metadata of all JPEG files in “C:\jpeg”, type:
    jhead -purejpg *  (press return)

If you prefer programs with a graphical user interface, you should try IrfanView. It is a free program for Windows that allows you to view and edit images. Besides IrfanView itself, you need the plug-in “Lossless JPG Transformations”. More detailed information about how to install this plug-in can be found on IrfanView’s homepage.

Less experienced users should stick to these instructions:

  1. Download IrfanView and its plug-ins and install them.
  2. Create the directory C:\jpeg.
  3. Copy all pictures whose metadata you want to remove to C:\jpeg.
  4. Start IrfanView. In its menu bar, click on “File” and then “Thumbnails”.
  5. A new window has opened. In its left column, select C:\jpeg. The right column will now show small preview images of all pictures of C:\jpeg.
  6. Select all pictures. To do so, click on “Options” in the menu bar of the new window and then “Select all”.
  7. In the same menu bar, click on “File”, “JPG Lossless Operations” and then “Lossless transformation with selected thumbs…”.
  8. A new window has opened. In the section “Transformation”, select “None (can be used for optimizing and cleaning)”.
  9. In the section “JPG APP marker options”, select “Clean all APP markers”.
  10. Finally, click on “Start”.



Why Should Metadata Be Removed?

If you intend to publish JPEG files on the Internet, you might want to remove all metadata to reduce the file size of the JPEG files. Depending on what kinds of metadata are stored in the file, the reduction can range between a few bytes and several kilobytes. For example, if you have a website with metered bandwidth or if you have visitors with dialup modems, you might be interested in saving as much bytes as possible.

Another reason why you might want to consider removing all metadata beforehand is that metadata can give away potentially sensitive information. This information can mean a thread to your privacy or to other legitimate interests (e. g. the interest of journalists to protect their sources). The following fictitious and real-life examples try to illustrate the problematic nature of metadata information:

  • Many digital cameras embed a small preview image (thumbnail) of the picture in the header of each JPEG file. This makes it possible to quickly browse the pictures. Not all image manipulation programs update this thumbnail along with the main picture. The consequence could be that an edited picture retains the original unmodified version of the picture as an Exif datum. In some cases, this may only be inconvenient; in other cases, this could create a significant information leak. For example, a supposedly anonymized picture of a person still shows his or her identity in the thumbnail. Another, more embarrassing example is the case of television personality Cat Schwartz (e.g. TechTV). Schwartz had published a photograph of herself on her personal blog. Because the program she had used to edit the picture did not update the thumbnail, the thumbnail revealed more nude facts than originally intended.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: