mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-28 00:43:05 +03:00
Merge pull request #3253 from radarhere/convert
Added test for converting GIF with RGBA palette to P
This commit is contained in:
commit
aac02f73ed
|
@ -136,6 +136,17 @@ class TestImageConvert(PillowTestCase):
|
||||||
self.assertNotIn('transparency', im_p.info)
|
self.assertNotIn('transparency', im_p.info)
|
||||||
im_p.save(f)
|
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):
|
def test_p_la(self):
|
||||||
im = hopper('RGBA')
|
im = hopper('RGBA')
|
||||||
alpha = hopper('L')
|
alpha = hopper('L')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user