Exemplo n.º 1
0
    def testJPG(self):
        with open("./input/test_core_gridcrop_grid.jpg", "r") as fp:
            data = fp.read()

        data = buffer_crop(data, 1024, 256, Format.JPG)

        with open("./output/buffer_crop.jpg", "w") as fp:
            fp.write(data)
Exemplo n.º 2
0
    def testTIF(self):
        with open("./input/test_core_gridcrop_grid.tif", "r") as fp:
            data = fp.read()

        data = buffer_crop(data, 1024, 256, Format.TIFF)

        with open("./output/buffer_crop.tif", "w") as fp:
            fp.write(data)
Exemplo n.º 3
0
    def testPNG256(self):
        with open("./input/test_core_gridcrop_grid_palette.png", "r") as fp:
            data = fp.read()

        data = buffer_crop(data, 1024, 256, Format.PNG)

        with open("./output/buffer_crop_palette.png", "w") as fp:
            fp.write(data)