While languishing in a series of hospitals and rehab centers recovering from a bad fall I have been amusing myself by taking iPhone pictures and posting them to SmugMug with SmugShot.
SmugShot is a nifty little iPhone app that uploads iPhone pictures and videos directly to your SmugMug galleries. SmugShot is a freebie so I cannot, in good faith, whine about missing features but SmugShot has one serious deficiency: it strips EXIF timestamps. Native iPhone jpegs contain EXIF timestamps but after passing through SmugShot only GPS information survives. I am not sure if this is by design or oversight but I don’t like it!
The fix is straight forward:
Download SmugMug metadata.
Download all SmugShot pictures.
Match pictures with metadata and use upload timestamps as date taken EXIF timestamps.
Finally replace the uploaded SmugShot images with the EXIF repaired versions.
Simple but tedious. The following J word manipulates Phil Harvey’s superb command line utility exiftool to cleanup the SmugShot metadata mess. The words used by smugshotexif are in the J script SmugShotFix.ijs. Let’s hope the next version of SmugShot fixes the date time issue and hacks like this will no longer be necessary.
smugshotexif=:4 : 0NB.*smugshotexif v-- inserts missing EXIF metadata in SmugShotNB. iPhone uploads.NB.NB. The iPhone SmugShot app removes EXIF information duringNB. upload. This verb restores items I care about.NB.NB. dyad: btclSmugMetaData smugshotexif clPathFileNB.NB. NB. update TAB delimited SmugMug metadata tablesNB. SmugTablesFrXml2 'c:\pd\docs\smugmug\data\smugheavy.xml'NB.NB. NB. load SmugShot specific metadataNB. SMUGSHOTMD=: readsmugshots 0NB.NB. SMUGSHOTMD smugshotexif 'c:\pictures\2011\Missouri\wip\1204618219_smugshot_9811805.jpg'NB.NB. NB. fix all jpg files in a directoryNB. (<SMUGSHOTMD) smugshotexif&> 1 dir 'c:\pictures\2011\Missouri\wip\*.jpg'NB. extract SmugMug id from SmugShot file namespid=.<extractsmugidyNB. all smugshot pidspids=.x{"1~(0{x)i.<'PID'if.spide.pidsdo.NB. metadata exists for image insert itemspos=.pidsi.spidexif=.setartistcopyrightyNB. use upload date for the missing original datetimedate=.;pos{x{"1~(0{x)i.<'UPLOADDATE'date=.'-:'charsubdateexif=.datesetdateycaption=.;pos{x{"1~(0{x)i.<'CAPTION'exif=.captionsetdescriptionylb=.pos{x{"1~(0{x)i.;:'LATITUDE LONGITUDE'if.*./0<#&>lbdo.lb=._999&".&>lbexif=.lbsetlatlngyend.NB. rename as iphone file with original smugshot numberNB. format path chars for windows rename newname=.'.jpg'&beforelaststrynewname=.'iphone ',('_'&afterlaststr)@:(' [s'&beforelaststr)newnameshell'/\'charsub'rename ',;' ',&.>dblquotey;newname,'.jpg'newname;exifelse.'No SmugShot metadata for';spidend.)
Professional curmudgeon and relentless skeptic. "Belief" is a bullshit word. You know or you don't know!
View all posts by Bakerjd
Published
3 thoughts on “SmugShot Metadata Mess”
A recent update of SmugShot (Jan 2012) claims to have fixed the missing EXIF problem. I have yet to check this as I no longer upload images with this application. You still cannot rename the uploaded files and my SmugMug keyword handling requires meaningful files names.
A recent update of SmugShot (Jan 2012) claims to have fixed the missing EXIF problem. I have yet to check this as I no longer upload images with this application. You still cannot rename the uploaded files and my SmugMug keyword handling requires meaningful files names.