Test passing in an I mode image

This commit is contained in:
wiredfool 2017-03-03 08:38:30 -08:00
parent b7689627e8
commit 6559674032

View File

@ -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()