diff --git a/TODO b/TODO index 18fbda99..772a461c 100644 --- a/TODO +++ b/TODO @@ -1,16 +1,15 @@ - save a 16-bit image to tiff with jpg compression ... should it autoconvert? -- test autorotate flags on tiff and jpeg - - see https://github.com/jcupitt/libvips/issues/243 - - - - +- try: + $ vipsheader blankpage.pdf + temp-0: 595x842 uchar, 4 bands, srgb, pdfload + filename is not set? + try other files in test/images +- see https://github.com/jcupitt/libvips/issues/243 - tiff write does not support [strip] diff --git a/test/test_foreign.py b/test/test_foreign.py index a315547a..9f1f4105 100755 --- a/test/test_foreign.py +++ b/test/test_foreign.py @@ -201,6 +201,17 @@ class TestForeign(unittest.TestCase): os.unlink("test-12.jpg") os.unlink("test-13.jpg") + x = Vips.Image.new_from_file(self.jpeg_file) + x = x.copy() + x.set_value("orientation", 6) + x.write_to_file("test-14.jpg") + + x1 = Vips.Image.new_from_file("test-14.jpg") + x2 = Vips.Image.new_from_file("test-14.jpg", autorotate = True) + self.assertEqual(x1.width, x2.height) + self.assertEqual(x1.height, x2.width) + os.unlink("test-14.jpg") + def test_png(self): x = Vips.type_find("VipsForeign", "pngload") if not x.is_instantiatable(): @@ -285,6 +296,17 @@ class TestForeign(unittest.TestCase): os.unlink("test-12.tif") os.unlink("test-13.tif") + x = Vips.Image.new_from_file(self.tiff_file) + x = x.copy() + x.set_value("orientation", 6) + x.write_to_file("test-14.tif") + + x1 = Vips.Image.new_from_file("test-14.tif") + x2 = Vips.Image.new_from_file("test-14.tif", autorotate = True) + self.assertEqual(x1.width, x2.height) + self.assertEqual(x1.height, x2.width) + os.unlink("test-14.tif") + def test_magickload(self): x = Vips.type_find("VipsForeign", "magickload") if not x.is_instantiatable():