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)
def testSave(self): image = Image.open(self.jpgFn) image.save(self.pytofOutput, 92) image2 = Image.open(self.pytofOutput)
def testRotate(self): image = Image.open(self.jpgFn) rotatedImage = image.rotate(90) [x, y] = self.jpgSize self.assertEquals(rotatedImage.size, [y, x])
def testCrop(self): image = Image.open(self.jpgFn) image = image.crop((100, 100, 900, 900)) self.assertEquals(image.size, [800, 800])
def testCreateObject(self): image = Image.open(self.jpgFn) self.assertEquals(image.size, self.jpgSize)