mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Added test for converting GIF with RGBA palette to P
This commit is contained in:
parent
b3a3c22c97
commit
44a4219283
|
@ -136,6 +136,17 @@ class TestImageConvert(PillowTestCase):
|
|||
self.assertNotIn('transparency', im_p.info)
|
||||
im_p.save(f)
|
||||
|
||||
def test_gif_with_rgba_palette_to_p(self):
|
||||
# See https://github.com/python-pillow/Pillow/issues/2433
|
||||
im = Image.open('Tests/images/hopper.gif')
|
||||
im.info['transparency'] = 255
|
||||
im.load()
|
||||
self.assertEqual(im.palette.mode, 'RGBA')
|
||||
im_p = im.convert('P')
|
||||
|
||||
# Should not raise ValueError: unrecognized raw mode
|
||||
im_p.load()
|
||||
|
||||
def test_p_la(self):
|
||||
im = hopper('RGBA')
|
||||
alpha = hopper('L')
|
||||
|
|
Loading…
Reference in New Issue
Block a user