mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
Added test to check that png with null tRNS value defaults to a zero transparency value.
This commit is contained in:
parent
e317a729f3
commit
e33b5c6355
BIN
Tests/images/tRNS_null_1x1.png
Normal file
BIN
Tests/images/tRNS_null_1x1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 96 B |
|
@ -354,6 +354,13 @@ class TestFilePng(PillowTestCase):
|
||||||
self.assert_image_equal(im2.convert('RGBA'),
|
self.assert_image_equal(im2.convert('RGBA'),
|
||||||
im.convert('RGBA'))
|
im.convert('RGBA'))
|
||||||
|
|
||||||
|
def test_trns_null(self):
|
||||||
|
# Check reading images with null tRNS value, issue #1239
|
||||||
|
test_file = "Tests/images/tRNS_null_1x1.png"
|
||||||
|
im = Image.open(test_file)
|
||||||
|
|
||||||
|
self.assertEqual(im.info["transparency"], 0)
|
||||||
|
|
||||||
def test_save_icc_profile_none(self):
|
def test_save_icc_profile_none(self):
|
||||||
# check saving files with an ICC profile set to None (omit profile)
|
# check saving files with an ICC profile set to None (omit profile)
|
||||||
in_file = "Tests/images/icc_profile_none.png"
|
in_file = "Tests/images/icc_profile_none.png"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user