Commit Graph

48 Commits

Author SHA1 Message Date
REDxEYE
1050d13350 Replace test files with images with compatible license 2022-07-23 12:44:03 +03:00
pre-commit-ci[bot]
fd86414ac2 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-07-22 22:02:58 +00:00
REDxEYE
2376399150 Add test and test files for ATI1 pixel format and fix image mode for ATI1 2022-07-23 01:02:06 +03:00
REDxEYE
ad2c6a20fe Add support for ATI1/2(BC4/BC5) DDS files
This commit adds support for loading DDS with ATI1 and ATI2 fourcc pixel format
2022-07-23 00:30:27 +03:00
Andrew Murray
e2288356ca Use _accept check in _open 2022-02-27 14:48:36 +11:00
Andrew Murray
98aa0f10ad pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
Andrew Murray
6449cdc1a3 Added RGBA saving 2021-06-14 18:14:28 +10:00
Andrew Murray
143e08c92c Added RGB saving 2021-06-14 18:14:28 +10:00
Andrew Murray
3b4db88202 Added BC5_SNORM reading when FourCC is DX10 2021-05-19 22:19:19 +10:00
Andrew Murray
f59ff6d55b Read BC5_TYPELESS as BC5_UNORM 2021-05-19 21:16:12 +10:00
Andrew Murray
1bb98974f8 Moved DXT5 test after DXT3 test 2021-05-19 21:14:51 +10:00
Andrew Murray
2e7f40e0b8 Added BC5_SNORM reading 2021-05-18 17:44:21 +10:00
Andrew Murray
68ac6d151e Added BC5_UNORM reading 2021-05-17 18:57:23 +10:00
Andrew Murray
1e074f5040
Merge pull request #4144 from jansol/master
Stop decoding BC1 punchthrough alpha in BC2&3
2021-04-15 20:24:52 +10:00
Andrew Murray
d06871d543 Set mode of three channel uncompressed RGB data to RGB 2021-04-05 17:58:02 +10:00
Andrew Murray
d4f9c6e082 Renamed register_open accept methods for consistency 2021-04-03 21:51:23 +11:00
Andrew Murray
a5c251029c Replaced various instances of assert_image_equal with assert_image_equal_tofile 2021-02-21 22:15:56 +11:00
Andrew Murray
a1b4b026ff Added pragma no cover 2021-02-14 07:58:16 +11:00
Andrew Murray
83542c42bf Added context managers 2021-02-11 21:43:54 +11:00
Jan Solanti
ddd3a2b482 Add tests for issue #4142 2021-01-04 22:47:18 +11:00
Hugo van Kemenade
b074d87179
Merge pull request #4760 from qiankanglai/dds-rgba8888
Support raw rgba8888 for dds
2020-10-15 08:10:01 +03:00
Hugo van Kemenade
dd87dd50c0 Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
Kanglai Qian
b5c59878da support raw rgba8888 for dds 2020-07-07 00:22:57 +08:00
Hugo
dda6145fce Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
Hugo van Kemenade
852d9156bc
Remove commas
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-02-15 16:21:37 +02:00
Hugo
affade7595 Replace unittest with pytest 2020-02-13 12:15:05 +02:00
Hugo
a4bf9fa036 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
Andrew Murray
c0048ad7de Use context managers 2019-11-26 07:03:23 +11:00
Andrew Murray
d716278d20 Corrected DdsImagePlugin setting info gamma 2019-10-30 22:13:06 +11:00
Jon Dufresne
d50445ff30 Introduce isort to automate import ordering and formatting
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.

Uses the configuration recommended by the Black to avoid conflicts of
style.

Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Hugo
d08475442b Format with Black 2019-06-13 18:53:42 +03:00
Andrew Murray
bbfbda3d4f Added tests for unimplemented formats 2019-02-23 08:53:45 +11:00
Andrew Murray
148d320b40 Added reading of uncompressed RGB data 2019-02-23 06:44:06 +11:00
Jon Dufresne
4de5477b61 Remove unnecessary unittest.main() boilerplate from test files
With the introduction and use of pytest, it is simple and easy to
execute specific tests in isolation through documented command line
arguments. Either by specifying the module path or through the `-k
EXPRESSION` argument. There is no longer any need to provide the
boilerplate:

    if __name__ == '__main__':
        unittest.main()

To every test file. It is simply noise.

The pattern remains in test files that aren't named with `test_*` as
those files are not discovered and executed by pytest by default.
2019-02-03 10:10:16 -08:00
Jon Dufresne
7da17ad41e Improve pytest configuration to allow specific tests as CLI args
The previous test configuration made it difficult to run a single test
with the pytest CLI. There were two major issues:

- The Tests directory was not a package. It now includes a __init__.py
  file and imports from other tests modules are done with relative
  imports.

- setup.cfg always specified the Tests directory. So even if a specific
  test were specified as a CLI arg, this configuration would also always
  include all tests. This configuration has been removed to allow
  specifying a single test on the command line.

Contributors can now run specific tests with a single command such as:

  $ tox -e py37 -- Tests/test_file_pdf.py::TestFilePdf.test_rgb

This makes it easy and faster to iterate on a single test failure and is
very familiar to those that have previously used tox and pytest.

When running tox or pytest with no arguments, they still discover and
runs all tests in the Tests directory.
2019-01-13 09:00:12 -08:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
Robert Nix
2be760ca79 Add support for BC7 to DdsImagePlugin 2016-08-26 02:26:03 -05:00
Robert Nix
b46804ea27 Add support for DXT3 to DdsImagePlugin 2016-08-25 20:12:44 -05:00
Robert Nix
18a91cebcf Move DDS decoders to C
- Fixed inaccurate BC1/BC3 texture decoding
2016-08-25 19:27:48 -05:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
Andrew Murray
677b958a7f Health fixes 2016-04-01 21:49:30 +11:00
wiredfool
b0d15c9b8d Catch truncated DDS files 2016-01-15 21:34:36 +00:00
wiredfool
18d48dc665 fixing dds plugin on Py 2.x, relaxing dxt5 test 2016-01-08 13:58:19 -08:00
wiredfool
13f2d22700 Correctness tests for DDS 2016-01-08 07:59:18 -08:00
hugovk
05b22cedd5 Add docstrings 2016-01-06 12:26:58 +02:00
hugovk
517cbbff08 Test NotImplementedError 2016-01-06 11:59:47 +02:00
hugovk
f826bff3c7 Simplify sanity tests 2016-01-06 11:24:09 +02:00
hugovk
ca216951ab Test DdsImagePlugin 2016-01-06 10:59:37 +02:00