def test_image_to_tiff(self): self.pt.registerTransform(image_to_tiff()) imgFile = open(input_file_path('logo.jpg'), 'rb') data = imgFile.read() self.assertEqual(self.mimetypes_registry.classify(data), 'image/jpeg') data = self.pt.convertTo(target_mimetype='image/tiff', orig=data) self.assertEqual(data.getMetadata()['mimetype'], 'image/tiff')
def test_image_to_tiff(self): self.pt.registerTransform(image_to_tiff()) imgFile = open(input_file_path("logo.jpg"), "rb") data = imgFile.read() self.failUnlessEqual(self.mimetypes_registry.classify(data), "image/jpeg") data = self.pt.convertTo(target_mimetype="image/tiff", orig=data) self.failUnlessEqual(data.getMetadata()["mimetype"], "image/tiff")
def test_image_to_tiff(self): self.pt.registerTransform(image_to_tiff()) imgFile = open(input_file_path('logo.jpg'), 'rb') data = imgFile.read() self.assertEqual(self.mimetypes_registry.classify(data),'image/jpeg') data = self.pt.convertTo(target_mimetype='image/tiff',orig=data) self.assertEqual(data.getMetadata()['mimetype'], 'image/tiff')
def test_image_to_tiff(self): self.assert_image_transformed(image_to_tiff(), 'logo.jpg', 'image/jpeg', 'image/tiff')