2016-08-11 02:16:32 +03:00
|
|
|
from helper import unittest, PillowTestCase
|
2016-01-30 16:22:02 +03:00
|
|
|
from PIL import Image
|
|
|
|
|
2016-02-05 01:57:13 +03:00
|
|
|
|
2016-01-30 16:22:02 +03:00
|
|
|
class TestFileFtex(PillowTestCase):
|
|
|
|
|
|
|
|
def test_load_raw(self):
|
|
|
|
im = Image.open('Tests/images/ftex_uncompressed.ftu')
|
|
|
|
target = Image.open('Tests/images/ftex_uncompressed.png')
|
|
|
|
|
|
|
|
self.assert_image_equal(im, target)
|
|
|
|
|
|
|
|
def test_load_dxt1(self):
|
|
|
|
im = Image.open('Tests/images/ftex_dxt1.ftc')
|
|
|
|
target = Image.open('Tests/images/ftex_dxt1.png')
|
2016-08-11 02:16:32 +03:00
|
|
|
self.assert_image_similar(im, target.convert('RGBA'), 15)
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|