Commit Graph

102 Commits

Author SHA1 Message Date
Andrew Murray
291ee35204 Added type hints 2024-06-18 23:03:03 +10:00
Andrew Murray
e68cec640a Added type hints 2024-05-30 12:00:50 +10:00
Andrew Murray
c61a481028 Support reading CMYK JPEG2000 images 2024-04-06 13:40:39 +11:00
scaramallion
7ca9bddf93
Update Tests/test_file_jpeg2k.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-03-25 20:13:45 +11:00
pre-commit-ci[bot]
901c13c4b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-03-24 04:47:28 +00:00
scaramallion
ce060a8e8b Fix 9-bit JPEG 2000 images not using I;16 2024-03-24 15:40:11 +11:00
Andrew Murray
f128d47e15 Added reading of JPEG2000 palettes 2024-03-12 19:30:23 +11:00
Andrew Murray
6d78d42769 Added type hints 2024-03-02 13:12:17 +11:00
Andrew Murray
cdc498e6f3 Added type hints 2024-02-07 19:16:28 +11:00
Hugo van Kemenade
4a4b90c365
Autotype tests (#7756)
* autotyping: --none-return
* autotyping: --scalar-return
* autotyping: --int-param
* autotyping: --float-param
* autotyping: --str-param
* autotyping: --annotate-named-param tmp_path:pathlib.Path
2024-01-31 20:12:58 +11:00
Hugo van Kemenade
53c3cd9f8e isort Tests 2024-01-20 13:23:03 +02:00
Hugo van Kemenade
43b2f61e79 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
Hugo van Kemenade
5eea6ed633 Replace 'assert False' with pytest.fail() 2023-11-12 22:30:28 +02:00
Andrew Murray
26ca569cbe Parametrized test 2023-07-22 20:15:40 +10:00
Andrew Murray
6d3c1985e0 Assert false instead of raising an error 2023-03-29 22:20:57 +11:00
Andrew Murray
9a7a448219 Increase similiarity between test_plt_marker and _parse_comment 2023-03-29 20:14:29 +11:00
Andrew Murray
2f66d2d6a1 Changed maximum comment length to 65531 2023-03-29 19:25:35 +11:00
Andrew Murray
1fd189164c Renamed "add_plt" to "plt" 2023-03-27 22:38:29 +11:00
Andrew Murray
7c3fd25433 Allow saving bytes as comments 2023-03-24 09:45:51 +11:00
Andrew Murray
d3923f7142 Use reading of comments to test saving comments 2023-03-23 17:53:35 +11:00
Andrew Murray
176b2a2000 Merge branch 'master' into jp2k_options 2023-03-23 08:57:20 +11:00
Andrew Murray
cbde5b2626 Added reading of JPEG2000 comments 2023-03-09 13:36:22 +11:00
pre-commit-ci[bot]
24183d652e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-06 19:27:19 +00:00
Andrew Murray
4bb50b1fa7 Test comment too long 2023-01-31 22:31:58 +11:00
Andrew Murray
ca97e2a3a5 Use _binary 2023-01-31 22:31:52 +11:00
Andrew Murray
18ad4c867f Use skip_unless_feature_version 2023-01-31 21:49:12 +11:00
Josh Ware
b00bde9771
Update Tests/test_file_jpeg2k.py fix spelling error
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-01-19 22:52:41 +11:00
pre-commit-ci[bot]
41b3ac8aed [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-19 00:52:43 +00:00
Josh Ware
de43bc99c8 Added support for jpeg2000 comments and PLT marker segments 2023-01-19 11:37:14 +11:00
Andrew Murray
6ddbe4cbf0 Added signed option when saving JPEG2000 images 2022-11-03 18:26:31 +11:00
Andrew Murray
c259ac492f Parametrized tests 2022-10-03 16:57:42 +11:00
Andrew Murray
950d0ad1d3 Fixed behaviour change from #5901 endian fix 2022-04-12 23:12:54 +10:00
Andrew Murray
698f52916e Parametrized test 2022-03-31 22:13:17 +03:00
Andrew Murray
c3e0fd1a7a Moved getvalue asserts outside of image context managers 2022-03-31 22:13:17 +03:00
scaramallion
b5a59d8860 Remove redundant im.load() in tests 2022-03-31 22:13:17 +03:00
scaramallion
462e3fdaa5 Remove duplicate test 2022-03-31 22:13:17 +03:00
scaramallion
4e7f041795 Rename parameter and add more tests 2022-03-31 22:13:17 +03:00
scaramallion
f8a74cbed1 Fix priority when selecting j2k kind 2022-03-31 22:13:17 +03:00
scaramallion
de26f78eb1 Add 'mct' and 'use_jp2' options for J2K saving 2022-03-31 22:13:17 +03:00
Andrew Murray
f8e4e9c2dd Added enums 2022-01-15 09:02:31 +11:00
Andrew Murray
4b7b07de70 Fixed JPEG2000 I;16 images on big endian 2021-12-28 17:06:05 +11:00
Andrew Murray
3af00edc85 Added context managers 2021-11-25 23:16:07 +11:00
Andrew Murray
6596e31605 Determine mode purely from ihdr header box 2021-08-05 01:06:01 +10:00
Andrew Murray
8045ecceef Added tests 2021-08-01 19:01:43 +10:00
Andrew Murray
ae54838146 If DPI is invalid, ignore it instead of raising an error 2021-08-01 18:38:56 +10:00
Roger Baumgartner
5f4653d0b4 Attempt to read dpi information from JPEG2000's resc header box 2021-06-30 06:43:33 -07:00
Andrew Murray
bd298b128c Fixed default numresolution for small JPEG2000 images 2021-06-14 11:23:56 +10:00
Andrew Murray
3c129142c8 Catch OSError 2021-04-03 09:34:56 +11:00
Andrew Murray
39fe85f308
Merge branch 'master' into jp2-decode-subsample 2021-04-03 09:26:55 +11:00
Eric Soroos
3bf5eddb89 Fix OOB Read in Jpeg2KDecode CVE-2021-25287,CVE-2021-25288
* For J2k images with multiple bands, it's legal in to have different
  widths for each band, e.g. 1 byte for L, 4 bytes for A
* This dates to Pillow 2.4.0
2021-04-01 17:17:13 +03:00