Test compression and decompression swizzles
(self)
| 909 | self.assertColorSame(color_ref, color_test, swizzle=swizzle) |
| 910 | |
| 911 | def test_compress_esw_dsw(self) -> None: |
| 912 | ''' |
| 913 | Test compression and decompression swizzles |
| 914 | ''' |
| 915 | # Compress a swizzled image, and swizzle back in decompression |
| 916 | image_dec = self.get_tmp_image_path('LDR', 'decomp') |
| 917 | |
| 918 | cmd = [ |
| 919 | self.binary, '-tl', |
| 920 | './Test/Data/Tiles/ldr.png', |
| 921 | image_dec, '4x4', '-exhaustive', |
| 922 | '-esw', 'gbar', '-dsw', 'argb'] |
| 923 | |
| 924 | self.exec(cmd) |
| 925 | |
| 926 | # Fetch the three color |
| 927 | img = tli.Image(image_dec) |
| 928 | color_test = img.get_colors((7, 7)) |
| 929 | color_ref = self.get_color_refs('LDR', 'BR') |
| 930 | self.assertColorSame(color_ref, color_test) |
| 931 | |
| 932 | def test_compress_flip(self) -> None: |
| 933 | ''' |
nothing calls this directly
no test coverage detected