Andrew Murray
7b163cc35d
Use mask in C when drawing wide polygon lines ( #8984 )
2025-06-10 11:46:12 +10:00
Hugo van Kemenade
05636dca17
Simplify code ( #8863 )
2025-06-09 19:33:55 +03:00
Andrew Murray
7341e70f6b
Reduced number of bytes read for header
2025-06-09 12:21:53 +10:00
Andrew Murray
313969cf0b
Removed unnecessary seek
2025-06-09 12:21:49 +10:00
Andrew Murray
ef1f90fe1c
Check for equality rather than inequality
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-09 09:06:08 +10:00
Andrew Murray
0bb99e5561
Use save parameters as encoderinfo defaults
2025-06-07 15:08:16 +10:00
renovate[bot]
f3b05d6fab
Update dependency mypy to v1.16.0 ( #8991 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-06-07 11:07:21 +10:00
Andrew Murray
f03c23683e
Trim whitespace from end when parsing XMP data
2025-06-04 20:08:58 +10:00
Andrew Murray
cb077a16c8
Handle UNDEFINED XMP data
2025-06-04 20:07:13 +10:00
pre-commit-ci[bot]
070e1eba62
[pre-commit.ci] pre-commit autoupdate ( #8993 )
2025-06-03 14:08:24 +10:00
Andrew Murray
95603e9717
Use ImageFile.MAXBLOCK in tobytes() ( #8906 )
2025-06-02 20:14:11 +10:00
Andrew Murray
892fd2c2af
Removed unreachable code ( #8918 )
2025-06-01 15:41:48 +10:00
wiredfool
256f6ea1c1
Valgrind Memory Leak Checking ( #8954 )
2025-05-30 14:28:40 +01:00
wiredfool
0ba69613c9
Add support for flat uint8 arrow arrays for multi channel images ( #8908 )
2025-05-30 13:11:09 +01:00
wiredfool
22d6265063
Updated docstring ( #8943 )
2025-05-30 13:06:47 +01:00
wiredfool
e16f387bdf
Mention that tobytes() with the raw encoder uses Pack.c ( #8878 )
2025-05-30 13:01:19 +01:00
wiredfool
506691729a
Apply suggestions from code review
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-05-30 10:40:35 +01:00
Andrew Murray
62da23bf83
Removed polygon from DRAW struct
2025-05-29 18:27:22 +10:00
Andrew Murray
fcac6e7896
Removed hasAlpha argument
2025-05-29 18:27:17 +10:00
Andrew Murray
2ee2a1496d
Simplified code
2025-05-29 18:26:09 +10:00
Andrew Murray
5000c83bcc
Use multi-phase initialization
2025-05-28 23:50:18 +10:00
Andrew Murray
5b854b2332
Merge branch 'main' into valgrind-leakcheck
2025-05-28 08:27:57 +10:00
Andrew Murray
bcc6e42bf8
Fixed saving MPO with more than one appended image
2025-05-27 21:08:58 +10:00
wiredfool
eff667a861
Mark the image read-only in the C layer if it's created from a read only buffer
2025-05-26 08:15:13 +10:00
Andrew Murray
041acf1344
Clear core image if memory mapping was used for last load
2025-05-25 15:00:47 +10:00
Andrew Murray
a4f477565a
Merge branch 'main' into fix_arrow_8907
2025-05-24 10:34:05 +10:00
Andrew Murray
4eb89f8e5b
Reduced number of bytes read for header
2025-05-24 10:24:42 +10:00
Eric Soroos
ff50e30d3e
Fix memory leak in text_layout_raqm on 0 length string
2025-05-16 12:47:22 +02:00
Eric Soroos
6391f2c207
Merge remote-tracking branch 'upstream/main' into valgrind-leakcheck
...
* Some failing tests are on main but not last released version
2025-05-16 12:14:37 +02:00
Eric Soroos
d5449d5760
Guess so.
2025-05-15 21:11:31 +02:00
Eric Soroos
789631c60c
Fix memory leak when JpegEncode returns an error.
2025-05-13 23:31:09 +02:00
Eric Soroos
f792e0b1ef
Fix memory leak
...
* Return after setting the error for advanced features without
libraqm. Not returning here leads to an alloc that's never freed.
2025-05-13 22:48:36 +02:00
Eric Soroos
e2e40c5456
Fix memory leak in TiffEncode
...
* If setimage errors out, the tiff client state was not freed.
2025-05-13 22:33:27 +02:00
Eric Soroos
a9bcd7db88
Fix leak of destination image in ImagingUnsharpMask when an error occurs
2025-05-13 19:50:55 +02:00
Eric Soroos
eaab435403
Fix leak in webp_encode
...
* Free the output buffer on webp encode error
2025-05-13 10:58:37 +02:00
Eric Soroos
fdfba982c8
fix memory leak in arrow schema
2025-05-13 10:28:09 +02:00
Eric Soroos
74ab5ac4cd
Fix memory leak in arrow export using array structure
2025-05-12 00:27:56 +02:00
Andrew Murray
4d56b90f38
Updated docstring
2025-05-05 07:12:20 +10:00
Andrew Murray
0e292a80c8
Restore original encoderinfo after saving
2025-05-03 00:52:35 +10:00
Andrew Murray
47bebfc801
Allow loading state from Pillow < 11.2.1
2025-04-29 14:57:10 +10:00
Andrew Murray
225182414c
libavif below 1.0 is not supported
2025-04-25 17:14:13 +10:00
Andrew Murray
3bd55822cd
Handle IPTC TIFF tags with incorrect type
2025-04-24 13:26:58 +10:00
Andrew Murray
d8afcb762f
Do not update palette for L mode frame
2025-04-23 23:09:08 +10:00
Andrew Murray
1e365d8c72
Return PixelAccess on first load
2025-04-23 21:10:54 +10:00
Andrew Murray
7a48a9fae0
Do not load image more than once
2025-04-23 20:34:53 +10:00
wiredfool
ce204f47f4
lint
2025-04-21 10:37:32 +01:00
Andrew Murray
8fe7a7aaf8
Update redirected URL
2025-04-21 17:32:47 +10:00
Adian Kozlica
4402797b35
Add support for Grim in Wayland sessions ImageGrab ( #8912 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-04-21 12:36:40 +10:00
wiredfool
ac500460df
lint
2025-04-17 22:22:31 +01:00
wiredfool
3d77723a0c
Added arrow support for a flat array of 4*uint8 for image32 modes
2025-04-17 21:42:42 +01:00
Andrew Murray
bc05a88ce6
Anchor left when justifying words
2025-04-17 20:56:02 +10:00
Andrew Murray
b955cee725
Do not justify last line
2025-04-17 19:36:52 +10:00
Andrew Murray
cccc07269a
Do not justify a single word
2025-04-17 19:23:24 +10:00
Andrew Murray
c6434dbbbc
Set color table fourth channel to zero for 1 and L mode when saving
2025-04-13 23:00:06 +10:00
Hugo van Kemenade
f9083264ff
11.3.0.dev0 version bump
2025-04-12 20:56:35 +03:00
Hugo van Kemenade
339bc5db93
11.2.1 version bump
2025-04-12 19:55:46 +03:00
Hugo van Kemenade
7a0092f207
Remove incomplete 11.2.0 release, bill as 11.2.1 instead
2025-04-12 18:56:38 +03:00
Andrew Murray
af52060e97
Mention that tobytes() with the raw encoder uses Pack.c
2025-04-10 20:45:53 +10:00
Andrew Murray
34efaaddf3
Improved type hints
2025-04-10 18:57:58 +10:00
Andrew Murray
6512a8e371
Test not enough image data
2025-04-10 18:57:58 +10:00
Andrew Murray
395bd6bd12
Allow more than 256 colours
2025-04-10 18:57:58 +10:00
Andrew Murray
89ac20d2b9
Allow more than 1 character per pixel
2025-04-10 18:57:58 +10:00
Andrew Murray
7b459a8524
Improved reading XPM images
2025-04-10 18:57:58 +10:00
Hugo van Kemenade
8c4510cb23
Fix clang-format: Configuration file(s) do(es) not support C
2025-04-07 22:25:12 +03:00
pre-commit-ci[bot]
a5a8ece5d2
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-04-07 17:17:36 +00:00
Frankie Dintino
9f654ff748
Fixed conversion of AVIF image rotation property to EXIF orientation ( #8866 )
2025-04-04 16:41:11 +03:00
Andrew Murray
9f4195752d
Added type hints ( #8867 )
2025-04-03 13:24:37 +03:00
Andrew Murray
2d452c82e5
Removed condition that is always true ( #8862 )
2025-04-03 13:17:54 +03:00
Andrew Murray
8dbbce624f
Compare absolute path of filename
2025-04-02 12:16:25 +11:00
Andrew Murray
1103e82d17
Include filename in state
2025-04-02 11:14:58 +11:00
mergify[bot]
7c56b383ff
Merge pull request #8842 from AdianKozlica/image_grab_wayland_kde
...
Add KDE Wayland support for ImageGrab
2025-04-01 09:38:56 +00:00
mergify[bot]
64178415e6
Merge pull request #8852 from radarhere/save
...
Only change readonly if saved filename matches opened filename
2025-04-01 09:22:14 +00:00
Andrew Murray
98e74fd7a0
Merge pull request #8516 from radarhere/imagegrab
...
Allow HWND to be passed to ImageGrab.grab() on Windows
2025-04-01 18:45:03 +11:00
Adian Kozlica
2b62c0beeb
Merge branch 'main' into image_grab_wayland_kde
2025-04-01 09:43:52 +02:00
Andrew Murray
a7537b1b06
Only change readonly if saved filename matches opened filename
2025-04-01 18:31:04 +11:00
wiredfool
5c76e7ec17
Image -> Arrow support ( #8330 )
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-01 09:10:45 +03:00
Frankie Dintino
7d50816f0a
Add AVIF plugin (decoder + encoder using libavif) ( #5201 )
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-01 07:13:21 +03:00
Andrew Murray
f673f3e543
Close file handle on error ( #8846 )
2025-03-30 21:16:50 +03:00
Andrew Murray
4236b583a1
Do not import TYPE_CHECKING
2025-03-30 22:16:16 +11:00
pre-commit-ci[bot]
d2683e052f
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-03-30 11:13:51 +00:00
Andrew Murray
80d5b421eb
Do not import type checking
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-30 22:13:21 +11:00
Andrew Murray
ca9f4f8304
Merge branch 'main' into imagegrab
2025-03-30 21:53:23 +11:00
Adian Kozlica
ec11f7aaed
Merge branch 'main' into image_grab_wayland_kde
2025-03-29 23:51:29 +01:00
Andrew Murray
bce83ac800
Enable mmap on PyPy ( #8840 )
2025-03-29 18:36:36 +02:00
Andrew Murray
25653d2f87
Corrected P mode save ( #8685 )
2025-03-29 18:34:42 +02:00
Andrew Murray
e8a9b56603
Improved connecting discontiguous corners ( #8659 )
2025-03-29 18:33:51 +02:00
Andrew Murray
03dc994baa
Check that _fp type is not DeferredError before use ( #8640 )
2025-03-29 18:30:30 +02:00
Andrew Murray
6bffa3a9d4
Only read until the offset of the next tile ( #8609 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-29 18:29:02 +02:00
Andrew Murray
140e426082
Added USE_RAW_ALPHA ( #8602 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-29 18:27:00 +02:00
Andrew Murray
93cdfeb488
Prevent TIFFRGBAImageBegin from applying image orientation ( #8556 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-29 18:25:57 +02:00
Andrew Murray
6d42449788
Allow loading of EMF images at a given DPI ( #8536 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-29 18:25:13 +02:00
Hugo van Kemenade
2579973815
Merge pull request #8506 from radarhere/emf_records
...
Skip failing records when rendering WMF images
2025-03-29 18:19:10 +02:00
Andrew Murray
e685e2833e
Do not create temporary file if no utility is available
2025-03-29 18:27:02 +11:00
Adian Kozlica
eeb494abf7
Fix formatting
2025-03-28 17:18:09 +01:00
Adian Kozlica
722283e819
Add KDE Wayland support for ImageGrab
2025-03-28 16:43:10 +01:00
Andrew Murray
10ccbd7788
If append_images is populated, default save_all to True ( #8781 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-27 18:01:09 +02:00
Hugo van Kemenade
095f5992bc
Merge pull request #8826 from radarhere/gimp
...
Added GimpPaletteFile frombytes() to allow for unlimited parsing
2025-03-27 14:47:29 +02:00
Andrew Murray
3c185d1f69
Do not load image during save if file extension is unknown ( #8835 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-27 14:44:27 +02:00
Andrew Murray
295a5e9bd7
Do not convert BC1 LUT to UINT32
2025-03-27 21:36:17 +11:00
Andrew Murray
510bc05577
Added frombytes() to allow for unlimited parsing
2025-03-20 23:12:35 +11:00
Andrew Murray
0888dc02ac
Allow for two header fields and a comment
2025-03-20 23:10:09 +11:00
Andrew Murray
acd8548f6e
Removed FIXME
2025-03-20 22:36:59 +11:00
Andrew Murray
ba2c4291ea
Updated comment
2025-03-19 19:22:15 +11:00
Hugo van Kemenade
e1bf0f647f
Merge pull request #8805 from radarhere/gimp
...
Start from zero index when reading GimpPaletteFile
2025-03-18 15:32:24 +02:00
Hugo van Kemenade
74fec91d33
Merge pull request #8807 from radarhere/dxt1
...
Support saving DDS images with pixel formats
2025-03-18 15:31:38 +02:00
Andrew Murray
841ba163fd
If every tile covers the image, only use the last offset
2025-03-18 00:21:08 +11:00
Andrew Murray
cd11792c15
Added BC5 saving
2025-03-17 07:55:25 +11:00
Andrew Murray
b0315cc603
Added BC2 loading and saving
2025-03-17 07:55:24 +11:00
Andrew Murray
f1a61a1e76
Added DXT3 saving
2025-03-17 07:55:24 +11:00
Andrew Murray
9f619b814f
Added BC3 loading and saving
2025-03-17 07:55:24 +11:00
Andrew Murray
9430bbe5a1
Added DXT5 saving
2025-03-17 07:55:24 +11:00
Andrew Murray
3dbd0e57ba
Added DXT1 encoding
2025-03-17 07:55:24 +11:00
Andrew Murray
669a288beb
Convert all entries to bytes at once
2025-03-17 07:52:51 +11:00
Andrew Murray
ca0c940cb1
Do not add palette entries when reading other lines
2025-03-17 07:52:51 +11:00
Andrew Murray
6e597a1ca7
Do not force palette length to be 256
2025-03-17 07:52:51 +11:00
Andrew Murray
1f6fd3b994
Only convert to int if there are enough items
2025-03-17 07:52:51 +11:00
Andrew Murray
e1cd9ad5ac
Use maxsplit
2025-03-17 07:52:51 +11:00
Andrew Murray
5ba72a9b54
Merge pull request #8800 from radarhere/path_lists
...
Allow coords to be sequence of lists
2025-03-05 19:15:55 +02:00
Hugo van Kemenade
5e9eea12f3
Merge pull request #8803 from radarhere/abstract
...
Use ABCMeta in classes with abstractmethod
2025-03-05 18:15:33 +02:00
Hugo van Kemenade
ebdfca329e
Merge pull request #8786 from radarhere/openjpeg
...
Support reading grayscale JPEG2000 images with 4 channels
2025-03-05 18:07:20 +02:00
Hugo van Kemenade
00593ff3f8
Merge pull request #8780 from radarhere/save_all
...
Allow encoderconfig and encoderinfo to be set for appended TIFF images
2025-03-05 18:04:28 +02:00
Andrew Murray
d186a2a8d6
Replace NotImplementedError with abstractmethod
2025-03-05 21:50:09 +11:00
Andrew Murray
2309f0fa60
Inherit classes with abstractmethod from ABC
2025-03-05 21:30:24 +11:00
Hugo van Kemenade
a2b13cc02a
Call startswith/endswith once with a tuple
2025-03-03 23:57:40 +02:00
Hugo van Kemenade
e4cac21044
Don't use start=0 in range()
2025-03-03 23:57:40 +02:00
Hugo van Kemenade
721a2fe3b1
Merge pull request #8792 from radarhere/xmp
...
Corrected exif_transpose error when XMP is tuple
2025-03-03 18:44:55 +02:00
Hugo van Kemenade
7700293438
Merge pull request #8793 from radarhere/gd
...
Fixed loading GD images
2025-03-03 18:43:03 +02:00
Hugo van Kemenade
a4f5feaf74
Merge pull request #8794 from radarhere/outline
...
Image.core.outline will no longer raise an AttributeError
2025-03-03 18:19:30 +02:00
Hugo van Kemenade
4e550d47f3
Merge pull request #8791 from python-pillow/renovate/mypy-1.x
...
Update dependency mypy to v1.15.0
2025-03-03 18:10:42 +02:00
Hugo van Kemenade
1a62ef9855
Merge pull request #8782 from radarhere/imagetk
...
Removed ImageTk._show
2025-03-03 18:08:13 +02:00
Hugo van Kemenade
989a35830b
Merge pull request #8773 from radarhere/eof
...
_seek_check already raises an EOFError
2025-03-03 17:36:24 +02:00
Andrew Murray
a1a467bda2
Image.core.outline will no longer raise an AttributeError
2025-03-03 23:55:19 +11:00
Andrew Murray
51183c2204
Fixed loading images
2025-03-03 21:58:29 +11:00
Andrew Murray
4161bb1645
Corrected error when XMP is tuple
2025-03-03 19:10:55 +11:00
Andrew Murray
d6272297fc
Ignore override
2025-03-03 14:48:00 +11:00
Andrew Murray
92cc9bf902
Support reading grayscale images with 4 channels
2025-03-03 08:46:20 +11:00
Andrew Murray
ebc7a17d86
Removed _show
2025-03-03 07:24:13 +11:00
Andrew Murray
5c93145061
Allow encoderconfig and encoderinfo to be set for appended TIFF images
2025-02-28 22:16:52 +11:00
Andrew Murray
3407f765cc
Document using encoderinfo on subsequent frames from #8483
2025-02-28 10:28:48 +11:00
Andrew Murray
85f439f575
_seek_check already raises an EOFError
2025-02-25 18:46:22 +11:00
Andrew Murray
ddb238c70d
Only set mode when necessary
2025-02-20 07:57:10 +11:00
Hugo van Kemenade
9665eb3972
Replace slice and comparison with endswith
2025-02-17 23:39:33 +02:00
Hugo van Kemenade
1e574e6f8b
Replace slice and comparison with startswith
2025-02-17 23:39:33 +02:00
Hugo van Kemenade
a254b8cfeb
Merge pull request #8741 from radarhere/type
2025-02-17 13:29:44 +02:00
Hugo van Kemenade
3f111b986e
Merge pull request #8748 from radarhere/gif
2025-02-17 13:07:20 +02:00
Michał Górny
0fbe1860c4
Update pythoncapi_compat.h to fix building with PyPy3.11
...
Update `pythoncapi_compat.h` to upstream commit
c84545f0e1e21757d4901f75c47333d25a3fcff0, which includes fixes necessary
for Pillow to build against PyPy3.11. Otherwise, it fails due to
duplicate declarations:
```
In file included from src/encode.c:28:
src/thirdparty/pythoncapi_compat.h:295:1: error: static declaration of ‘PyThreadState_GetInterpreter’ follows non-static declaration
295 | PyThreadState_GetInterpreter(PyThreadState *tstate)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/pypy3.11/Python.h:80,
from src/encode.c:26:
/usr/include/pypy3.11/pystate.h:35:33: note: previous declaration of ‘PyThreadState_GetInterpreter’ with type ‘PyInterpreterState *(PyThreadState *)’ {aka ‘struct _is *(struct _ts *)’}
35 | PyAPI_FUNC(PyInterpreterState*) PyThreadState_GetInterpreter(PyThreadState *tstate);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2025-02-16 16:32:24 +01:00
Andrew Murray
f8566b90eb
Merge pull request #8755 from hugovk/rm-_wedge
...
Remove debug `Image._wedge`
2025-02-16 04:54:27 +11:00
Hugo van Kemenade
ff960b8841
Remove debug Image._wedge
2025-02-15 16:35:07 +02:00
Hugo van Kemenade
1c18d29c34
Remove unused bdf_slant and bdf_spacing variables
2025-02-15 13:26:06 +02:00
Andrew Murray
8f4bfe1fe5
Only crop when saving with disposal method 2 if transparency is present
2025-02-12 19:12:27 +11:00