mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Test from #2375, 0ebb4cd1c0
This commit is contained in:
parent
aea2a4ca8d
commit
9a36a51916
|
@ -422,10 +422,10 @@ class TestFileGif(PillowTestCase):
|
|||
|
||||
def test_transparent_optimize(self):
|
||||
# from issue #2195, if the transparent color is incorrectly
|
||||
# optimized out, gif loses transparency Need a palette that
|
||||
# isn't using the 0 color, and one that's > 128 items where
|
||||
# the transparent color is actually the top palette entry to
|
||||
# trigger the bug.
|
||||
# optimized out, gif loses transparency
|
||||
# Need a palette that isn't using the 0 color, and one
|
||||
# that's > 128 items where the transparent color is actually
|
||||
# the top palette entry to trigger the bug.
|
||||
|
||||
from PIL import ImagePalette
|
||||
|
||||
|
@ -442,6 +442,16 @@ class TestFileGif(PillowTestCase):
|
|||
|
||||
self.assertEqual(reloaded.info['transparency'], 253)
|
||||
|
||||
def test_bbox(self):
|
||||
out = self.tempfile('temp.gif')
|
||||
|
||||
im = Image.new('RGB', (100,100), '#fff')
|
||||
ims = [Image.new("RGB", (100,100), '#000')]
|
||||
im.save(out, save_all=True, append_images=ims)
|
||||
|
||||
reread = Image.open(out)
|
||||
self.assertEqual(reread.n_frames, 2)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user