コード例 #1
0
ファイル: test_image.py プロジェクト: UniNE-CHYN/mps_toolbox
def test_from_txt(img):
    img1 = Image.fromTxt("tests/data/test_img.txt", (3, 3))
    img2 = Image.fromTxt("tests/data/test_img.txt", (3, 3, 1))
    assert img == img1
    assert img == img2
コード例 #2
0
ファイル: test_image.py プロジェクト: UniNE-CHYN/mps_toolbox
def test_conversion_txt_gslib():
    img = Image.fromTxt("tests/data/test_img.txt", (3, 3))
    img.exportAsGslib("tests/data/test_img.gslib")
    img_test = Image.fromGslib("tests/data/test_img.gslib")
    assert np.alltrue(img_test == img)
コード例 #3
0
ファイル: test_image.py プロジェクト: UniNE-CHYN/mps_toolbox
def test_conversion_png_txt():
    img = Image.fromPng("tests/data/test_img.png")
    img.exportAsTxt("tests/data/test_img2.txt")
    img_test = Image.fromTxt("tests/data/test_img2.txt", (3, 3))
    assert np.alltrue(img_test == img)