Ejemplo n.º 1
0
        public void AmfUnCompressedReadTest()
        {
            AmfManager manager = new AmfManager();
            AmfFile file = manager.loadFile(pathToTestFile + "\\testfile\\test_AM.amf", FileFormat.UNCOMPRESSED);

            Assert.AreEqual(1024, file.width);
            Assert.AreEqual(1024, file.height);
            Assert.AreEqual(file.width * file.height, file.pixels.Count());
        }
Ejemplo n.º 2
0
        public void AmfGetPixelAtTest()
        {
            AmfManager manager = new AmfManager();
            AmfFile file = manager.loadFile(pathToTestFile + "\\testfile\\test_AM.amf.gz", FileFormat.COMPRESSED);

            AmfPixelInfo value = file.getPixelAt(300, 400);
            Assert.AreEqual(3, value.landTypeId);
            Assert.AreEqual(1, value.climateId);
        }
Ejemplo n.º 3
0
        public void AmfCompressedWriteTest()
        {
            string copyTestFile = pathToTestFile + "\\testfile\\filecopy.amf.gz";
            AmfManager manager = new AmfManager();
            AmfFile file = manager.loadFile(pathToTestFile + "\\testfile\\test_AM.amf.gz", FileFormat.COMPRESSED);
            manager.saveFile(copyTestFile, FileFormat.COMPRESSED, file);
            AmfFile filecopy = manager.loadFile(copyTestFile, FileFormat.COMPRESSED);

            Assert.AreEqual(file.width, filecopy.width);
            Assert.AreEqual(file.width, filecopy.width);
            Assert.AreEqual(file.pixels.Count(), filecopy.pixels.Count());

            File.Delete(copyTestFile);
        }
Ejemplo n.º 4
0
 public void AmfBadMarkerReadTest()
 {
     AmfManager manager = new AmfManager();
     AmfFile file = manager.loadFile(pathToTestFile + "\\testfile\\test_AM_bad_marker.amf", FileFormat.UNCOMPRESSED);
 }