This project has moved and is read-only. For the latest updates, please go here.

Writing Exif.GpsInfo data

Mar 26, 2016 at 6:53 PM
Edited Mar 26, 2016 at 6:55 PM
I'm having trouble writing Exif GpsInfo to an image.

I've managed to write GPSLatitude and GPSLongitude data, but not GPSVersionID or the GPSLatitudeRef/GPSLongitudeRef.

My code:
using (var image = new MagickImage(imageFile))
        var profile = new ExifProfile();        
        profile.SetValue(ExifTag.GPSVersionID, new byte[] { 0x02, 0x00, 0x00, 0x00 });
        profile.SetValue(ExifTag.GPSLatitudeRef, "N");
Any suggestions to what I might be doing wrong?
Mar 26, 2016 at 7:12 PM
It looks like it was working all along. I was using Explorer and "Properties" | "Details" to look at the values, but not all are visible there. By using Exiv2 I could see all the values, like this:
exiv2.exe -p a pr imageFile.jpg