Beispiel #1
0
    def test_crop_tiff_frame(self):
        folder = Folder()
        response = folder.upload_file('./data/sample.tif')
        self.assertEqual(True, response)

        img = Image('sample.tif')
        response = img.crop_tiff_frame(0, 0, 0, 100, 100, '/')
        self.assertTrue(os.path.exists(response))
Beispiel #2
0
    def test_crop_image(self):
        folder = Folder()
        response = folder.upload_file('./data/barcodeQR.jpg')
        self.assertEqual(True, response)

        img = Image('barcodeQR.jpg')
        response = img.crop_image(0, 0, 10, 10, '/', 'jpg')
        self.assertTrue(os.path.exists(response))
Beispiel #3
0
    def test_update_image(self):
        folder = Folder()
        response = folder.upload_file('./data/barcodeQR.jpg')
        self.assertEqual(True, response)

        img = Image('barcodeQR.jpg')
        response = img.update_image({'newWidth': 20, 'newHeight': 20}, 'jpg')
        self.assertTrue(os.path.exists(response))
Beispiel #4
0
    def test_rotate_tiff_frame(self):
        folder = Folder()
        response = folder.upload_file('./data/sample.tif')
        self.assertEqual(True, response)

        img = Image('sample.tif')
        response = img.rotate_tiff_frame(0, 'rotate90flipnone', '/')
        self.assertTrue(os.path.exists(response))
Beispiel #5
0
    def test_update_tiff_frame(self):
        folder = Folder()
        response = folder.upload_file('./data/sample.tif')
        self.assertEqual(True, response)

        img = Image('sample.tif')
        response = img.update_tiff_frame(0, {'newWidth': 10, 'newHeight': 10})
        self.assertTrue(os.path.exists(response))
    def test_update_image(self):
        folder = Folder()
        response = folder.upload_file('./data/barcodeQR.jpg')
        self.assertEqual(True, response)

        img = Image('barcodeQR.jpg')
        response = img.update_image({'newWidth': 20, 'newHeight': 20},'jpg')
        self.assertTrue(os.path.exists(response))
    def test_crop_tiff_frame(self):
        folder = Folder()
        response = folder.upload_file('./data/sample.tif')
        self.assertEqual(True, response)

        img = Image('sample.tif')
        response = img.crop_tiff_frame(0,0,0,100,100,'/')
        self.assertTrue(os.path.exists(response))
    def test_crop_image(self):
        folder = Folder()
        response = folder.upload_file('./data/barcodeQR.jpg')
        self.assertEqual(True, response)

        img = Image('barcodeQR.jpg')
        response = img.crop_image(0,0,10,10,'/','jpg')
        self.assertTrue(os.path.exists(response))
    def test_update_tiff_frame(self):
        folder = Folder()
        response = folder.upload_file('./data/sample.tif')
        self.assertEqual(True, response)

        img = Image('sample.tif')
        response = img.update_tiff_frame(0,{'newWidth':10,'newHeight':10})
        self.assertTrue(os.path.exists(response))
    def test_rotate_tiff_frame(self):
        folder = Folder()
        response = folder.upload_file('./data/sample.tif')
        self.assertEqual(True, response)

        img = Image('sample.tif')
        response = img.rotate_tiff_frame(0,'rotate90flipnone','/')
        self.assertTrue(os.path.exists(response))
Beispiel #11
0
    def test_rotate_image(self):
        fld = Folder()
        response = fld.upload_file('./data/barcodeQR.png')
        self.assertEqual(response, True)

        imageObj = Image('barcodeQR.png')
        imageObj.rotate_image('rotate270flipnone','/','png')
        self.assertEqual(True, os.path.exists('./output/barcodeQR.png'))
Beispiel #12
0
    def test_resize_image(self):
        fld = Folder()
        response = fld.upload_file('./data/barcodeQR.png')
        self.assertEqual(response, True)

        imageObj = Image('barcodeQR.png')
        imageObj.resize_image('./data/barcodeQR.png',10,10,'barcodeQR.png','png')
        self.assertEqual(True, os.path.exists('./output/barcodeQR.png'))