Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I am using trying to add GPS data to a tiff image I'm saving. Upon analyzing the resulting image, I am only getting the Latitude and in the image. The GPSDateStamp and GPSTimeStamp are saving properly as well.
gpsDict.SetValueForKey(NSObject.FromObject(location.Latitude.Value > 0 ? "N" : "S"), ImageIO.CGImageProperties.GPSLatitudeRef);
gpsDict.SetValueForKey(NSObject.FromObject(location.Longitude.Value > 0 ? "E" : "W"), ImageIO.CGImageProperties.GPSLongitudeRef);
imageMetadata.SetValueForKey (gpsDict as NSDictionary, ImageIO.CGImageProperties.GPSDictionary);
I then use the imageMetadata when I save the image and I'm getting everything except the Longitude.
Could you attach a complete project (with a sample tiff image) we can use to reproduce this?
Upon further investigation, I have discovered that the longitude must be saved in positive number only. I added an Abs to the value for both Lat and Lon and I am now getting the expected result.
I suppose I could suggest that some kind of error be generated rather than allowing a malformed image header. That is why this was so difficult to troubleshoot.