[ad code=4 align=center]
Do you have a smart-phone (or a modern camera with GPS)? Do you take pics with it? Do you ever upload them on the internet (social networking, tweeting, forums, email) or text them? Well did you know there is (probably*) hidden data in those pics that anyone could use to track your location. Scary isn’t it?! The hidden data is referred to as EXIF (or sometimes just Meta-data) and contains information like the camera make and model, the image dimensions, and yes: GPS coordinates…
I knew about this (at least to some extent), but I didn’t realize how easy it was for any individual to access that data and use it to track you down, until today. Take a look at this video:
So what to do now?!
- Well, if you’re worried about pictures you’ve already uploaded, you might consider trying to remove them or at least try to change the privacy settings to try to limit who has access to these photos.
- The next step would be to disable the geotagging feature of your camera (on the iPhone open Settings and go to “General->Location Services” and turn the Camera toggle off) so that no more GPS data will be tagged on the pics.
- Finally it’s time to remove the GPS data from existing pictures, I’ll show you how to do that next…
Removing GPS Data (Geotags) From Pictures
I’m going to show you the FREE way, but keep in mind if this scares you (we’re going to use the command line), then there are other options out there (but I don’t have time to find them for you, sorry… the command line / terminal isn’t that scary, really)…
Step 1: Install Jhead
Get Jhead and install it on your computer. It is available for Linux, Mac, Windows and even FreeBSD.
If you are using Ubuntu you can get it straight from the repositories using this command:
sudo apt-get install jhead
Otherwise you will need to see the “releases” section on the main page: http://www.sentex.net/~mwandel/jhead/
(Note: if you installed it from the repos on Ubuntu, you can skip to the next step)
This is a command line program, there is no GUI (no point-click, no pretty pictures or icons, etc.), so you need to make it easy to access and use.
Mac OS X
If it goes anything like my download did, it might have a “.txt” extension on the end, and it will be in your Downloads folder. Do whatever you like, but I moved mine to a folder I use for command line utilities like this: /Applications/Utilities/NoGUI/ is my directory of choice. Assuming your situation is like mine, here are the commands to make the file executable, rename it, and move it to that destination:
//Open Terminal, defaults to your Home (user directory)
chmod +x Downloads/jhead.txt && mv Downloads/jhead.txt /Applications/Utilities/NoGUI/jhead
note: if you get an error about there being no such directory, then it’s because you don’t have a NoGUI folder yet, so make one like this:
now it’s not going to be much fun typing out: /Applications/Utilities/NoGUI/jhead every time you want to run the command… so let’s make an alias to simplify things. I’m going to assume you don’t have an alias for your text editor of choice yet, and I’m also going to assume you don’t care for command line / terminal editors like Vi, Vim, Nano, or Emacs, so we’ll do it the ugly way once, then we’ll go ahead and create a alias to the TextEdit as well to make this easier for you in the future.
In your terminal… you should still be at your Home (user)… run the following to backup your bash profile and open the profile (not the backup) in TextEdit:
cp .profile .profile.backup
Now, go to the bottom of the file and on a new line enter the following lines:
alias supertext='sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit'
Now Save and Quit. You should now be back at the terminal. Now Quit Terminal and then Open it again. When it reopens you the new aliases should have loaded. To be sure type:
alias and if it worked you will see all available aliases listed in the output. Now you can skip to Step 2.
I haven’t tested this on Windows, but there is an executable listed on the page so download it and put it in the root directory of your C: drive. If you want to set up an “alias” for it on Windows, you could try making an environment variable/path for it using the info found here. But for the rest of this guide, I’m just going to assume you put “jhead.exe” in “C:\” so for all of the commands below you will navigate to the directory where your photos are and then will run “C:\jhead.exe ” followed by the rest of the command, the path to the image will stay relative to your current directory.
Linux (other than Ubuntu)
I’ll update this later if I have time… but for now I’ll just have to assume you know how to install things on your own distribution or at least know how to look it up. Sorry.
Step 2: Remove/Modify EXIF Data From Pics
Locate the files you want to modify and then navigate there in your terminal or command prompt. (use Terminal in Linux or Mac, and use Command Prompt — cmd.exe — in Windows).
Once you have changed directory (
in case you forgot how and you can use
ls in Linux/Mac or
DIR in Windows to list the files in that directory if you want) and then test the Jhead installation and alias by testing on a photo:
If it works you will see some output like this:
File name : somePhoto.jpg
File size : 244792 bytes
File date : 2010:06:23 03:12:16
Camera make : Apple
Camera model : iPhone
Date/Time : 2009:11:13 09:30:18
Resolution : 1200 x 1600
Aperture : f/2.8
GPS Latitude : N 00d 00.00m 0s
GPS Longitude: W 00d 00.00m 0s
======= IPTC data: =======
City : G
Record vers. : 2
Object Name : IMG_0004
Now, obviously I changed the GPS data for this example… But it’s definitely there… for now!
Please note: All of the following commands are for BATCH processing (doing multiple files at once). You may need to change the extension from “.jpg” to “.JPG” depending on your operating system and the way your files are named. As far as I know Jhead only works with jpg/JPG/jpeg/JPEG files.
If you only want to process one image at a time, just substitute the file name of that image for the “*.jpg”
Here’s the code to remove the stuff we don’t want/need
To remove the EXIF/GPS data (but keep basic info like pic size and date/time) use this:
//for Mac or Linux
jhead -mkexif *.jpg
C:\jhead.exe -mkexif *.jpg
To remove do the same as above AND add your own comment use this:
jhead -mkexif -cl 'Your Comment Goes Here - and Keep the Single Quotes!' *.jpg
C:\jhead.exe -mkexif -cl 'Your Comment Goes Here - and Keep the Single Quotes!' *.jpg
If you want to remove EVERYTHING you can and leave just the bare-minimum to display the image, use the following:
//for Mac or Linux
jhead -purejpg *.jpg
C:\jhead.exe -purejpg *.jpg
If you are interested in other options to use with Jhead, see the full list here: http://www.sentex.net/~mwandel/jhead/usage.html
And that’s all folks!
If you have questions or run into problems, please feel free to comment below or contact me via one of the other methods listed on the Contact Page. Thanks!
[ad code=5 align=center]