Test decompression swizzles.
(self)
| 883 | self.assertColorSame(color_ref, color_test, swizzle=swizzle) |
| 884 | |
| 885 | def test_compress_dsw(self) -> None: |
| 886 | ''' |
| 887 | Test decompression swizzles. |
| 888 | ''' |
| 889 | # The swizzles to test |
| 890 | swizzles = ['rgba', 'g0r1', 'rrrg'] |
| 891 | |
| 892 | # Decompress a swizzled image |
| 893 | for swizzle in swizzles: |
| 894 | with self.subTest(swizzle=swizzle): |
| 895 | image_dec = self.get_tmp_image_path('LDR', 'decomp') |
| 896 | |
| 897 | cmd = [ |
| 898 | self.binary, '-tl', |
| 899 | './Test/Data/Tiles/ldr.png', |
| 900 | image_dec, '4x4', '-exhaustive', |
| 901 | '-dsw', swizzle] |
| 902 | |
| 903 | self.exec(cmd) |
| 904 | |
| 905 | # Fetch the three color |
| 906 | img = tli.Image(image_dec) |
| 907 | color_test = img.get_colors((7, 7)) |
| 908 | color_ref = self.get_color_refs('LDR', 'BR') |
| 909 | self.assertColorSame(color_ref, color_test, swizzle=swizzle) |
| 910 | |
| 911 | def test_compress_esw_dsw(self) -> None: |
| 912 | ''' |
nothing calls this directly
no test coverage detected