Benjamin Gilbert
e1fb1ab5c4
Deprecate raise_oserror() for removal in Pillow 12
...
It's only useful if the caller has an IMAGING_CODEC_* error code, which
are only produced by codec decode() methods and are automatically
translated by ImageFile.
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-12-13 02:17:32 -06:00
Hugo van Kemenade
7cc0482804
Merge pull request #6486 from REDxEYE/improved_dds
2023-12-06 22:51:05 +02:00
Andrew Murray
e43dd6610d
Merge pull request #7578 from radarhere/font
...
Handle pathlib.Path in FreeTypeFont
2023-12-06 12:09:16 +11:00
Andrew Murray
0a66b98558
Merge pull request #7597 from hugovk/comprehensions
...
Use list comprehensions to create transformed lists
2023-12-05 18:56:49 +11:00
Andrew Murray
f2e478e968
Merge branch 'main' into improved_dds
2023-12-05 17:49:47 +11:00
Andrew Murray
0e36c14680
Added test BC4 TYPELESS image
2023-12-05 07:39:15 +11:00
Andrew Murray
c1b3c34678
Added expected test image
2023-12-05 07:18:07 +11:00
Sam Bourne
8c5d5c7e6b
Add support for BC4 dds files
2023-12-04 09:54:10 -08:00
Andrew Murray
9a6c47a9d2
Merge branch 'main' into font
2023-12-04 22:25:58 +11:00
Hugo van Kemenade
27d7bd10c8
Use list comprehensions to create transformed lists
2023-12-03 21:59:44 +02:00
Andrew Murray
2eddbc5994
Updated docstrings
2023-12-03 14:25:07 +11:00
Andrew Murray
ab96324c12
Removed support for RGB bitcount 8
2023-12-02 21:36:17 +11:00
Andrew Murray
49578f0059
Merge branch 'main' into improved_dds
2023-12-02 21:35:20 +11:00
Hugo van Kemenade
76446ee450
Merge pull request #7524 from cclauss/ruff-rules-C4-PERF102-PIE810-PLR
2023-12-01 17:09:25 +02:00
Andrew Murray
316f39702c
Merge pull request #7580 from nulano/cibuildwheel-docker
...
Build Windows wheels using cibuildwheel
2023-12-01 10:41:53 +11:00
Nulano
e1059767d8
replace importlib.util.find_spec with try import except ImportError
2023-11-30 20:11:24 +01:00
Aarni Koskela
36e0b5312a
Update Tests/test_imagefont.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-11-29 09:21:51 +02:00
Ondrej Baranovič
6fe42bddd9
Apply suggestions from code review
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-28 14:20:57 +01:00
nulano
1fdb0668d8
test cibuildwheel wheels in Docker on Windows
2023-11-28 14:20:57 +01:00
Aarni Koskela
39ec56c6ea
Improve error message when creating TrueType fonts of invalid size
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-11-28 15:09:53 +02:00
Andrew Murray
ae7958fa8d
Handle pathlib.Path in FreeTypeFont
2023-11-27 23:03:10 +11:00
Andrew Murray
5f33175b20
Fixed checking that no debug messages were logged
2023-11-17 08:37:46 +11:00
Andrew Murray
67e1253202
Do not assign new fp attribute to image when closing
2023-11-17 08:32:25 +11:00
Raphael Vieira Rossi
b25ece364b
fix: check object Image has attribute 'fp' when closes
2023-11-16 16:46:11 -03:00
Andrew Murray
4b308dc2bf
Merge pull request #7488 from bgilbert/jpeg-restart
...
Allow configuring JPEG restart marker interval on save
2023-11-14 23:42:50 +11:00
Hugo van Kemenade
902055fbfe
Merge pull request #7526 from akx/mount-ruffmore
2023-11-13 16:15:06 +02:00
Hugo van Kemenade
5eea6ed633
Replace 'assert False' with pytest.fail()
2023-11-12 22:30:28 +02:00
Aarni Koskela
126bc44e9e
Fix up most noqas
...
Update Tests/bench_cffi_access.py
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
2023-11-12 13:47:52 +02:00
Andrew Murray
bf76320444
Merge pull request #7491 from bgilbert/jpeg-tables-only
...
Implement `streamtype=1` option for tables-only JPEG encoding
2023-11-11 16:06:34 +11:00
Hugo van Kemenade
a7fe25df53
Merge pull request #7522 from radarhere/png_save_all
2023-11-07 11:35:24 +02:00
Christian Clauss
fd59f91d17
ruff: Minor optimizations of list comprehensions, x in set, etc.
2023-11-06 19:13:47 +06:00
Aarni Koskela
9e615b6ad3
Add noqas for UP031
2023-11-06 12:43:14 +02:00
Andrew Murray
c29648ff53
If save_all PNG only has one frame, do not create animated image
2023-11-03 22:08:48 +11:00
Andrew Murray
a5a6ca150c
Merge pull request #7493 from radarhere/frombytes
...
Fixed frombytes() for images with a zero dimension
2023-11-03 18:56:34 +11:00
Benjamin Gilbert
e572722479
Allow configuring JPEG restart marker interval on save
...
libjpeg allows specifying the marker interval either in MCU blocks or in
MCU rows. Support both, via separate parameters, rather than requiring
callers to do the math.
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-10-31 17:47:25 -05:00
REDxEYE
2f7caad37f
Merge pull request #9 from radarhere/test_open
...
Removed test_open
2023-10-30 14:49:47 +03:00
REDxEYE
e0a726b42e
Merge pull request #8 from radarhere/improved_dds
...
Added test for BC4U
2023-10-30 14:48:27 +03:00
Andrew Murray
c7fbfdc795
Removed test_open
2023-10-30 22:44:52 +11:00
REDxEYE
940224eaad
Remove wrong test_save input
2023-10-30 14:32:28 +03:00
Andrew Murray
ddcbfde446
Test BC4U
2023-10-30 22:22:37 +11:00
Andrew Murray
5fd3035362
Removed duplicate test
2023-10-30 22:16:48 +11:00
Andrew Murray
ee8c9c3522
Removed unused test images
2023-10-30 22:16:39 +11:00
Andrew Murray
e3ff5eb8e4
Test BC1_UNORM and BC1_TYPELESS
2023-10-30 19:53:51 +11:00
Andrew Murray
17be898fc4
Added tests for unimplemented bitcount
2023-10-28 16:58:57 +11:00
Andrew Murray
bff6b4d6a2
Switched from direct setup.py invocation to "pip install ."
2023-10-27 19:17:15 +11:00
Andrew Murray
85485229e3
Support RGB bitcount 8
2023-10-25 16:24:00 +11:00
Benjamin Gilbert
4d7372bfd0
Implement streamtype=1 option for tables-only JPEG encoding
...
We already support streamtype=2 to skip producing JPEG tables, but
streamtype=1, which skips everything but the tables, was never implemented.
The streamtype=1 stub code dates to Git pre-history, so it's not
immediately clear why. Implement the missing support.
jpeg_write_tables() can't resume after a full output buffer (it fails with
JERR_CANT_SUSPEND), so it might seem that Pillow needs to pre-compute the
necessary buffer size. However, in the normal case of producing an
interchange stream, the tables are written via the same libjpeg codepath
during the first jpeg_write_scanlines() call, and table writes aren't
resumable there either. Thus, any buffer large enough for the normal case
will also be large enough for a tables-only file.
The streamtype option isn't documented and this commit doesn't change that.
It does add a test though.
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-10-24 20:30:45 -05:00
Andrew Murray
91f115bead
Fixed im.frombytes() for images with a zero dimension
2023-10-25 08:52:26 +11:00
Andrew Murray
5071692039
Fixed Image.frombytes() for images with a zero dimension
2023-10-25 08:52:06 +11:00
Andrew Murray
f54dd84586
Test unsupported autocontrast mode
2023-10-24 12:44:00 +11:00