Exemplo n.º 1
0
    def testResize(self):
        image = Image.open(self.jpgFn)
        image = image.crop((100, 100, 900, 900))

        image2 = Image.open(self.jpgFn)
        image2 = image.resize((800, 800), 'foo')

        self.assertEquals(image.size, image2.size)
Exemplo n.º 2
0
    def testSave(self):
        image = Image.open(self.jpgFn)
        image.save(self.pytofOutput, 92)

        image2 = Image.open(self.pytofOutput)
Exemplo n.º 3
0
    def testRotate(self):
        image = Image.open(self.jpgFn)
        rotatedImage = image.rotate(90)
        [x, y] = self.jpgSize

        self.assertEquals(rotatedImage.size, [y, x])
Exemplo n.º 4
0
 def testCrop(self):
     image = Image.open(self.jpgFn)
     image = image.crop((100, 100, 900, 900))
     self.assertEquals(image.size, [800, 800])
Exemplo n.º 5
0
 def testCreateObject(self):
     image = Image.open(self.jpgFn)
     self.assertEquals(image.size, self.jpgSize)