I'm programmatically updating exif data for a bunch of scanned jpg images
I'm not having much trouble updating most exif data, but I am struggling to set gps coordinates
For example I'm trying to save the latitude coordinate as follows
PropertyItem PropertyTagGpsLatitude = srcImg.GetPropertyItem(2);
PropertyTagGpsLatitude.Value = System.Text.ASCIIEncoding.ASCII.GetBytes("42/1,5/1,33/1");
srcImg.SetPropertyItem(PropertyTagGpsLatitude);
Per the documentation it states
Latitude is expressed as three rational values giving the degrees, minutes, and seconds respectively. When degrees, minutes, and seconds are expressed, the format is dd/1, mm/1, ss/1. When degrees and minutes are used and, for example, fractions of minutes are given up to two decimal places, the format is dd/1, mmmm/100, 0/1.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms534416(v=vs.85).aspx
I am able to set other gps related data, for example this translates over correctly
PropertyItem PropertyTagGpsLatitudeRef = srcImg.GetPropertyItem(1);
PropertyTagGpsLatitudeRef.Value = System.Text.ASCIIEncoding.ASCII.GetBytes("N");
srcImg.SetPropertyItem(PropertyTagGpsLatitudeRef);
I'm not getting any exceptions, I'm just verifying the exif data using the Exif Pilot utility and can see it's not working correctly