- Sep 30, 2013
- 50
- 0
- 0
Many of you using DNG have noticed like me that the DNGs are missing the GPS encoding that the 5MP JPG has. This workaround makes use of the ExifTool by Phil Harvey and Microsoft's Powershell to help quickly tag DNGs using the JPGs uploaded to your OneDrive Camera Roll (accessed via local folder path).
The following is the ps1 script that you run from the same directory where you save the ExifTool. Don't forget to remove the (-k) tag from the filename of the ExifTool.exe it has by default.
I know this isn't exactly easy to use if you don't know PowerShell (or scripting at all) but for those that do understand it here is a nice fix I made quickly. You might be able to use just the ExifTool as well without PowerShell if you spend the time to read its documentation. If there is enough interest I'll spend the time to write a How To use this.
The following is the ps1 script that you run from the same directory where you save the ExifTool. Don't forget to remove the (-k) tag from the filename of the ExifTool.exe it has by default.
Code:
#Set the varibles below leaving the apostrophes
#Set the $CameraRoll to the file folder path to your OneDrive Camera Roll Path
$CameraRollPath = 'D:\SkyDrive\Pictures\Camera Roll\'
#Set this to where you have your DNGS saved. THESE MUST BE LOCAL DRIVE (not Phone) AND IF ONEDRIVE FOLDER OFFLINE ACCESS
$DngsPath = 'D:\Skydrive\Pictures\DNG'
$Dngs = Get-ChildItem $DngsPath -Filter *.dng
foreach ($dng in $Dngs)
{
$SourceJpg = $CameraRollPath + $dng.Name.Replace('__highres.dng', '.jpg')
.\exiftool.exe -TagsFromFile $SourceJpg -GPSLatitude -GPSLatitudeRef -GPSLongitude -GPSLongitudeRef -GPSAltitude -GPSAltitudeRef $dng.FullName
}
I know this isn't exactly easy to use if you don't know PowerShell (or scripting at all) but for those that do understand it here is a nice fix I made quickly. You might be able to use just the ExifTool as well without PowerShell if you spend the time to read its documentation. If there is enough interest I'll spend the time to write a How To use this.