Photo Processing , Gallery and IPTC Data app

Ian Wood revlist at azurevision.co.uk
Mon May 26 05:04:06 EDT 2008


On 26 May 2008, at 09:39, David Bovill wrote:

> Ian do you want to share some handler / command line wrappers?



function ijwEXIF_setGPS tFile, tLat, tLatRef, tLong, tLongRef, tAlt,  
tAltRef
     -- tFile is a Rev path
     -- tlat, tLong & tAlt are positive numbers
     -- tLatRef = S or N
     -- tLongRef = E or W
     -- tAltRef = "above" or "below"
     put ijwEXIF_MakeOSXShellPath(ijwEXIF_getEXIFToolsPath()) && "- 
GPSLongitude="  & tLong & space into tShell
     put "-GPSLongitudeRef=" & quote & tLongRef & quote & space after  
tShell
     put "-GPSLatitude=" & tLat & space after tShell
     put "-GPSLatitudeRef=" & quote & tLatRef & quote & space after  
tShell
     if tAlt is empty then
         put "-GPSAltitude=" & "0" & space after tShell
         put "-GPSAltitudeRef=" & quote & "Above Sea Level" & quote &  
space after tShell
     else
         switch tAltRef
             case "above"
                 put "-GPSAltitude=" & tAlt & space after tShell
                 put "-GPSAltitudeRef=" & quote & "Above Sea Level" &  
quote & space after tShell
                 break
             case "below"
                 put "-GPSAltitude=" & tAlt & space after tShell
                 put "-GPSAltitudeRef=" & quote & "Below Sea Level" &  
quote & space after tShell
                 break
         end switch
     end if
     put ijwEXIF_MakeOSXShellPath(tFile) into tShellPath
     put tShellPath after tShell
     put shell(tShell) into tres
     return tres
end ijwEXIF_setGPS

Where ijwEXIF_MakeOSXShellPath is a function to escape characters for  
shell scripts on OS X and ijwEXIF_getEXIFToolsPath is a function that  
returns the path of a copy of EXIFTool in the application bundle, so  
that the end user doesn't have to install EXIFTool.

Ian



More information about the use-livecode mailing list