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()); }
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); }
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); }
public void AmfBadMarkerReadTest() { AmfManager manager = new AmfManager(); AmfFile file = manager.loadFile(pathToTestFile + "\\testfile\\test_AM_bad_marker.amf", FileFormat.UNCOMPRESSED); }