Added test to check that png with null tRNS value defaults to a zero transparency value.

This commit is contained in:
Justin Wilson 2015-05-27 09:45:27 -06:00
parent e317a729f3
commit e33b5c6355
2 changed files with 7 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

View File

@ -354,6 +354,13 @@ class TestFilePng(PillowTestCase):
self.assert_image_equal(im2.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):
# check saving files with an ICC profile set to None (omit profile)
in_file = "Tests/images/icc_profile_none.png"