mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 19:36:38 +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):
|
def test_transparent_optimize(self):
|
||||||
# from issue #2195, if the transparent color is incorrectly
|
# from issue #2195, if the transparent color is incorrectly
|
||||||
# optimized out, gif loses transparency Need a palette that
|
# optimized out, gif loses transparency
|
||||||
# isn't using the 0 color, and one that's > 128 items where
|
# Need a palette that isn't using the 0 color, and one
|
||||||
# the transparent color is actually the top palette entry to
|
# that's > 128 items where the transparent color is actually
|
||||||
# trigger the bug.
|
# the top palette entry to trigger the bug.
|
||||||
|
|
||||||
from PIL import ImagePalette
|
from PIL import ImagePalette
|
||||||
|
|
||||||
|
@ -442,6 +442,16 @@ class TestFileGif(PillowTestCase):
|
||||||
|
|
||||||
self.assertEqual(reloaded.info['transparency'], 253)
|
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__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user