January 6, 2008

Photography – Exif Tags

Filed under: TMUP-Blog — George Starcher @ 10:16 am

by: George Starcher, Associate Editor

I was catching up on Pauldotcom Security Weekly podcast episodes. Larry covered a nice tool on modifying and even scrubbing exif tags in image files. Exif is the Exchangeable image file format. You can read more on it over on Wikipedia (exif). But in essence a lot of information can be stored in the tags within images that you take with today’s digital devices and tools. If you listen to the episode of Pauldot Larry covers some history where a hacker’s identity was exposed by exif image information in PDC Episode 92.

Larry talked about ExifTool by Phil Harvey. A great command line tool that can modify the exif information. It can even clear it all out in one shot. Well for typical mac users I checked out the tool. And here is how you make an Automator action to scrub the exif data from any images you select. I will plan to do another post later making this into an AppleScript folder action. Then you’ll be able to just scrub images by dropping them into a dedicated folder.

Here is what you do:

  1. Download and install ExifTool by Phil Harvey. there is a OSX DMG with an installer.
  2. Open Automator: Add the Ask for Finder Items action, then the run Shell Script action.
  3. Here is the text you need to paste into the script text box:

    for f in “$@”
    do
    cd `dirname “$f”`
    name=`basename “$f”`
    exiftool -All= $name
    done

  4. Here is a screen shot of the Automator action:
  5. So that is all you have to do to set it up. Now all you have to do is run the automator, select the desired images and the exiftool will scrub the images. It will also rename a copy of each image adding _original to the filename of the copy.

    Here is an example of before and after exif information for one of my images.

  • Before Exif:

    ExifTool Version Number : 7.08
    File Name : IMG_2443.jpg
    Directory : .
    File Size : 1444 kB
    File Modification Date/Time : 2007:12:29 19:31:01
    File Type : JPEG
    MIME Type : image/jpeg
    JFIF Version : 1.2
    Exif Byte Order : Big-endian (Motorola)
    Software : Adobe Photoshop Elements 4.0.1 Macintosh
    Host Computer : Mac OS X 10.5.1
    Flash : Auto, Fired, Red-eye reduction
    User Comment :
    Compression : JPEG (old-style)
    Thumbnail Offset : 1140
    Thumbnail Length : 4447
    Displayed Units X : inches
    Displayed Units Y : inches
    Global Angle : 30
    Global Altitude : 30
    Copyright Flag : False
    Photoshop Thumbnail : (Binary data 4447 bytes, use -b option to extract)
    Photoshop Quality : 12
    Photoshop Format : Standard
    Progressive Scans : 3 Scans
    Orientation : Horizontal (normal)
    Y Cb Cr Positioning : Centered
    X Resolution : 72
    Y Resolution : 72
    Resolution Unit : inches
    Make : Canon
    Camera Model Name : Canon PowerShot S2 IS
    Modify Date : 2007:12:29 19:30:59-06:00
    Creator Tool : Adobe Photoshop Elements 4.0.1 Macintosh
    Create Date : 2007:12:25 10:19:38-06:00
    Metadata Date : 2007:12:29 19:30:59-06:00
    Exif Version : 0220
    Flashpix Version : 0100
    Color Space : Unknown (-1)
    Components Configuration : Y, Cb, Cr, .
    Compressed Bits Per Pixel : 5
    Exif Image Width : 2048
    Exif Image Height : 1536
    Date/Time Original : 2007:12:25 10:19:38-06:00
    Date/Time Digitized : 2007:12:25 10:19:38-06:00
    Exposure Time : 1/60
    F Number : 3.5
    Shutter Speed Value : 1/60
    Aperture Value : 3.5
    Exposure Compensation : 0
    Max Aperture Value : 3.5
    Metering Mode : Center-weighted average
    Flash Fired : True
    Flash Return : No return detection
    Flash Mode : Auto
    Flash Function : False
    Flash Red Eye Mode : True
    Focal Length : 45.2mm
    Focal Plane X Resolution : 9102.22222222222
    Focal Plane Y Resolution : 9142.85714285714
    Focal Plane Resolution Unit : inches
    Sensing Method : One-chip color area
    File Source : Digital Camera
    Custom Rendered : Normal
    Exposure Mode : Auto
    White Balance : Manual
    Digital Zoom Ratio : 1
    Scene Capture Type : Standard
    Native Digest : 36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;E2FE07EC68065108BEEC985345A86187
    Document ID : uuid:DF64CDADB7D511DCA426BF8A1828634F
    Instance ID : uuid:DF64CDAFB7D511DCA426BF8A1828634F
    Format : image/jpeg
    Color Mode : 3
    ICC Profile Name : Camera RGB Profile
    History :
    Profile CMM Type : appl
    Profile Version : 2.2.0
    Profile Class : Input Device Profile
    Color Space Data : RGB
    Profile Connection Space : XYZ
    Profile Date Time : 2003:07:01 00:00:00
    Profile File Signature : acsp
    Primary Platform : Apple Computer Inc.
    CMM Flags : Not Embedded, Independent
    Device Manufacturer : appl
    Device Model :
    Device Attributes : Reflective, Glossy, Positive, Color
    Rendering Intent : Perceptual
    Connection Space Illuminant : 0.9642 1 0.82491
    Profile Creator : appl
    Profile ID : 0
    Red Matrix Column : 0.45427 0.24263 0.01482
    Green Matrix Column : 0.35332 0.67441 0.09042
    Blue Matrix Column : 0.15662 0.08336 0.71953
    Media White Point : 0.95047 1 1.0891
    Chromatic Adaptation : 1.04788 0.02292 -0.0502 0.02957 0.99049 -0.01706 -0.00923 0.01508 0.75165
    Red Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
    Green Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
    Blue Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
    Profile Description : Camera RGB Profile
    Profile Copyright : Copyright 2003 Apple Computer Inc., all rights reserved.
    Profile Description ML : Camera RGB Profile
    DCT Encode Version : 100
    APP14 Flags 0 : [14]
    APP14 Flags 1 : (none)
    Color Transform : YCbCr
    Image Width : 2048
    Image Height : 1536
    Encoding Process : Baseline DCT, Huffman coding
    Bits Per Sample : 8
    Color Components : 3
    Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1)
    Aperture : 3.5
    Image Size : 2048×1536
    Scale Factor To 35mm Equivalent : 6.1
    Shutter Speed : 1/60
    Thumbnail Image : (Binary data 4447 bytes, use -b option to extract)
    Circle Of Confusion : 0.005 mm
    Field Of View : 7.5 deg
    Focal Length : 45.2mm (35mm equivalent: 274.2mm)
    Hyperfocal Distance : 117.85 m

  • After Exif:

    ExifTool Version Number : 7.08
    File Name : IMG_2443.jpg
    Directory : .
    File Size : 1408 kB
    File Modification Date/Time : 2008:01:06 12:11:12
    File Type : JPEG
    MIME Type : image/jpeg
    Image Width : 2048
    Image Height : 1536
    Encoding Process : Baseline DCT, Huffman coding
    Bits Per Sample : 8
    Color Components : 3
    Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1)
    Image Size : 2048×1536

