From 6559674032365757488a2509c5c0e83f18e2aeb0 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Fri, 3 Mar 2017 08:38:30 -0800 Subject: [PATCH] Test passing in an I mode image --- Tests/test_file_gif.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 2061bf664..f9ba9364d 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -478,5 +478,17 @@ class TestFileGif(PillowTestCase): im.putpalette(palette) self.assert_image_equal(reloaded, im) + def test_save_I(self): + # Test saving something that would trigger the auto-convert to 'L' + + im = hopper('I') + + out = self.tempfile('temp.gif') + im.save(out) + + reloaded = Image.open(out) + self.assert_image_equal(reloaded.convert('L'), im.convert('L')) + + if __name__ == '__main__': unittest.main()