Exemple #1
0
            public void TestRead()
            {
                PictureMetaInformation mi = new PictureMetaInformation(origFile);

                Assert.IsTrue(mi.GPSLatitude.HasValue);
                Assert.IsTrue(mi.GPSLongitude.HasValue);
                log.Info(mi.GPSDateTime);
            }
Exemple #2
0
 public static bool TryGet(string filename, out PictureMetaInformation instance)
 {
     try
     {
         instance = new PictureMetaInformation(filename);
         return(true);
     }
     catch (Exception)
     {
         instance = null;
         return(false);
     }
 }
Exemple #3
0
            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);
            }
Exemple #4
0
            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);
            }
Exemple #5
0
            public void ReadAttributes2()
            {
                PictureMetaInformation mi = new PictureMetaInformation(FileUtil.BinFile(@"test\MEMO0016.JPG"));

                mi.DumpProperties(Console.Out);
            }
Exemple #6
0
            public void ReadAttributes()
            {
                PictureMetaInformation mi = new PictureMetaInformation(copyFile);

                mi.DumpProperties(Console.Out);
            }