Commit Graph

159 Commits

Author SHA1 Message Date
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
Hugo van Kemenade
a788ab31ca
Merge pull request #8734 from radarhere/module 2025-02-06 13:25:54 +02: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
Hugo van Kemenade
b03f143df1
Merge pull request #8701 from radarhere/stroke_outside 2025-01-31 13:35:22 +02:00
Aleksandr Karpinskii
e7ae4aaad0 Use Py_RETURN_NONE macro when possible 2025-01-27 18:17:03 +11:00
Andrew Murray
8d9279dd73 Only use outside border of stroke in text() 2025-01-18 21:58:04 +11:00
Andrew Murray
4ecf8cbd75 Simplified code 2025-01-05 14:49:34 +11:00
Lysandros Nikolaou
bb3515d649
Make PyMutex static and get rid of initialization 2024-10-25 17:32:29 +02:00
pre-commit-ci[bot]
7999da38a7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-24 14:07:46 +00:00
Lysandros Nikolaou
c8e301c474
Fix SEGFAULT from calling FT_New_Face/FT_Done_Face in multiple threads 2024-10-24 16:01:28 +02:00
Hugo van Kemenade
535bf234c3
Merge pull request #8341 from uploadcare/use-ptr
Use ImagingCore.ptr instead of ImagingCore.id
2024-10-07 13:37:44 +03:00
Andrew Murray
8de66597f9 Removed unused code 2024-10-07 19:17:59 +11:00
Alexander Karpinsky
af521a1ce1
Merge branch 'main' into use-ptr 2024-09-18 22:24:46 +02:00
Andrew Murray
01ba1e2252 Accept float stroke widths 2024-09-11 19:53:52 +10:00
Aleksandr Karpinskii
882ac783eb Use PyCapsule in _imagingft 2024-09-08 17:30:24 +04:00
Andrew Murray
5cb79c6a69 Check object is bytes 2024-08-16 18:31:07 +10:00
Andrew Murray
7581b48706 Fixed sign comparison warning 2024-08-07 18:44:43 +10:00
pre-commit-ci[bot]
2973b041c7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-16 12:58:04 +00:00
Andrew Murray
76e5e12f98 Simplified code 2024-07-15 20:48:39 +10:00
Lysandros Nikolaou
9c576d63c3
Fix refcounts after porting to GetItemRef & better error checking 2024-07-13 12:24:02 +02:00
Lysandros Nikolaou
f5313db9ce
Add necessary PyMem_Free and fix PyDict_GetItemRef call 2024-07-13 11:00:57 +02:00
Lysandros Nikolaou
40e7f511b3 Don't use PyList_GetItemRef immediately after PyList_New 2024-07-08 15:42:26 +03:00
Hugo van Kemenade
87596bd747 imagingft: Replace PyDict_GetItem with PyDict_GetItemRef 2024-07-08 15:42:26 +03:00
Hugo van Kemenade
69f967301d Call PyUnstable_Module_SetGIL() to indicate support of running with GIL disabled 2024-07-08 14:40:35 +03:00
Andrew Murray
b3e3784b8e Added byte support to FreeTypeFont 2024-06-15 16:06:45 +10:00
pre-commit-ci[bot]
617e7295a8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-04-25 12:51:24 +00:00
Nulano
30015f6236 simplify decompression bomb check in FreeTypeFont.render 2023-12-27 17:05:14 +01:00
Andrew Murray
6768d3aa91
Merge pull request #7497 from ZachNagengast/fix-alpha-for-overlapping-glyphs
Fix incorrect color blending for overlapping glyphs in BGRA mode
2023-12-24 19:03:28 +11:00
Hugo van Kemenade
b638d056d5
Merge pull request #7548 from radarhere/imagefont 2023-12-21 12:55:20 +02:00
Andrew Murray
a6a612c6c5
Merge branch 'main' into fix-alpha-for-overlapping-glyphs 2023-12-02 21:33:29 +11:00
Zach Nagengast
78f78d2aa7
Update src/_imagingft.c
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-11-28 11:53:46 -08:00
Zach Nagengast
9c60e856ad
Apply suggestions from code review
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
2023-11-27 09:20:40 -08:00
Andrew Murray
086ca274fa Decrement reference count for PyObject 2023-11-13 15:11:28 +11:00
Andrew Murray
f016d3079b Determine mask mode in Python instead of C 2023-11-13 14:31:22 +11:00
ZachNagengast
8ecf2e9f30 Merge branch 'fix-alpha-for-overlapping-glyphs' of ssh://github.com/ZachNagengast/Pillow into fix-alpha-for-overlapping-glyphs 2023-11-06 21:11:36 -08:00
ZachNagengast
fdecfca9f4 Update gray glyph blending logic and tests 2023-11-06 21:11:28 -08:00
Zach Nagengast
b15b2d494c
Update src/_imagingft.c
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
2023-11-06 20:48:22 -08:00
ZachNagengast
bb0eff44cd Update blending logic
- Unpremultiply properly
- No longer uses floats
2023-11-03 15:05:55 -07:00
ZachNagengast
f97570f523 Blend colors with alpha when pasting
- Previously took the highest alpha as threshold
2023-10-26 21:40:41 -07:00
Hugo van Kemenade
4d66f9396b
Merge pull request #7247 from radarhere/getmask2_max_image_pixels 2023-10-05 09:28:04 -06:00
Yay295
e7398c7888 update PyTypeObject slot names
tp_print was renamed to tp_vectorcall_offset with Python 3.8, and tp_compare was renamed to tp_as_async with Python 3.5.
tp_size has always been tp_basicsize; I don't know why that one was wrong.
2023-07-02 00:52:08 -05:00
Andrew Murray
74859e965d Moved MAX_IMAGE_PIXELS check to Python 2023-07-01 20:52:44 +10:00
Andrew Murray
39a3b1d83e Fixed deallocating mask images 2023-07-01 18:09:27 +10:00
Andrew Murray
8437d98f7f Limit size even if one dimension is zero 2023-06-28 11:43:05 +10:00
Andrew Murray
fd9bea271a
Compare long long with long long
Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
2023-06-17 14:39:34 +10:00
Andrew Murray
7044038e70 Fixed decompression bomb check 2023-06-17 14:35:44 +10:00
Andrew Murray
98cc2e63ac Destroy image on error 2023-06-15 14:27:38 +10:00