Commit Graph

4344 Commits

Author SHA1 Message Date
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
Hugo van Kemenade
3c2310e090
Merge pull request #8739 from radarhere/boolean 2025-02-09 16:05:54 +02:00
Andrew Murray
422c0f607d Use default tp_flags 2025-02-09 16:03:38 +11:00
Andrew Murray
bfa2d64e0e Use member names to initialize PyTypeObjects 2025-02-09 16:02:50 +11:00
Andrew Murray
b59dea60a6 Simplify Python code by receiving tuple from C 2025-02-08 21:07:25 +11:00
Andrew Murray
166d0b94d9 Use boolean format argument for irreversible 2025-02-08 21:00:54 +11:00
Hugo van Kemenade
b57b4e5f2c
Merge pull request #8735 from radarhere/affine 2025-02-06 13:26:24 +02:00
Hugo van Kemenade
a788ab31ca
Merge pull request #8734 from radarhere/module 2025-02-06 13:25:54 +02:00
Hugo van Kemenade
c73796dc1e
Merge pull request #8733 from radarhere/tuple 2025-02-06 13:19:29 +02:00
Andrew Murray
41861e8e9f Updated AffineTransform docstring to mention it uses the inverse matrix 2025-02-06 19:26:49 +11:00
Andrew Murray
7924b6a11f Use member names to initialize modules 2025-02-05 20:20:57 +11:00
Andrew Murray
a37702dd8a Removed unused format character 2025-02-05 19:12:54 +11:00
Andrew Murray
b19506a499 Simplify Python code by passing tuples to C 2025-02-05 19:12:50 +11:00
Andrew Murray
a7d7a1080e Removed redundant argument parsing 2025-02-05 18:42:35 +11:00
Andrew Murray
2810d7c6ba
Merge pull request #8721 from radarhere/justify
Added "justify" align for multiline text
2025-02-04 20:10:39 +11:00
pre-commit-ci[bot]
955d678ca2 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-03 17:36:01 +00:00
Hugo van Kemenade
793e1fcba2
Merge pull request #8709 from radarhere/seek 2025-01-31 14:11:07 +02:00
Hugo van Kemenade
b03f143df1
Merge pull request #8701 from radarhere/stroke_outside 2025-01-31 13:35:22 +02:00
Hugo van Kemenade
84adbe5da8
Support saving PNG cICP chunk (#8704) 2025-01-31 13:24:08 +02:00
Andrew Murray
10eaff8ac7 Added "justify" align for multiline text 2025-01-29 20:12:45 +11:00
Andrew Murray
7093de46a7 Moved common multiline code into _prepare_multiline_text 2025-01-29 19:42:25 +11:00
Andrew Murray
9a4f39588d Use embedded color for text length in multiline_text 2025-01-29 18:58:53 +11:00
Andrew Murray
f598c03233 Removed unused file 2025-01-29 17:33:55 +11:00
Aleksandr Karpinskii
849768df7a Remove unused declaration 2025-01-28 20:40:43 +11:00
Aleksandr Karpinskii
e7ae4aaad0 Use Py_RETURN_NONE macro when possible 2025-01-27 18:17:03 +11:00
Andrew Murray
8a90975c14 Seek relative to current position 2025-01-22 23:14:34 +11:00
Andrew Murray
427244877b Support saving cICP chunk 2025-01-19 15:09:12 +11:00
Andrew Murray
0318304f9a Do not draw normal text onto stroke text if they are the same color 2025-01-18 21:58:15 +11:00
Andrew Murray
8d9279dd73 Only use outside border of stroke in text() 2025-01-18 21:58:04 +11:00
Andrew Murray
c78d23d547 Moved _close_fp into ImageFile 2025-01-18 21:22:44 +11:00
Andrew Murray
4ff18e03b8 Moved file pointer handling into ImageFile close 2025-01-18 20:57:04 +11:00
Hugo van Kemenade
4f7510b77b
Merge pull request #8689 from radarhere/get_child_images 2025-01-17 22:29:50 +02:00
Andrew Murray
be8e55d28d Added deprecation warning 2025-01-17 18:34:23 +11:00
Hugo van Kemenade
bff83cff59
Merge pull request #8568 from radarhere/fixifd 2025-01-16 16:33:42 +02:00
Andrew Murray
c67ed4678b
Moved strings inside debug statement
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-16 23:48:44 +11:00
Andrew Murray
a922126ed7 Assert fp is not None 2025-01-13 07:57:50 +11:00
Andrew Murray
34762ded75 Assert JpegIFByteCount is int 2025-01-13 07:57:28 +11:00
Andrew Murray
5ad98e7abb Moved get_child_images() 2025-01-13 07:54:43 +11:00
Andrew Murray
64bfdff6c8 Only F mode starts with F 2025-01-10 21:51:33 +11:00
Hugo van Kemenade
af3b904233
Merge pull request #8663 from radarhere/bigtiff 2025-01-08 19:15:31 +02:00
Hugo van Kemenade
b69f2045d2
Merge pull request #8662 from radarhere/pyunicode 2025-01-08 19:05:49 +02:00