Enjoy!

Like what you read or heard? Share and Enjoy:
  • digg
  • YahooMyWeb
  • Furl
  • del.icio.us
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl

View Comments Photography – Exif Tags »

  1. [...] Source and Read More: TypicalMacUser.com [...]

    Pingback by Photo News Today » Blog Archive » Photography - Exif Tags — January 7, 2008 @ 11:12 am

  2. [...] promised in the earlier blog post “Photography – Exif Tags” that I would look at how to make an automated folder action to scrub the exif information from any [...]

    Pingback by Typical Mac User Podcast » Photography - Exif Tag Scrubbing Folder Action — January 9, 2008 @ 6:04 am

  3. this doesn't work for me. I get run script encountered an error. Check the actionʼs properties and try running the workflow again. Have this set up exactly as you describe. Running 10.5.2 on MacPro 2.8. Tried it on a 16bitTiff and a JPEG. I need to scrub EXIF data for some scanned images. Any advise? Perhaps this doesn't work with new OSX not sure. Downloaded current version of EXIFtool.

    Comment by oren Rubinstein — March 9, 2008 @ 5:31 pm

  4. If you take the double quote marks out of the script it works on Leopard but it does break handling filenames with spaces in them. I am trying to figure it out.

    Comment by georgestarcher — February 5, 2009 @ 12:24 pm

  5. If you take the double quote marks out of the script it works on Leopard but it does break handling filenames with spaces in them. I am trying to figure it out.

    Comment by georgestarcher — February 5, 2009 @ 7:24 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

(required)

(required but not published)

blog comments powered by Disqus
 

January 2008
S M T W T F S
« Dec   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031