pre-commit-ci[bot]
cff21412c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-01-31 10:29:30 -05:00
Kevin Newton
9b130e6d6c
Reduce memory arena contention
...
Previously there was one memory arena for all threads, making it
the bottleneck for multi-threaded performance. As the number of
threads increased, the contention for the lock on the arena would
grow, causing other threads to wait to acquire it.
This commit makes it use 8 memory arenas, and round-robbins how
they are assigned to threads. Threads keep track of the index that
they should use into the arena array, assigned the first time the
arena is accessed on a given thread.
When an image is first created, it is allocated from an arena.
When the logic to have multiple arenas is enabled, it then keeps
track of the index on the image, so that when deleted it can be
returned to the correct arena.
Effectively this means that in single-threaded programs, this
should not really have an effect. We also do not do this logic if
the GIL is enabled, as it effectively acts as the lock on the
default arena for us.
As expected, this approach has no real noticable effect on regular
CPython. On free-threaded CPython, however, there is a massive
difference (measuring up to about 70%).
2025-01-31 10:29:30 -05: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
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
Hugo van Kemenade
01792cbff0
Merge pull request #8652 from radarhere/tile
2025-01-08 19:03:31 +02:00
Hugo van Kemenade
a9dcac0f31
Merge pull request #8660 from HarmvandenBrand/tiff_plugin_error_msg
2025-01-08 18:59:31 +02:00
Hugo van Kemenade
5654c863bf
Merge pull request #8639 from radarhere/jfif_dpi
2025-01-08 18:45:09 +02:00
Hugo van Kemenade
6bce9aa461
Merge pull request #8645 from radarhere/mozjpeg
2025-01-08 18:44:21 +02:00
Andrew Murray
a8381c619d
Allow upgrading LONG to LONG8
2025-01-07 21:51:00 +11:00
Andrew Murray
618339e2d2
Allow saving multiple frames as BigTIFF
2025-01-07 21:51:00 +11:00
Andrew Murray
4ecf8cbd75
Simplified code
2025-01-05 14:49:34 +11:00
Andrew Murray
73a383fa72
Use rawmode instead of splitting and merging
2025-01-05 06:11:54 +11:00
Andrew Murray
bd56a95659
Use namedtuple _replace
2025-01-05 05:30:14 +11:00
Harm.van.den.brand@alliander.com
036db2da87
OSError caused by decode error should use string argument to be in line with rest of module
2025-01-03 12:50:19 +01:00
Marc Mueller
1678f7f215
Add overloads for exif_transpose
2025-01-02 17:38:21 +01:00
Andrew Murray
57786a252b
11.2.0.dev0 version bump
2025-01-02 19:04:18 +11:00
Andrew Murray
4c1aed801e
11.1.0 version bump
2025-01-02 16:00:59 +11:00
Andrew Murray
6b75e06875
Do not reread start of header in decoder
2025-01-01 22:58:04 +11:00
Andrew Murray
b89cc09944
Corrected BLP1 alpha depth handling
2025-01-01 12:22:55 +11:00
Andrew Murray
8d78cfcc5a
Added return types
2025-01-01 09:10:16 +11:00
Andrew Murray
17f09f3993
Merge pull request #8644 from radarhere/c99
...
Remove pre-C99 definitions
2024-12-31 22:57:57 +11:00
Andrew Murray
ae59b03956
Do not use MozJPEG progressive default
2024-12-31 21:44:57 +11:00
Andrew Murray
06e02cc1d9
Added compile-time mozjpeg feature flag
2024-12-31 21:44:57 +11:00
Andrew Murray
f91b111fac
Removed pre-C99 definitions
2024-12-31 20:42:49 +11:00
Andrew Murray
8bdcadcbe9
Renamed argument to big_tiff
2024-12-31 10:16:00 +11:00
Andrew Murray
2ac383028a
Allow saving as BigTIFF
2024-12-31 01:26:13 +11:00
Andrew Murray
7d5ccffae3
Merge pull request #8629 from radarhere/makernote
...
Restored Makernote as a deprecated enum
2024-12-30 21:52:04 +11:00
Andrew Murray
050caa9cae
Restored Makernote as a deprecated enum
2024-12-30 21:14:23 +11:00
Andrew Murray
7cee64ad1b
Use endswith
2024-12-30 19:45:46 +11:00
Andrew Murray
167ed55d8b
Use elif
2024-12-30 19:37:38 +11:00