Archive for August, 2010

Improved GPS removal

Friday, August 13th, 2010

I recently posted about a way to remove the GPS information from pictures. I wrote a script that will retain the Date/Time information. It requires jhead.
# Will remove non-essential EXIF from a jpeg
# while retaining Date/Time value. I use it to
# remove GPS information from pictures I
# want to put on the internet.
# Created Wed Aug 11 18:43:03 PDT 2010
# For handling spaces. See:
IFS=$(echo -en "\n\b")
for img in $@; do
    echo Working on "$img"
    # Grab the original date/time
    DT=`jhead "$img"|grep 'Date/Time'`
    # Current format: " Date/Time : yyyy:mm:dd hh:mm:ss"
    # jhead requires: yyyy:mm:dd-hh:mm:ss
    # Strip non-essential information
    jhead -purejpg "$img"
    # Put the date/time back
    jhead -mkexif -ts$DT "$img"

It accepts image files as arguments. You can pass as many or as few as you feel like. If you’re interested in keeping other non-essential exif data, you might want to look into the jhead argument “-te”.

Removing GPS data from an image

Wednesday, August 11th, 2010

I constantly forget how to remove the geotags from my pictures before I put them on the internet. Here’s an imperfect way to do so:
jhead -purejpg /path/to/image.jpg

This will get rid of timestamps and other ancillary information that you may want to keep attached to the image. It seems like it would be pretty simple to write a script that uses jhead with no arguments to grab the Date/Time field, then run it again with -purejpg to remove all extraneous data, then run it a third time with the appropriate arguments to re-set the Date/Time field.

Intermittent server outages

Saturday, August 7th, 2010

I noticed while I was in Portland last week that the server was down. When I got home, I discovered that the UPS was off. I pushed the button and turned it back on.

A day or two later, it was off again. I eventually figured out what it was:

Likes to sit on the UPS The newest family member. Likes to swat at Penny

The causes of the outages

Penny likes to sit atop the UPS. The newest member of our family likes to swat at Penny. Apparently, sometimes she hits the UPS power button instead.

I taped some cardboard over the button. I do not anticipate any further outages.

Penny investigates the addition, no doubt contemplating how to H@X0R her way around it.