mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Correctness tests for DDS
This commit is contained in:
parent
37b5a39c58
commit
13f2d22700
BIN
Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.png
Normal file
BIN
Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.png
Normal file
BIN
Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
|
@ -17,7 +17,10 @@ class TestFileDds(PillowTestCase):
|
|||
self.assertEqual(im.format, "DDS")
|
||||
self.assertEqual(im.mode, "RGBA")
|
||||
self.assertEqual(im.size, (256, 256))
|
||||
self.assertIsInstance(im, DdsImagePlugin.DdsImageFile)
|
||||
|
||||
target = Image.open(TEST_FILE_DXT1.replace('.dds', '.png'))
|
||||
target.show()
|
||||
self.assert_image_equal(target.convert('RGBA'), im)
|
||||
|
||||
def test_sanity_dxt5(self):
|
||||
"""Check DXT5 images can be opened"""
|
||||
|
@ -26,7 +29,10 @@ class TestFileDds(PillowTestCase):
|
|||
self.assertEqual(im.format, "DDS")
|
||||
self.assertEqual(im.mode, "RGBA")
|
||||
self.assertEqual(im.size, (256, 256))
|
||||
self.assertIsInstance(im, DdsImagePlugin.DdsImageFile)
|
||||
|
||||
target = Image.open(TEST_FILE_DXT5.replace('.dds', '.png'))
|
||||
self.assert_image_equal(target, im)
|
||||
|
||||
|
||||
def test_sanity_dxt3(self):
|
||||
"""Check DXT3 images are not supported"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user