public void TestRead() { PictureMetaInformation mi = new PictureMetaInformation(origFile); Assert.IsTrue(mi.GPSLatitude.HasValue); Assert.IsTrue(mi.GPSLongitude.HasValue); log.Info(mi.GPSDateTime); }
public static bool TryGet(string filename, out PictureMetaInformation instance) { try { instance = new PictureMetaInformation(filename); return(true); } catch (Exception) { instance = null; return(false); } }
public void TestWrite() { PictureMetaInformation mi = new PictureMetaInformation(copyFile); mi.GPSLongitude = 123.456; mi.GPSLatitude = -89.01; mi.GPSDateTime = DateTime.Now; mi.Write(); AssertPixelDataEqual(); var mi2 = new PictureMetaInformation(copyFile); Assert.AreEqual(mi.GPSLongitude.Value, mi2.GPSLongitude.Value, 0.01); Assert.AreEqual(mi.GPSLatitude.Value, mi2.GPSLatitude.Value, 0.01); Assert.AreEqual((double)mi.GPSDateTime.Value.Ticks, (double)mi2.GPSDateTime.Value.Ticks, TimeSpan.FromMilliseconds(1).Ticks); }
public void ReadAttributes3() { PictureMetaInformation mi = new PictureMetaInformation(FileUtil.BinFile(@"C:\Dokumente und Einstellungen\test\Eigene Dateien\Eigene Bilder\ref\IMG_0182.JPG")); mi.DumpProperties(Console.Out); }
public void ReadAttributes2() { PictureMetaInformation mi = new PictureMetaInformation(FileUtil.BinFile(@"test\MEMO0016.JPG")); mi.DumpProperties(Console.Out); }
public void ReadAttributes() { PictureMetaInformation mi = new PictureMetaInformation(copyFile); mi.DumpProperties(Console.Out); }