Compare commits

...

2625 Commits
10.4.x ... main

Author SHA1 Message Date
Hugo van Kemenade
877527cefc
Fix typo (#9632) 2026-05-15 12:41:28 +03:00
Andrew Murray
dcd6d41e77 Fixed typo 2026-05-15 18:42:04 +10:00
Hugo van Kemenade
94ec04d33e
Switch iOS back to macos-26-intel (#9631) 2026-05-15 11:41:19 +03:00
Andrew Murray
764e315923 Revert "Switch iOS back to macos-15-intel"
This reverts commit 27de86483d.
2026-05-15 15:02:42 +10:00
Hugo van Kemenade
0802206cfc
Update free-threading CI (#9625) 2026-05-14 15:02:56 +03:00
Hugo van Kemenade
e7556b19b7
Don't use list as default in PdfParser read_prev_trailer (#9629) 2026-05-14 14:09:33 +03:00
Hugo van Kemenade
3f74d08263
Remove default sep="="
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-05-14 14:05:55 +03:00
Hugo van Kemenade
e9855d1705
Remove unused params
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-05-13 13:30:01 +03:00
danigm
f0f67f8cf8
PdfParser: Fix typing in read_prev_trailer
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-05-13 11:37:39 +02:00
Hugo van Kemenade
c48b302602
Consistently use "coordinates" instead of "co-ordinates" (#9628) 2026-05-13 12:25:09 +03:00
Daniel Garcia Moreno
78ee80a6fd PdfParser: Don't use list as def in read_prev_trailer
It's not recommended to use the empty list as default value in functions
or methods because Python interpreter evaluates during parsing, so it
will be the same list for different calls.

https://pylint.pycqa.org/en/latest/user_guide/messages/warning/dangerous-default-value.html
2026-05-13 11:14:41 +02:00
Andrew Murray
381e264e18 Consistently use "coordinates" instead of "co-ordinates"
Co-authored-by: mokashang <mokashang@users.noreply.github.com>
2026-05-13 19:13:21 +10:00
Andrew Murray
9289863c2c
Add support for Python 3.15 (#9624) 2026-05-13 07:54:40 +10:00
Hugo van Kemenade
4dc442fb01 Don't force PYTHON_GIL=0, instead fail if anything re-enables 2026-05-12 23:45:03 +03:00
Hugo van Kemenade
0582f43bad No longer test experimental 3.13t 2026-05-12 20:41:07 +03:00
Hugo van Kemenade
22e47e38bb Simplify setting PYTHON_GIL 2026-05-12 20:41:07 +03:00
Hugo van Kemenade
954269051b
Do not draw line or arc if width is zero (#9589) 2026-05-12 19:55:18 +03:00
Andrew Murray
3ce681240f
Use _accept check in WebP _open (#9605) 2026-05-12 12:11:38 +10:00
Hugo van Kemenade
ea5901535d
Compare dist sizes vs latest PyPI release (#9621)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-05-12 07:31:03 +10:00
Andrew Murray
24696af889
Increase AVIF test epsilon for riscv64 (#9606) 2026-05-08 19:50:29 +10:00
Hugo van Kemenade
7be56cc100
Do not generate SBOM in scheduled run on fork (#9620) 2026-05-07 22:59:33 +03:00
Andrew Murray
70713d69b0 Do not generate SBOM in scheduled run on fork 2026-05-07 23:53:24 +10:00
Andrew Murray
894c5d5335 Width is always provided 2026-05-07 19:48:08 +10:00
Andrew Murray
f693a3a0e5
Use plugin method directly when saving PDFs (#9547) 2026-05-06 23:51:16 +10:00
mergify[bot]
6a05e34b69
[pre-commit.ci] pre-commit autoupdate (#9617) 2026-05-04 17:58:03 +00:00
pre-commit-ci[bot]
903065f5e9
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.9 → v0.15.12](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.9...v0.15.12)
- [github.com/pre-commit/mirrors-clang-format: v22.1.2 → v22.1.4](https://github.com/pre-commit/mirrors-clang-format/compare/v22.1.2...v22.1.4)
- [github.com/python-jsonschema/check-jsonschema: 0.37.1 → 0.37.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.37.1...0.37.2)
- [github.com/zizmorcore/zizmor-pre-commit: v1.23.1 → v1.24.1](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.23.1...v1.24.1)
- [github.com/tox-dev/pyproject-fmt: v2.21.0 → v2.21.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.21.0...v2.21.1)
2026-05-04 17:17:50 +00:00
renovate[bot]
689a7f37fd
Update google/oss-fuzz digest to d872252 (#9614) 2026-05-04 21:45:55 +10:00
Hugo van Kemenade
599ddd368c
Set Renovate prCreation to not-pending (#9616) 2026-05-04 13:44:13 +03:00
Andrew Murray
ab25042353 Set prCreation to not-pending 2026-05-04 19:42:55 +10:00
Hugo van Kemenade
1cd2d0f67a
Update dependency lcms2 to v2.19 (#9609) 2026-05-03 19:06:59 +03:00
Hugo van Kemenade
5f469b6bd2
Update dependency libpng to v1.6.58 (#9608) 2026-05-03 19:06:30 +03:00
Hugo van Kemenade
ead2f34515
Update dependency harfbuzz to v14 (#9610) 2026-05-03 19:06:13 +03:00
Hugo van Kemenade
a6fc9992f2
Update dependency mypy to v1.20.2 (#9599) 2026-05-03 19:05:49 +03:00
Andrew Murray
2128d6465c Do not draw line or arc if width is zero 2026-05-03 22:41:33 +10:00
Andrew Murray
4bba24632f Update docs 2026-05-03 22:13:11 +10:00
Andrew Murray
21790fc0da Check if sys.stdout is a TextIOWrapper instance 2026-05-03 13:26:42 +03:00
Andrew Murray
c234720aca Convert Exif to dictionary before checking 2026-05-03 13:26:42 +03:00
renovate[bot]
575b33d811 Update dependency mypy to v1.20.2 2026-05-03 13:26:42 +03:00
Hugo van Kemenade
82614324ed
Raise error if PNG transparency has incorrect type or length when saving (#9536) 2026-05-03 13:25:49 +03:00
renovate[bot]
32b6c5f0ee
Update dependency harfbuzz to v14 2026-05-03 10:25:32 +00:00
renovate[bot]
956d434c68
Update dependency lcms2 to v2.19 2026-05-03 10:25:27 +00:00
renovate[bot]
3bbb7a2a04
Update dependency libpng to v1.6.58 2026-05-03 10:25:22 +00:00
Hugo van Kemenade
b656f900b4
If PdfParser buffer is memoryview, release it when closing (#9596) 2026-05-03 13:23:51 +03:00
Hugo van Kemenade
586604d0c3
Update github-actions (#9611) 2026-05-03 10:20:37 +03:00
renovate[bot]
d92b826c4a
Update github-actions 2026-05-03 06:03:07 +00:00
renovate[bot]
2d02654c54
Update dependency cibuildwheel to v3.4.1 (#9607) 2026-05-03 14:11:33 +10:00
Hayato Ikoma
7e4ca8b3ab
Correct integer overflow in 16-bit resampling (#9480)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-05-02 14:36:20 +10:00
Hugo van Kemenade
be8563347b
SBOM: Use real versions from dependencies.json (#9593) 2026-05-01 00:05:37 +03:00
Hugo van Kemenade
fc47d07603
No need to sort a sorted list 2026-04-30 16:17:39 +03:00
Hugo van Kemenade
7fe1b9ee04
Restrict SBOM upload to only Pillow JSON (#9598) 2026-04-30 16:13:24 +03:00
Andrew Murray
4af29fb732 Restrict SBOM upload to Pillow JSON 2026-04-30 18:41:41 +10:00
Andrew Murray
1f3b8a831d If PdfParser buffer is memoryview, release it when closing 2026-04-30 00:13:37 +10:00
Andrew Murray
0ef81c33af
Add Fedora 44 (#9594) 2026-04-29 10:30:17 +10:00
Hugo van Kemenade
3dda1d190f Git ignore generated SBOM 2026-04-28 15:58:33 +03:00
Hugo van Kemenade
f2ee74b2f8 Use versions from dependencies.json, remove historical 'tested on' 2026-04-28 15:58:33 +03:00
Hugo van Kemenade
99869f0313 Sort things alphabetically to make easier to find 2026-04-28 15:52:41 +03:00
Andrew Murray
fe054a1b3f
Added CVEs to 12.2.0 release notes (#9591)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-04-28 08:53:21 +10:00
Hugo van Kemenade
852a832832
Deduplicate path triggers in workflows (#9590) 2026-04-27 18:35:58 +03:00
Hugo van Kemenade
755b73b274 Deduplicate path triggers in workflows 2026-04-27 14:14:13 +03:00
Hugo van Kemenade
f0fe496315 Fix typo to trigger on self change 2026-04-27 13:44:52 +03:00
Hugo van Kemenade
fba17910aa
Test Ubuntu 26.04 LTS (Resolute Raccoon) (#9587) 2026-04-26 12:05:56 +03:00
Jeffrey 'Alex' Clark
d2b20102e4
Generate CycloneDX SBOM at release time via CI (#9550)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
2026-04-26 00:35:21 +03:00
Hugo van Kemenade
8c522096e8 Archive non-amd64 variants of 24.04 2026-04-25 14:38:17 +03:00
Hugo van Kemenade
855774a175 Test Ubuntu 26.04
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-04-25 14:06:06 +03:00
Hugo van Kemenade
2ae2c4e84f
Skip EPS test_1 for Ghostscript 10.06.0 (#9588) 2026-04-25 08:58:02 +03:00
Andrew Murray
a908c62460 Skip test_1 for Ghostscript 10.06.0 2026-04-25 13:19:01 +10:00
Andrew Murray
53800d4fcf
Raise ValueError if ImageOps border has unsupported format (#9426) 2026-04-24 21:10:05 +10:00
Andrew Murray
a0cd878bed
Check PyLong_AsVoidPtr result (#9548) 2026-04-24 21:04:00 +10:00
Jeffrey 'Alex' Clark
4e0aeba4af
Revise development support information in README (#9583) 2026-04-22 22:22:50 -04:00
Jeffrey 'Alex' Clark
5f9112e862
Update README.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-22 22:22:33 -04:00
Jeffrey 'Alex' Clark
9605fccf00
Revise development support information in README
Updated development support section with new sponsors.
2026-04-22 21:25:52 -04:00
Jeffrey 'Alex' Clark
1382fc4767
Add INCIDENT_RESPONSE.md (#9555) 2026-04-22 20:12:57 -04:00
Jeffrey 'Alex' Clark
c8c391b9c0 Update .github/INCIDENT_RESPONSE.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-22 20:11:03 -04:00
Jeffrey 'Alex' Clark
ecef4fb33f
Add STRIDE threat model to security docs (#9562) 2026-04-22 12:33:03 -04:00
Jeffrey 'Alex' Clark
0cb00acc92 Update docs/handbook/security.rst
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-22 12:32:08 -04:00
Jeffrey 'Alex' Clark
da06640873 docs: fix nested inline markup in E-3 and E-4 headings
RST does not allow inline markup (backticks) nested inside bold
markers. Remove backticks from the E-3 and E-4 heading text so
they render correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 11:58:06 -04:00
Jeffrey 'Alex' Clark
d3b73ea462
Update docs/handbook/security.rst
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-21 11:33:48 -04:00
Jeffrey 'Alex' Clark
5af49b380e docs: address Andrew's review comments on security.rst
- Add image.getexif() alongside image._getexif() in T-1 mitigations
- Remove 'appended bytes' from T-2 (Pillow does not preserve them on resave)
- Reframe R-1 threat as user-facing (not Pillow dev advice); add
  DecompressionBombError to the log/alert list
- Add blank line before E-3 heading
- Qualify dependency list in recommendation #4 as non-exhaustive

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 11:32:36 -04:00
Jeffrey 'Alex' Clark
1f026416f9
Update docs/handbook/security.rst
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-21 11:23:54 -04:00
Jeffrey 'Alex' Clark
114e4d5695 docs: list all 8 C extensions in security threat model diagram
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 11:22:58 -04:00
Jeffrey 'Alex' Clark
2911422753 s/littlecms/littlecms2/ 2026-04-21 11:11:00 -04:00
Jeffrey 'Alex' Clark
13433dc0a9 Update docs/handbook/security.rst
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-21 11:10:19 -04:00
Hugo van Kemenade
9f6a6a6921
Catch subprocess.CalledProcessError in test_grab_x11 (#9578) 2026-04-21 13:17:20 +03:00
Andrew Murray
9867b51d89 Catch subprocess.CalledProcessError in test_grab_x11 2026-04-21 07:51:50 +10:00
Hugo van Kemenade
087376dc18
Hash pin GitHub Actions (#9568) 2026-04-17 17:18:41 +03:00
Hugo van Kemenade
2593703e51 Hash pin GitHub Actions 2026-04-17 15:54:41 +03:00
Jeffrey 'Alex' Clark
74e07b5b8a Lint 2026-04-16 06:48:09 -04:00
Jeffrey 'Alex' Clark
07b20b3b33 Remove Sensitive exception messages 2026-04-16 06:45:55 -04:00
Jeffrey 'Alex' Clark
0c0bdf8d5a Update security docs
- docs/handbook/security.rst
- .github/SECURITY.md

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-15 13:07:37 -04:00
Jeffrey 'Alex' Clark
b300e78838 Update docs/handbook/security.rst
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 13:07:30 -04:00
Andrew Murray
b893310045
Reorder renovate.json (#9565) 2026-04-16 00:22:23 +10:00
Andrew Murray
b27ae0b2fd Reorder to match dependencies order 2026-04-15 22:46:51 +10:00
Andrew Murray
237ab0763c Remove unneeded ? from matchStrings regex 2026-04-15 22:46:51 +10:00
Andrew Murray
ff00aaa6d3 Use keys from dependencies JSON 2026-04-15 22:46:51 +10:00
Andrew Murray
658d9ce258 Updated wheels path regex 2026-04-15 22:46:51 +10:00
Hugo van Kemenade
433e46471e
Move dependency versions to single JSON and enable Renovate (#9559) 2026-04-15 15:43:14 +03:00
Jeffrey 'Alex' Clark
082cf04e85
Add python-pillow GitHub Sponsors to FUNDING.yml (#9563) 2026-04-14 22:39:25 -04:00
Jeffrey 'Alex' Clark
2d89dcc7eb
Update .github/FUNDING.yml
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-14 22:37:55 -04:00
Jeffrey 'Alex' Clark
b71b4b98d9 Lint 2026-04-14 19:56:59 -04:00
Jeffrey 'Alex' Clark
c07f7e56a1 Add python-pillow GitHub Sponsors to FUNDING.yml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-14 19:54:25 -04:00
Jeffrey 'Alex' Clark
9f24881521 Add STRIDE threat model to security docs
- Update .github/SECURITY.md with threat model summary and link to handbook
- Add docs/handbook/security.rst with full STRIDE analysis (14 threats
  across Spoofing, Tampering, Repudiation, Information Disclosure,
  Denial of Service, and Elevation of Privilege categories)
- Add prioritised mitigation recommendations
- Link security.rst into the handbook toctree

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-14 12:13:45 -04:00
Jeffrey 'Alex' Clark
a124ed208f Update template wording 2026-04-14 11:36:33 -04:00
Jeffrey 'Alex' Clark
ee24a11073 Update .github/INCIDENT_RESPONSE.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-14 11:26:03 -04:00
Hugo van Kemenade
6dd03edba8
Use GitLab as data source for FreeType
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-13 15:39:38 +03:00
Hugo van Kemenade
65767a0cf7
Use GitLab as data source for libtiff
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-12 12:08:07 +03:00
Hugo van Kemenade
a49c63208a Move dependency versions to single JSON and enable Renovate 2026-04-12 12:07:07 +03:00
Andrew Murray
3a3dab8bb0
Updated raqm to 0.10.5 (#9557) 2026-04-12 15:13:32 +10:00
Andrew Murray
4b911c889b
Correct environment URL (#9558) 2026-04-11 20:22:22 +10:00
Hugo van Kemenade
b04c9a3d2f
Add CVEs to 12.2.0 release notes (#9556) 2026-04-11 11:03:38 +03:00
Andrew Murray
3157407762
Remove or protect secrets in Actions (#9544) 2026-04-11 17:05:49 +10:00
Andrew Murray
fb1375d93b Added CVEs 2026-04-11 08:34:08 +10:00
Jeffrey 'Alex' Clark
6e1ccab749 Address review feedback on INCIDENT_RESPONSE.md
- Update CVSS v3.1 to CVSS 4.0 throughout
- Remove 'Direct maintainer contact' from detection sources
- Fix 'before it stays public' wording for user bug reports
- Simplify sections 7.3 and 7.4 to reference RELEASING.md instead
  of duplicating release process steps
- Update RELEASING.md Point release section with security-specific
  steps (amend CVE in commits, publish GitHub Security Advisory)
- Fix PyPI API tokens entry (remove GitHub secrets reference)
- Fix 404 PyPI manage URL (use correct case and /releases/ path)
- Replace security@pypi.org mailto with https://pypi.org/security/
- Remove unconfirmed 'Notify GitHub Security' bullet
- Fix section numbering: 10.x → 9.x under Section 9. Dependency Map
- Reorder: move 9.3 Responding to Upstream Vulnerability before 9.3
  Downstream Dependencies (now 9.2 and 9.3 respectively)
- Add anchor link for Section 5 reference in 9.2
- Add #plugin-list anchor to third-party plugins handbook link
- Fix GitLab issue tracker URLs to use /-/work_items for libtiff,
  freetype2, and bzip2
- Add pyproject.toml reference for complete optional dependencies list

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-10 10:58:43 -04:00
Jeffrey 'Alex' Clark
0cbdd2eff9
Update .github/INCIDENT_RESPONSE.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-10 10:37:34 -04:00
Hugo van Kemenade
eda14b6c4a Restrict nightly Anaconda uploads to environment 2026-04-10 16:33:18 +03:00
Jeffrey 'Alex' Clark
24b12dc84f Combine plan maintenance into a single paragraph
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-10 07:49:37 -04:00
Jeffrey 'Alex' Clark
d016c90108 Remove active exploitation escalation bullet from incident response
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-10 07:44:27 -04:00
Jeffrey 'Alex' Clark
6a0192a40a Update .github/INCIDENT_RESPONSE.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-04-10 07:44:16 -04:00
Jeffrey 'Alex' Clark
6fe81dd52e Remove Wand from downstream dependencies
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:19:22 -04:00
Jeffrey 'Alex' Clark
55989595ea Add private channels note to internal communication guidance
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:17:39 -04:00
Jeffrey 'Alex' Clark
b579577aa0 Link to section 1.3 in Plan Maintenance
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:15:25 -04:00
Jeffrey 'Alex' Clark
6f815c2d8d Clarify advisory thread purpose as reporter coordination
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:13:43 -04:00
Jeffrey 'Alex' Clark
80a91fdb4e Add setuptools to Python-level dependencies
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:08:44 -04:00
Jeffrey 'Alex' Clark
0d440b7d09 Trim Plan Maintenance section
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:04:00 -04:00
Jeffrey 'Alex' Clark
00ff8636a2 Remove section 7.5 Rollback Procedures
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:01:08 -04:00
Jeffrey 'Alex' Clark
e74a89f70e Trim version support matrix prose
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:59:29 -04:00
Jeffrey 'Alex' Clark
20af4ec89c Change Critical/High SLA targets to best effort
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:55:11 -04:00
Jeffrey 'Alex' Clark
3f90d5c4da Replace section sign (§) with plain Section references
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:53:04 -04:00
Jeffrey 'Alex' Clark
68be7f30ff Remove Tidelift notification step from triage
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:50:45 -04:00
Jeffrey 'Alex' Clark
e0f9e2b98e Fix severity classification cross-reference, remove incident lead assignment step
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:46:58 -04:00
Jeffrey 'Alex' Clark
ad582c1a8e Simplify Roles section note
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:38:34 -04:00
Jeffrey 'Alex' Clark
c2ac2da31c Inline Readiness Review procedure as prose
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:28:42 -04:00
Jeffrey 'Alex' Clark
3aa076129f Remove backport comment from version support matrix
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:25:32 -04:00
Jeffrey 'Alex' Clark
4a74a20b86 Update Readiness Review: quarterly cadence, trim checklist
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 17:23:52 -04:00
Jeffrey 'Alex' Clark
64ed4710b9 Fix version support matrix to reflect main-only security policy
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 16:59:41 -04:00
Jeffrey 'Alex' Clark
cdaa1bf9ef Add sections from Bootstrap example
At the risk of making this document larger, add in sections in Bootstrap
IRP but not ours.

- https://github.com/twbs/bootstrap/blob/main/.github/INCIDENT_RESPONSE.md
2026-04-09 12:57:16 -04:00
Jeffrey 'Alex' Clark
4d63d0b3a6 Fix links 2026-04-09 12:47:50 -04:00
Jeffrey 'Alex' Clark
cb5736ea3e Add INCIDENT_RESPONSE.md 2026-04-09 12:36:00 -04:00
Hugo van Kemenade
5ada8c8306
Use github.event.repository.fork (#9551) 2026-04-09 18:43:23 +03:00
Andrew Murray
6ede62874b
Update README with revised security policy (#9553) 2026-04-09 19:01:17 +10:00
Jeffrey 'Alex' Clark
b97034ae02 Link to New draft security advisory 2026-04-08 20:01:39 -04:00
Jeffrey 'Alex' Clark
77b2f6791a
Update security policy (#9552) 2026-04-08 16:23:51 -04:00
Jeffrey 'Alex' Clark
8f625f19ef
Update .github/SECURITY.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-08 16:17:52 -04:00
Jeffrey 'Alex' Clark
8edb7734b5
Update .github/SECURITY.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-08 14:52:36 -04:00
Jeffrey 'Alex' Clark
05860779a1
Update .github/SECURITY.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-08 14:52:19 -04:00
Jeffrey 'Alex' Clark
ab02e810b0 Update security policy 2026-04-08 13:16:37 -04:00
Andrew Murray
ed89b93940 Use github.event.repository.fork 2026-04-08 21:51:43 +10:00
Hugo van Kemenade
7cf4dac7ae
Move Homebrew dependencies into Brewfile (#9546) 2026-04-07 19:09:30 +10:00
Trần Bách
117de2b181 fix(security)(_imagingtk.c): unsafe pointer dereference from unchecked python i
In `_tkinit`, `PyLong_AsVoidPtr(arg)` converts an arbitrary Python object to a `void*` pointer which is then cast to `Tcl_Interp*` and passed to `TkImaging_Init`. If `PyLong_AsVoidPtr` fails (returns NULL and sets an error), or if the caller passes an arbitrary integer value, the code proceeds to dereference it without any validation, potentially leading to a crash or arbitrary memory access.

Affected files: _imagingtk.c

Signed-off-by: Trần Bách <45133811+barttran2k@users.noreply.github.com>
2026-04-07 09:41:12 +07:00
Hugo van Kemenade
43a3e5ca21 Remove Codecov token 2026-04-06 23:35:44 +03:00
Hugo van Kemenade
c722aaec53
Do not precompute horizontal coefficients if not horizontal resizing (#9543) 2026-04-06 20:29:12 +03:00
pre-commit-ci[bot]
b72f5730e1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-04-06 17:25:20 +00:00
pre-commit-ci[bot]
ecc48f9b3e
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.4 → v0.15.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.4...v0.15.9)
- [github.com/psf/black-pre-commit-mirror: 26.1.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/26.1.0...26.3.1)
- [github.com/pre-commit/mirrors-clang-format: v22.1.0 → v22.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v22.1.0...v22.1.2)
- [github.com/python-jsonschema/check-jsonschema: 0.37.0 → 0.37.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.37.0...0.37.1)
- [github.com/zizmorcore/zizmor-pre-commit: v1.22.0 → v1.23.1](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.22.0...v1.23.1)
- [github.com/tox-dev/pyproject-fmt: v2.16.2 → v2.21.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.16.2...v2.21.0)
2026-04-06 17:24:37 +00:00
Hugo van Kemenade
fcf033bdfb
Fix comparison warnings (#9541) 2026-04-06 12:37:24 +03:00
Hugo van Kemenade
698fbb768a
Correct feature name (#9542) 2026-04-06 12:37:07 +03:00
Andrew Murray
abb9b200ef Do not precompute horizontal coefficients if not horizontal resizing 2026-04-06 14:21:21 +10:00
Andrew Murray
b65bc406d8 Fixed comparison warning 2026-04-06 13:19:32 +10:00
Andrew Murray
d7d2df8ab2 Correct feature name 2026-04-06 09:39:23 +10:00
Hugo van Kemenade
f5ab7bb37b
Skip test if FreeType is not available (#9540) 2026-04-05 13:04:12 +03:00
Andrew Murray
17612be407 Skip test if FreeType is not available 2026-04-05 12:57:01 +10:00
Andrew Murray
64f6d4ebd8
Close PdfParser if error occurs during init (#9539)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-05 05:30:11 +10:00
Hugo van Kemenade
a865345add
Remove type hint ignore (#9538) 2026-04-04 15:24:25 +03:00
Andrew Murray
1dd1c9a3e5 Replace custom class with TextIOWrapper 2026-04-04 19:33:07 +11:00
Andrew Murray
7f3751d498 Remove type hint ignore 2026-04-04 19:29:11 +11:00
Hugo van Kemenade
e81acb8f79
Drop experimental Python 3.13 free-threaded wheels (#9535) 2026-04-03 15:54:13 +03:00
Andrew Murray
e58c67347a Raise error if transparency is incorrect type or length when saving 2026-04-03 22:19:52 +11:00
Andrew Murray
7f68decf2c Clarified condition 2026-04-03 22:16:51 +11:00
Andrew Murray
c03ba8b3c0 Added release notes 2026-04-03 21:41:13 +11:00
Hugo van Kemenade
82ac16d89d
Update macOS tested Python versions (#9534) 2026-04-03 09:56:30 +03:00
Andrew Murray
20307667f9 Remove deprecated option to allow Python 3.13t wheels 2026-04-03 15:51:01 +11:00
Andrew Murray
9d790af50c Update macOS tested Python versions 2026-04-03 15:41:02 +11:00
renovate[bot]
3f78ebb542
Update dependency cibuildwheel to v3.4.0 (#9532) 2026-04-03 15:38:40 +11:00
renovate[bot]
c39eda6348
Update github-actions (#9533) 2026-04-03 15:20:29 +11:00
Hugo van Kemenade
abb1d2bf6e
Remove Debian 12 and Fedora 42 from CI (#9530) 2026-04-02 18:11:35 +11:00
Hugo van Kemenade
d16c00fa0c
Remove manylinux2014 and Amazon Linux 2 (#9528) 2026-04-02 08:05:42 +03:00
Andrew Murray
4dc9398402 Remove manylinux2014 2026-04-02 07:55:58 +11:00
Andrew Murray
30b3dff0cb Remove Amazon Linux 2 2026-04-02 07:55:58 +11:00
Hugo van Kemenade
7d78ac519b 12.3.0.dev0 version bump 2026-04-01 17:53:55 +03:00
Hugo van Kemenade
3c41c09506 12.2.0 version bump 2026-04-01 15:11:14 +03:00
Hugo van Kemenade
cdaa29eb52
Check calloc return value (#9527) 2026-04-01 15:11:00 +03:00
Andrew Murray
585b2f5a78 Check calloc return value 2026-04-01 22:57:56 +11:00
Hugo van Kemenade
ecf011ea15
Check all allocs in the Arrow tree (#9488) 2026-04-01 14:56:15 +03:00
Hugo van Kemenade
cf6de8ca9b
Reject non-numeric elements inside list coords (#9526) 2026-04-01 22:50:45 +11:00
Andrew Murray
ffdcede651
Update 12.2.0 release notes (#9522) 2026-04-01 17:43:36 +11:00
Hugo van Kemenade
7929d7760f
Added security release notes (#149) 2026-04-01 09:02:36 +03:00
Andrew Murray
c4f7aa5dfb Added security release notes 2026-04-01 16:49:20 +11:00
Hugo van Kemenade
22cdb5f2e4
Move variable declaration inside define (#9525) 2026-04-01 06:35:32 +03:00
Hugo van Kemenade
fc15b3b018
Resize tall images vertically first (#9524) 2026-04-01 06:34:26 +03:00
Hugo van Kemenade
44db0708c4
Update xz to 5.8.3 (#9523) 2026-04-01 06:31:15 +03:00
Andrew Murray
58f9a1d166
Avoid overflow by not adding extents together (#9520) 2026-04-01 13:45:30 +11:00
Andrew Murray
459bdf766f Move variable declaration inside define 2026-04-01 10:38:22 +11:00
Andrew Murray
4ef0ac611d Resize tall images vertically first 2026-04-01 10:00:39 +11:00
Andrew Murray
f5e893e46e Seek raises OverFlowError on 32-bit 2026-04-01 09:46:09 +11:00
Hugo van Kemenade
ec8272044d
Use long for glyph position (#9518)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-04-01 08:52:09 +11:00
Andrew Murray
d9035515f2
Merge branch 'main' into psd_size 2026-04-01 08:42:16 +11:00
Andrew Murray
cf4a8ee0b9 Updated xz to 5.8.3 2026-04-01 08:26:13 +11:00
Hugo van Kemenade
3bf614e4b8
Raise an error if the trailer chain loops back on itself (#9519) 2026-04-01 08:03:15 +11:00
Hugo van Kemenade
3cb854e8b2
Only read as much data from gzip-decompressed data as necessary (#9521) 2026-04-01 08:02:08 +11:00
Hugo van Kemenade
3cb814f338 Update 12.2.0 release notes 2026-03-31 23:15:06 +03:00
Gareth Davidson
2696e962c2
Add loader plugins: AMOS abk, Atari Degas, 40+ more obscure formats via Netpbm (#9482)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-31 23:03:12 +03:00
Hugo van Kemenade
6dfc2be807
Allow None extents in C setimage() (#9504) 2026-03-31 22:02:41 +03:00
Hugo van Kemenade
da0ed929a0
Use critical sections to protect FontObject (#9498) 2026-03-31 21:54:29 +03:00
Hugo van Kemenade
2c2c2a1eae
Add ImageText.Text.wrap() to wrap text (#9286) 2026-03-31 21:49:22 +03:00
Andrew Murray
cc22efda7a Parametrize tests 2026-03-31 21:42:16 +03:00
Andrew Murray
b2a16f0dbe Copy offset check from C into Python 2026-03-31 21:42:16 +03:00
Andrew Murray
591ce38ca5 Skip OverflowError on Windows Python 3.10 2026-03-31 21:42:16 +03:00
Andrew Murray
4bada07dc6 Avoid overflow by not adding extents together 2026-03-31 21:42:16 +03:00
Hugo van Kemenade
d66a77223b
Cleanup .spider extension in the same test where it is added (#9517) 2026-03-31 15:55:30 +03:00
Andrew Murray
09c585dc21 Cleanup .spider extension in the same test where it is added 2026-03-31 22:02:23 +11:00
Andrew Murray
1f74a55be2
Run tests in parallel via tox for 3.5x speedup (#9516) 2026-03-31 21:58:13 +11:00
Hugo van Kemenade
228a85e56e Safer test_file_spider teardown under pytest-xdist 2026-03-31 11:22:11 +03:00
Andrew Murray
751b373d41
Always call StubHandler open() when opening StubImageFile (#9412) 2026-03-31 09:20:47 +11:00
Andrew Murray
f6b50a540d
Improved BCn overflow check (#9043) 2026-03-31 08:05:58 +11:00
Hugo van Kemenade
8d801bcafa
Image will never be None (#9512) 2026-03-30 18:49:06 +03:00
Hugo van Kemenade
40168cca95
Update libjpeg-turbo to 3.1.4.1 (#9507) 2026-03-30 18:47:54 +03:00
Hugo van Kemenade
7406b371ca
Raise EOFError when seeking too far in PSD (#9388) 2026-03-30 18:34:08 +03:00
Hugo van Kemenade
ded95a6c3d
Raise error if ImageGrab subprocess gives non-zero returncode (#9321) 2026-03-30 18:33:05 +03:00
Andrew Murray
73e1ed91e3 For DXT1, only check if 8 bytes are left 2026-03-30 18:23:49 +03:00
Hugo van Kemenade
ea9d4ecf4e
Update Python versions (#9515) 2026-03-30 18:10:36 +03:00
Hugo van Kemenade
f80de2152c Run tests in parallel via tox 2026-03-30 16:34:07 +03:00
Hugo van Kemenade
b2e3f788f9
Allow for different palette entry sizes when correcting BMP pixel data offset (#9472) 2026-03-30 16:06:55 +03:00
Hugo van Kemenade
33e1518cc7
Ignore unspecified extra samples for TIFF separate planar configuration (#9514) 2026-03-30 15:54:41 +03:00
Andrew Murray
a03b7b52f9 Updated Python versions 2026-03-30 22:57:51 +11:00
Andrew Murray
007974d35b Ignore EXTRASAMPLES tag from separate planes image when saving 2026-03-30 20:04:39 +11:00
Andrew Murray
84cb30d7a7 For separate planar configuration, ignore unspecified extra components 2026-03-30 19:42:07 +11:00
Andrew Murray
07c180b21e Simplify SAMPLEFORMAT when all values match for values other than 1 2026-03-30 19:40:04 +11:00
Jeffrey 'Alex' Clark
602acd5828
Jeffrey A. Clark -> Jeffrey 'Alex' Clark (#9513) 2026-03-29 12:42:15 -04:00
Jeffrey 'Alex' Clark
7c121637c9 Jeffrey A. Clark -> Jeffrey 'Alex' Clark
Follow up to 4197263dff. People cannot figure out
my preferred name, hence this final (I hope!) update to my name in Pillow.
2026-03-29 10:05:18 -04:00
Andrew Murray
7ef54f6bfd Image will never be None
Co-authored-by: jorenham <jhammudoglu@gmail.com>
2026-03-29 19:40:16 +11:00
Andrew Murray
f298638632
Merge branch 'main' into arrow_malloc_guard 2026-03-29 19:13:53 +11:00
Andrew Murray
a69b4ec228 Merge branch 'main' into wrap 2026-03-28 22:44:21 +11:00
Andrew Murray
b62ff96779
Add PERF to lint and fix findings (#9510) 2026-03-28 21:56:07 +11:00
Hugo van Kemenade
4b8ae8ede4
Add release notes for #9394 and #9419 (#9467) 2026-03-28 11:31:58 +02:00
Hugo van Kemenade
a9ef0e2922
PERF203 and PERF401 fixes (#148) 2026-03-28 11:30:49 +02:00
Andrew Murray
3121c77cad Added release notes for #9456 2026-03-28 19:19:48 +11:00
Andrew Murray
ccf9863ba8 Added release notes for #9394 2026-03-28 19:11:51 +11:00
Andrew Murray
1ed39726c5 Added release notes for #9419 2026-03-28 19:11:51 +11:00
Andrew Murray
9f3f6de109 Allow None extents in C setimage 2026-03-28 18:31:49 +11:00
Andrew Murray
701b49adc5 PERF401 fix 2026-03-28 15:13:42 +11:00
Andrew Murray
9a7b91e5db PERF203 fixes 2026-03-28 15:13:41 +11:00
Andrew Murray
018801805f Simplify setimage() 2026-03-28 14:08:32 +11:00
Andrew Murray
65c4f4ea8d Updated libjpeg-turbo to 3.1.4 2026-03-28 13:19:27 +11:00
Andrew Murray
9006c305cf
Merge branch 'main' into perflint 2026-03-28 06:51:26 +11:00
Andrew Murray
91a5a09595
Switch iOS back to macos-15-intel (#9509) 2026-03-28 06:49:38 +11:00
Hugo van Kemenade
754c7ea3a0 PERF203 and fixes 2026-03-27 14:18:37 +02:00
Hugo van Kemenade
090ca9461b PERF403 and fixes 2026-03-27 14:18:37 +02:00
Hugo van Kemenade
9a358fa289 PERF402 and fixes 2026-03-27 14:18:37 +02:00
Hugo van Kemenade
b85b8534d7 PERF401 and fixes 2026-03-27 14:18:37 +02:00
Hugo van Kemenade
624fc87d2d PERF102 2026-03-27 14:15:30 +02:00
Hugo van Kemenade
b337b33564 PERF101 2026-03-27 14:15:30 +02:00
Andrew Murray
27de86483d Switch iOS back to macos-15-intel 2026-03-27 21:54:45 +11:00
Andrew Murray
9568bceeb8
Catch struct.error (#9505) 2026-03-27 21:22:28 +11:00
Andrew Murray
396b0a2a39
Check PyCapsule_GetPointer and PyBytes_FromStringAndSize return values (#9508) 2026-03-27 20:40:20 +11:00
Andrew Murray
20a9401971 Check PyBytes_FromStringAndSize return value 2026-03-27 15:26:41 +11:00
Andrew Murray
40400edd62 Check PyCapsule_GetPointer return value 2026-03-27 15:26:25 +11:00
wiredfool
7672b19af4
Fix missing null dereference checks (#9489)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-03-27 15:23:01 +11:00
Hugo van Kemenade
ef6951d1a5
CI: Retry failed downloads (#9506) 2026-03-27 09:57:43 +11:00
Andrew Murray
f176f5dad6
Update libpng to 1.6.56 (#9499) 2026-03-27 08:57:45 +11:00
Andrew Murray
9b7dccfe32
Use PyModule_AddObjectRef (#9503) 2026-03-27 08:47:58 +11:00
Andrew Murray
92ccedea87
Release reference to encoder on error (#9500) 2026-03-27 08:46:33 +11:00
Andrew Murray
fcecc8c6c4
Fixed AVIF and WEBP dealloc (#9501) 2026-03-27 08:45:40 +11:00
Andrew Murray
d305ee6a25
Check PyType_Ready return values (#9502) 2026-03-27 08:45:02 +11:00
Andrew Murray
da729c832c
Check if PyObject_CallMethod result is NULL (#9494) 2026-03-27 08:43:32 +11:00
Hugo van Kemenade
43e4ebe037
Do not use palette from grayscale or bilevel colorspace when reading JPEG2000 images (#9468) 2026-03-26 15:33:18 +02:00
Hugo van Kemenade
051fb0b995
If TGA v2 extension area specifies no alpha, fill alpha channel (#9478) 2026-03-26 15:32:35 +02:00
Andrew Murray
67c0767b64 If Photoshop blocks are truncated, do not raise struct.error 2026-03-26 23:43:35 +11:00
Andrew Murray
f551ecdc43 If Makernote is truncated, do not raise struct.error 2026-03-26 23:43:35 +11:00
Sam Gross
e4d72b53f5 Use critical sections to protect FontObject
FreeType FT_Face objects are not thread-safe. Use per-object critical
sections to protect FontObject methods that access the underlying FT_Face
in the free-threaded build.

Fixes #9497
2026-03-26 14:42:00 +02:00
Hugo van Kemenade
8e9068e36f
Set image pixels individually on 32-bit Windows (#9492) 2026-03-26 14:41:22 +02:00
Hugo van Kemenade
d4f78128ab
Revert "Skip build 1.4.1 for lint" (#9495) 2026-03-26 07:47:22 +11:00
Hugo van Kemenade
e7f150df7f
Update freetype to 2.14.3 (#9485) 2026-03-25 14:37:14 +02:00
Andrew Murray
5b69607c35
Skip build 1.4.1 for lint (#9491)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-25 14:35:27 +02:00
Hugo van Kemenade
2654d73626
Add error messages before returning NULL when encoding (#9493) 2026-03-25 14:25:43 +02:00
Andrew Murray
33d62fc8a1 Added error messages 2026-03-25 23:11:59 +11:00
Andrew Murray
93729a0062 Removed unused code 2026-03-25 23:04:35 +11:00
Hugo van Kemenade
9a89944e73
Fix _getxy refcount leaks (#9487) 2026-03-25 23:00:18 +11:00
Andrew Murray
47386d191c Set image pixels individually on 32-bit Windows 2026-03-25 22:33:37 +11:00
Hugo van Kemenade
3a83d6abc3
Enable colour in CI logs (#9486) 2026-03-25 10:54:16 +11:00
wiredfool
ffd32a861a Check all allocs in the Arrow tree
* handle alloc failure
* Ensure we're calling release so the refcount on the image is
decremented
* Ensure that release array/schema can handle partially allocated
children arrays.
2026-03-24 21:14:16 +00:00
Andrew Murray
f0b5f56e9f
Updated libavif to 1.4.1 (#9479) 2026-03-24 22:34:11 +11:00
Andrew Murray
4e85badfc1 Updated freetype to 2.14.3 2026-03-23 21:23:24 +11:00
Andrew Murray
fc0f65998f
Updated harfbuzz to 13.2.1 (#9461) 2026-03-23 21:21:51 +11:00
Andrew Murray
43bc816e88
Merge branch 'main' into jpeg2000_l 2026-03-21 23:44:44 +11:00
Andrew Murray
0d7f5077a7 If v2 extension area specifies no alpha, fill alpha channel 2026-03-21 23:43:26 +11:00
Hugo van Kemenade
1bb14c4ef5
Fix invalid test font (#9483) 2026-03-21 14:14:00 +02:00
Andrew Murray
4d0089141c Fixed invalid test font 2026-03-21 19:26:55 +11:00
Hugo van Kemenade
a4b0e3ecab
Add Exif tag "FrameRate" (#9470) 2026-03-20 16:20:09 +02:00
Hugo van Kemenade
c0fbe54978
Update Ghostscript to 10.7.0 (#9469) 2026-03-20 16:14:24 +02:00
Andrew Murray
77df8a36c1 Merge branch 'main' into jpeg2000_l 2026-03-21 01:10:35 +11:00
Hugo van Kemenade
a67ce7fba1
Support reading JPEG2000 images with CMYK palettes (#9456) 2026-03-20 16:03:55 +02:00
Andrew Murray
3b1f70da61
Simplify setimage() by always passing extents (#9395) 2026-03-21 01:01:20 +11:00
Hugo van Kemenade
6ab139eaab
If bitmap buffer is empty, do not render anything (#8324) 2026-03-20 15:53:02 +02:00
Hugo van Kemenade
46c529fa69
Simplify TGA test code (#9477) 2026-03-20 15:46:57 +02:00
Andrew Murray
c304186190 Simplified code 2026-03-20 10:02:14 +11:00
Andrew Murray
735d02584b Allow for different palette entry sizes when correcting offset 2026-03-19 10:38:28 +11:00
Andrew Murray
93de6a78d8 Generate test image programmatically 2026-03-19 10:10:06 +11:00
Andrew Murray
98c149f030 Simplified code 2026-03-19 09:26:58 +11:00
Zhiyuan Ouyang
e6bb8626c8 Add a ExifTag "FrameRate" to be supported in PIL.
Reference: https://exiftool.org/TagNames/EXIF.html
2026-03-17 10:30:40 -07:00
Andrew Murray
e34c7bee91 Updated Ghostscript to 10.7.0 2026-03-17 10:56:32 +11:00
Andrew Murray
8442a8541c Support saving images with non-RGB palettes as PNGs 2026-03-16 23:52:43 +11:00
Andrew Murray
6a06285bf8 Support reading JPEG2000 images with CMYK palettes 2026-03-16 23:52:33 +11:00
Andrew Murray
4f5802b6b1 Do not use palette from grayscale or bilevel colorspace 2026-03-16 23:45:22 +11:00
Andrew Murray
29509ffa75 Detect CMYK palette in JPEG2000 images 2026-03-16 20:48:46 +11:00
Andrew Murray
d5d0734169 Add CMYK palettes 2026-03-16 20:48:25 +11:00
Gareth Davidson
3a44ba1c75
Add Amiga Workbench .info loader to 3rd party plugins list (#9459) 2026-03-14 09:42:15 +11:00
Hugo van Kemenade
5e91231ed6
Update tests to check for ValueError when encoding an empty image (#9464) 2026-03-13 16:17:38 +02:00
Andrew Murray
dd042da9c2 Update tests to change for ValueError when encoding an empty image 2026-03-13 06:32:15 +11:00
Hugo van Kemenade
8004234d87
Change to ValueError when encoding an empty image (#9394) 2026-03-12 16:57:01 +02:00
Hugo van Kemenade
c66ab56b4b
Update harfbuzz to 13.0.1 (#9453) 2026-03-10 16:12:57 +02:00
Hugo van Kemenade
27ca696c07
Update libavif to 1.4.0 (#9460) 2026-03-10 16:12:14 +02:00
Andrew Murray
686174b5cc Updated libavif to 1.4.0 2026-03-10 20:26:31 +11:00
Andrew Murray
de2845b19a Revert "Patch libavif for svt-av1 4.0 compatibility"
This reverts commit f86ad8b36d.
2026-03-10 10:18:55 +11:00
Andrew Murray
42a4af5c81
Merge branch 'main' into harfbuzz 2026-03-09 22:41:04 +11:00
Andrew Murray
28524f2069
Update freetype to 2.14.2 (#9449) 2026-03-09 22:39:27 +11:00
Andrew Murray
5450f9d08a Updated harfbuzz to 13.0.1 2026-03-08 07:12:17 +11:00
Andrew Murray
2c87ce2d3d
Add FontFile.to_imagefont() (#9419) 2026-03-07 17:24:43 +11:00
Frank Henigman
abbd515e9b Improve efficiency of FontFile._encode_metrics()
Build up mutable sequences instead of recreating mutable ones.
2026-03-06 22:30:59 -05:00
fjhenigman
97bdfeb4a5
Merge branch 'python-pillow:main' into usepcf 2026-03-06 22:00:52 -05:00
Andrew Murray
c68cc49d8e
Upgrade CI from macos-15-intel to macos-26-intel (#9454) 2026-03-05 22:51:03 +11:00
Hugo van Kemenade
55b0cbc273 Update CI targets docs 2026-03-05 10:01:13 +02:00
Hugo van Kemenade
c27d24bad8
[pre-commit.ci] pre-commit autoupdate (#9450) 2026-03-03 17:04:57 +02:00
Andrew Murray
f7582b8d58
Updated documentation terms
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-03 23:04:00 +11:00
Andrew Murray
f7ee26575e
Avoid shadowing built-in
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-03 22:57:34 +11:00
Andrew Murray
04470d5151
Removed unused argument
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-03 22:51:41 +11:00
Andrew Murray
a8cf13010b
Use native configuration
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-03 18:02:49 +11:00
renovate[bot]
0fae74731d
Update actions/download-artifact action to v8 (#9451) 2026-03-03 16:36:24 +11:00
pre-commit-ci[bot]
7fc49a5cf4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-03-02 17:27:45 +00:00
pre-commit-ci[bot]
0c2dc2047e
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.14...v0.15.4)
- [github.com/PyCQA/bandit: 1.9.3 → 1.9.4](https://github.com/PyCQA/bandit/compare/1.9.3...1.9.4)
- [github.com/pre-commit/mirrors-clang-format: v21.1.8 → v22.1.0](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.8...v22.1.0)
- [github.com/python-jsonschema/check-jsonschema: 0.36.1 → 0.37.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.36.1...0.37.0)
- [github.com/tox-dev/pyproject-fmt: v2.12.1 → v2.16.2](https://github.com/tox-dev/pyproject-fmt/compare/v2.12.1...v2.16.2)
- [github.com/abravalheri/validate-pyproject: v0.24.1 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.24.1...v0.25)
2026-03-02 17:25:35 +00:00
Hugo van Kemenade
f273619682 Test on macos-26-intel 2026-03-02 15:44:23 +02:00
Hugo van Kemenade
bb54c5020f
Use walrus operator (#9448) 2026-02-28 23:24:04 +02:00
Andrew Murray
26c70950e9 Use walrus operator 2026-02-27 08:13:18 +11:00
Andrew Murray
e96c5a5a53
Updated libpng to 1.6.55 (#9425) 2026-02-24 21:17:12 +11:00
Kadir Can Ozden
2fe7c42148
Only close file handle in ImagePalette.save() if it was opened internally (#9444)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-24 18:01:24 +11:00
Varun Chawla
e50d8a5192
Improve border validation error message wording 2026-02-22 18:50:14 -08:00
Andrew Murray
81e0cf2bc4
Add check-case-conflict hook (#9446) 2026-02-22 15:17:59 +02:00
Kadir Can Ozden
43c12af730
Fix self.decode typo (#9445)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-21 14:23:38 +02:00
Kadir Can Ozden
4777a0b318
Fix BMP RLE delta escape reading from wrong file position (#9443)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-21 14:21:48 +02:00
Andrew Murray
02764a0077
Correct error check when encoding AVIF images (#9442)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-19 14:09:59 +02:00
Andrew Murray
3cd69cb12f
Specify platform when pulling docker image (#9440)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-17 09:57:29 +02:00
Andrew Murray
a5c9eba30a
Fix unexpected error when saving zero dimension images (#9391)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-16 12:57:27 +02:00
Hugo van Kemenade
2c00c6f80e
GHA: Cache libavif and webp builds for Ubuntu (#9437)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-02-16 12:29:42 +02:00
Varun Chawla
f708c00527 Fix UnboundLocalError in _border for invalid tuple lengths and document rgba() color format
The _border helper in ImageOps raised UnboundLocalError when given a tuple
with a length other than 2 or 4 (e.g. 1-tuple or 3-tuple). This changes
it to raise a clear ValueError instead.

Also adds documentation for the rgba() color format in ImageColor, which
was supported in code and tested but missing from the docs.
2026-02-13 19:38:48 -08:00
fjhenigman
a18a62cda6
Merge pull request #2 from radarhere/usepcf
Updated documentation
2026-02-13 19:51:49 -05:00
Andrew Murray
3c087bb58b
Merge branch 'main' into wrap 2026-02-14 11:14:42 +11:00
Hugo van Kemenade
d4111967a8
Merge PFM documentation into PPM (#9434) 2026-02-14 00:38:40 +02:00
Andrew Murray
f71d74eec2
Use versionadded
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-13 18:29:41 +11:00
Andrew Murray
0ce21f98e7 Updated documentation 2026-02-13 18:06:29 +11:00
fjhenigman
97673f4e70
Merge branch 'python-pillow:main' into usepcf 2026-02-12 13:50:53 -05:00
fjhenigman
57be9dc25b
Merge pull request #1 from radarhere/usepcf
Remove temporary buffer
2026-02-12 13:49:10 -05:00
Hugo van Kemenade
1457c6032a
Use uppercase format ID for PALM (#9435) 2026-02-12 15:13:27 +02:00
Andrew Murray
657d0414f0 Merge PFM into PPM 2026-02-12 21:51:01 +11:00
Andrew Murray
3795a1b916 Use uppercase format id 2026-02-12 21:47:04 +11:00
Hugo van Kemenade
913698b667
Update macOS tested Pillow versions (#9431) 2026-02-11 18:52:47 +02:00
Andrew Murray
27765189c8 Updated macOS tested Pillow versions 2026-02-11 23:51:33 +11:00
Hugo van Kemenade
a15f9c6121
Fix CVE number (#9430) 2026-02-11 22:48:11 +11:00
Andrew Murray
54ba4db542
Fix OOB Write with invalid tile extents (#9427)
Co-authored-by: Eric Soroos <eric-github@soroos.net>
2026-02-11 10:24:50 +11:00
Andrew Murray
723e764826 Improved coverage 2026-02-09 22:20:33 +11:00
Andrew Murray
612e3c24a4 Remove temporary buffer 2026-02-09 22:20:33 +11:00
Andrew Murray
0604d6a2c9 Remove unused argument 2026-02-09 22:20:31 +11:00
Andrew Murray
3e14bea593
Use assert_image_equal_tofile when similarity is zero 2026-02-09 22:18:01 +11:00
Andrew Murray
f78663b806
CI: Disable pip upgrade warning (#9424) 2026-02-09 22:16:01 +11:00
Hugo van Kemenade
657d6ea4b6 CI: Disable pip upgrade warning 2026-02-09 11:07:07 +02:00
Andrew Murray
ea9baaf99f
Merge branch 'main' into usepcf 2026-02-09 07:03:05 +11:00
Hugo van Kemenade
49bc134ee1
Use assert_image_equal* when similarity is zero (#9421) 2026-02-08 14:20:25 +02:00
Hugo van Kemenade
26a188c062
Simplify code in FpxImagePlugin.py (#9423) 2026-02-07 14:36:32 +02:00
Andrew Murray
fd8fa7df79 Simplified code 2026-02-07 11:19:18 +11:00
Andrew Murray
18cab11437 Use assert_image_equal* when similarity is zero 2026-02-06 08:34:13 +11:00
Frank Henigman
a90075a668 Add FontFile.to_imagefont(). 2026-02-04 21:35:06 -05:00
Hugo van Kemenade
2a2638e58f
Update harfbuzz to 12.3.2 (#9402) 2026-02-04 18:34:10 +02:00
Hugo van Kemenade
8eddb86076
Updated zlib-ng to 2.3.3 (#9418) 2026-02-04 18:33:31 +02:00
Andrew Murray
1ac7691fe5 Updated zlib-ng to 2.3.3 2026-02-04 20:39:31 +11:00
Andrew Murray
e108e646da
Updated lcms2 to 2.18 (#9387) 2026-02-04 08:57:34 +11:00
Andrew Murray
62aa42f9da
Update dependency cibuildwheel to v3.3.1 (#9416) 2026-02-03 18:23:26 +11:00
renovate[bot]
508e9c9984
Update dependency cibuildwheel to v3.3.1 2026-02-03 01:32:07 +00:00
Hugo van Kemenade
095cdb3c4a
[pre-commit.ci] pre-commit autoupdate (#9415) 2026-02-02 21:46:00 +01:00
pre-commit-ci[bot]
7cbe8c4924 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-02-02 17:17:55 +00:00
pre-commit-ci[bot]
27924be4fd
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.10 → v0.14.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.10...v0.14.14)
- [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.1.0)
- [github.com/PyCQA/bandit: 1.9.2 → 1.9.3](https://github.com/PyCQA/bandit/compare/1.9.2...1.9.3)
- [github.com/Lucas-C/pre-commit-hooks: v1.5.5 → v1.5.6](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.5...v1.5.6)
- [github.com/python-jsonschema/check-jsonschema: 0.36.0 → 0.36.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.36.0...0.36.1)
- [github.com/zizmorcore/zizmor-pre-commit: v1.19.0 → v1.22.0](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.19.0...v1.22.0)
- [github.com/tox-dev/pyproject-fmt: v2.11.1 → v2.12.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.11.1...v2.12.1)
2026-02-02 17:17:12 +00:00
Andrew Murray
fc4dbc3810
Remove unnecessary code in WmfHandler (#9411)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-01-30 17:41:44 +02:00
Andrew Murray
799564dd52 Always call StubHandler open() when opening StubImageFile 2026-01-30 23:26:45 +11:00
Andrew Murray
0e8bb72a66
Patch libavif for svt-av1 4.0 compatibility (#9413) 2026-01-30 23:25:42 +11:00
Hugo van Kemenade
f86ad8b36d Patch libavif for svt-av1 4.0 compatibility 2026-01-29 23:26:20 +01:00
Andrew Murray
29ff5fcb55
Use monkeypatch (#9406)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2026-01-27 23:43:14 +02:00
Andrew Murray
6a5c588c5f
Fix docstring typo (#9407) 2026-01-27 08:58:11 +11:00
Hugo van Kemenade
a293273b31 Fix docstring typo 2026-01-26 16:10:37 +02:00
Andrew Murray
6564325e43
Encode using latin-1 in PSDraw text() to match the latin-1 specification in setfont() (#9403) 2026-01-26 13:25:27 +11:00
Andrew Murray
93c8a60784
Lazy import only required plugin: open 2.3-15.6x & save 2.2-9x faster (#9398) 2026-01-26 13:25:14 +11:00
Andrew Murray
b6178303a1
Improve error message (#9392)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-25 23:01:02 +02:00
Hugo van Kemenade
d568c8d9e3
Check ext is not empty during save (#145) 2026-01-25 14:46:11 +02:00
Andrew Murray
d08d7ee99e Check ext is not empty during save 2026-01-25 22:55:19 +11:00
Hugo van Kemenade
2b186fceb8 Use __spec__.parent instead of calculating each time 2026-01-24 23:02:39 +02:00
Hugo van Kemenade
c036185514
Ensure lower before checking if ext in EXTENSION
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-01-24 22:48:41 +02:00
Andrew Murray
d737687fc3 Updated harfbuzz to 12.3.2 2026-01-25 06:45:13 +11:00
Hugo van Kemenade
34814d8d2f
Improve wording
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-01-24 12:52:49 +02:00
Hugo van Kemenade
3968886cf6
format overrides file extension when saving (#144) 2026-01-24 11:08:37 +02:00
Andrew Murray
bc64ccbf28
Updated libpng to 1.6.54 (#9397) 2026-01-24 12:16:14 +11:00
Andrew Murray
76d3116ef0 Added logger messages to match init() 2026-01-24 09:44:31 +11:00
Andrew Murray
a6b36f0b6b format overrides file extension when saving 2026-01-24 09:44:31 +11:00
Andrew Murray
a0f51493ca Refer to lazy importing, as lazy loading of images is separate 2026-01-24 09:44:31 +11:00
Steve Dougherty
a6a701c4db
Match PSDraw text() encoding to the latin-1 specification in setfont()
Without this, characters that are in latin-1 but reflected differently in UTF-8 will not be properly rendered. For example,"ó" becomes "ó".
2026-01-21 06:01:00 -05:00
Hugo van Kemenade
e08f910db4
Improve PaletteFile coverage (#9396) 2026-01-20 13:04:44 +02:00
Hugo van Kemenade
d1974d76f7
Updated MinGW Python version (#9400) 2026-01-20 10:56:17 +02:00
Andrew Murray
5ea2d3a056 Updated MinGW Python version 2026-01-20 18:16:34 +11:00
Hugo van Kemenade
d23a899f23
Link to m from _imagingmath, except on Windows (#9393) 2026-01-19 12:21:29 +02:00
Hugo van Kemenade
096c479cfb
If plugin has already been imported and registered the extension, return early
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2026-01-19 11:28:42 +02:00
Hugo van Kemenade
7f38f980dd
Check that _EXTENSION_PLUGIN contains all registered extensions (#143) 2026-01-19 11:21:00 +02:00
Andrew Murray
b06118c2b3 Do not register empty extension 2026-01-19 17:24:28 +11:00
Andrew Murray
9c8059fdea Cleanup .spider extension registered by test code during save 2026-01-19 17:18:30 +11:00
Andrew Murray
1baf141146 Check that _EXTENSION_PLUGIN contains all registered extensions 2026-01-19 17:13:43 +11:00
Hugo van Kemenade
6b9de40533 Lazy import only required plugin 2026-01-18 22:59:28 +02:00
Andrew Murray
ef8ff756fa Updated libpng to 1.6.54 2026-01-15 12:10:01 +11:00
Andrew Murray
2e9d54887b Improved coverage 2026-01-14 19:42:18 +11:00
Andrew Murray
7e208ccf9d Change to ValueError when encoding an empty image 2026-01-13 23:49:10 +11:00
Andrew Murray
0f4becea73 Link to m from _imagingmath, except on Windows 2026-01-13 16:26:08 +11:00
Hugo van Kemenade
e2b87a0420
Fix joining rounded rectangle corners (#9384) 2026-01-12 12:21:06 +02:00
Andrew Murray
400ffbc18d Raise EOFError when seeking too far 2026-01-10 14:37:18 +11:00
Andrew Murray
d7dfeeb7ad Updated lcms2 to 2.18 2026-01-10 06:46:04 +11:00
Andrew Murray
426ad8307d Fix joining rounded rectangle corners 2026-01-08 19:27:19 +11:00
Hugo van Kemenade
627d8743b7
Simplify test code (#9382) 2026-01-06 14:21:49 +02:00
Andrew Murray
dcd52ebf65 Simplified code 2026-01-06 09:56:56 +11:00
Andrew Murray
d6e0a8d174
[pre-commit.ci] pre-commit autoupdate (#9381) 2026-01-06 09:33:57 +11:00
pre-commit-ci[bot]
2210714a43
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.7 → v0.14.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.7...v0.14.10)
- [github.com/psf/black-pre-commit-mirror: 25.11.0 → 25.12.0](https://github.com/psf/black-pre-commit-mirror/compare/25.11.0...25.12.0)
- [github.com/pre-commit/mirrors-clang-format: v21.1.6 → v21.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.6...v21.1.8)
- [github.com/python-jsonschema/check-jsonschema: 0.35.0 → 0.36.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.35.0...0.36.0)
- [github.com/zizmorcore/zizmor-pre-commit: v1.18.0 → v1.19.0](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.18.0...v1.19.0)
- [github.com/tox-dev/tox-ini-fmt: 1.7.0 → 1.7.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.7.0...1.7.1)
2026-01-05 17:20:09 +00:00
Hugo van Kemenade
3d7801417a
Move from deprecated getdata to get_flattened_data (#9373) 2026-01-04 15:36:32 +02:00
Andrew Murray
a85d3b135d
Only update Python palette when loading an image if rawmode was different (#9309) 2026-01-04 06:20:56 +11:00
Andrew Murray
932aa68d2a
Add seven-day cooldown to Renovate (#9380) 2026-01-04 05:22:19 +11:00
Hugo van Kemenade
fe236d77a5 Add seven-day cooldown to Renovate 2026-01-03 11:32:19 +02:00
Andrew Murray
bc0e2c0e61
Remove add-imaging-libs option from setup.py (#9378)
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
2026-01-03 20:18:57 +11:00
Hugo van Kemenade
e66dd607f0
Update xorgproto to 2025.1 (#9379) 2026-01-03 10:56:55 +02:00
Hugo van Kemenade
d5d8a91597
Replace shell: cmd with shell: bash (#9359) 2026-01-03 10:12:48 +02:00
Andrew Murray
b8351fde41
Added type hints to map_metadata_keys() (#9337) 2026-01-03 17:08:17 +11:00
Andrew Murray
36cf82ae76 Updated xorgproto to 2025.1 2026-01-03 16:25:37 +11:00
renovate[bot]
525842215f
Update dependency mypy to v1.19.1 (#9374) 2026-01-03 13:59:38 +11:00
renovate[bot]
844b10f894
Update github-actions (#9375) 2026-01-03 13:55:50 +11:00
Andrew Murray
555fb8371c Move from deprecated getdata to get_flattened_data 2026-01-03 08:16:37 +11:00
Hugo van Kemenade
0a1d6c3c61
Remove Sphinx dependency from mypy (#9370) 2026-01-02 18:30:53 +02:00
mergify[bot]
00ec73dfd1
Fix unclosed file warning (#9371) 2026-01-02 12:33:25 +00:00
Andrew Murray
e924cfd181 Fix unclosed file warning 2026-01-02 21:32:22 +11:00
Hugo van Kemenade
2360d0df17 Revert "Use minimum supported Python version for Lint (#9364)"
This reverts commit 900636e7db.
2026-01-02 12:31:22 +02:00
Hugo van Kemenade
499b796556 Remove Sphinx dependency from mypy 2026-01-02 12:30:14 +02:00
Andrew Murray
1918c6811d Merge branch 'main' into wrap 2026-01-02 20:44:12 +11:00
Andrew Murray
5b677ca1c6 Assert palette is not None 2026-01-02 20:31:47 +11:00
Andrew Murray
b71109d435
Merge branch 'main' into load_palette 2026-01-02 20:21:23 +11:00
Andrew Murray
4337139f0c 12.2.0.dev0 version bump 2026-01-02 20:16:49 +11:00
Andrew Murray
46f45f674d 12.1.0 version bump 2026-01-02 17:03:05 +11:00
Hugo van Kemenade
c9ac097edb
Simplify band splitting (#9291) 2026-01-02 07:42:46 +02:00
Andrew Murray
3baedf2648
Deprecate getdata(), in favour of new get_flattened_data() (#9292) 2026-01-02 10:59:56 +11:00
Hugo van Kemenade
b51a036685
Specify APNG duration type when opening (#9368) 2026-01-01 23:28:16 +02:00
Hugo van Kemenade
8d08e31533
Add release notes for #9348 (#9369) 2026-01-01 20:24:18 +02:00
Andrew Murray
432707ea81 Added release notes for #9348 2026-01-02 04:18:15 +11:00
Andrew Murray
2d589107fb Specify APNG duration type when opening 2026-01-02 03:49:56 +11:00
Hugo van Kemenade
8dee8dd5ba
Add ImageFile context manager (#9367) 2026-01-01 15:50:26 +02:00
Hugo van Kemenade
b2d9bc3c76
Support saving APNG float durations (#9365) 2026-01-01 15:49:03 +02:00
Hugo van Kemenade
f130c10a9c
Allow 1 mode images in MorphOp (#9348) 2026-01-01 15:30:47 +02:00
Andrew Murray
ce11a0c499 Added ImageFile context manager 2026-01-01 20:31:22 +11:00
Andrew Murray
51b35d17e1 Added fp type hint 2026-01-01 20:31:22 +11:00
Andrew Murray
a868c29eb1
Assert fp is not None (#8617) 2026-01-01 20:01:38 +11:00
Andrew Murray
43f8efad79
Added release notes for #9350 (#9366)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-01 18:41:34 +11:00
Andrew Murray
91f219fdcf Support saving float durations 2026-01-01 17:32:59 +11:00
Andrew Murray
900636e7db
Use minimum supported Python version for Lint (#9364) 2026-01-01 17:31:36 +11:00
Andrew Murray
d62955031b
Allow for duplicate font variation styles (#9362)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-01 08:53:04 +11:00
Andrew Murray
2ebfe30ae3
Added return type to ImageFile _close_fp() (#9356) 2025-12-31 14:47:50 +02:00
Andrew Murray
19910ed03e
Call parent verify method (#9357) 2025-12-31 14:47:33 +02:00
Andrew Murray
6b892c495c Merge branch 'main' into imagemorph_get_on_pixels 2025-12-31 23:10:34 +11:00
Andrew Murray
0a9a47fb9b
Update ImageMorph documentation (#9349)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-31 14:02:31 +02:00
Andrew Murray
15c9d11f35
Replace pre-commit with prek (#9360) 2025-12-31 14:32:39 +11:00
Hugo van Kemenade
81e80f7a50 Install and run tox/lint/mypy via uv 2025-12-29 19:35:41 +02:00
Hugo van Kemenade
72931475f2 Replace shell: cmd with shell: bash 2025-12-29 14:57:25 +02:00
Andrew Murray
79357a2718 Revert "Disable https://docs.zizmor.sh/audits/#obfuscation"
This reverts commit 9342e209b2.
2025-12-29 14:44:12 +02:00
Andrew Murray
3abb62ed29 Do not use cmd shell 2025-12-29 14:44:03 +02:00
Hugo van Kemenade
080afe1bf7 Replace pre-commit with prek 2025-12-28 23:46:02 +02:00
Andrew Murray
2ebb3e9964
Use different variables for Image and ImageFile instances (#9316) 2025-12-28 23:09:46 +02:00
Andrew Murray
a04c9806b1
Return LUT from LutBuilder build_default_lut() (#9350) 2025-12-28 23:03:47 +02:00
Andrew Murray
faa843e9c2
Simplify WebP code (#9329) 2025-12-28 23:01:23 +02:00
Andrew Murray
66e3d65a72
Update harfbuzz to 12.3.0 (#9355) 2025-12-28 17:04:44 +02:00
Andrew Murray
4be5b8a2fb
Use unsigned long for DWORD (#9352) 2025-12-28 07:34:57 +11:00
Andrew Murray
e85700fe48
Test PyQt6 on Python 3.14 on Windows (#9353) 2025-12-27 15:54:10 +02:00
Andrew Murray
a704711404 Allow 1 mode images in apply() and match() 2025-12-23 14:13:51 +11:00
Andrew Murray
9b7200d2b4 Allow 1 mode images in MorphOp get_on_pixels() 2025-12-23 12:50:26 +11:00
Andrew Murray
ca21683316
Cast to UINT32 before shifting bits (#9347) 2025-12-22 18:12:10 +11:00
Hugo van Kemenade
4cbef1667f
Revert "Pin docutils to 0.21 (#9344)" (#9346) 2025-12-22 08:09:20 +02:00
Andrew Murray
9dd756f9fe Revert "Pin docutils to 0.21 (#9344)"
This reverts commit 6df6cd4480.
2025-12-22 09:34:03 +11:00
Hugo van Kemenade
00e2198eeb
Test 32-bit Windows on Windows Server 2022 (#9345) 2025-12-21 23:36:12 +02:00
Andrew Murray
9d3555c37e Test Windows Server 2022 2025-12-21 22:39:19 +11:00
Andrew Murray
6df6cd4480
Pin docutils to 0.21 (#9344) 2025-12-20 23:51:05 +11:00
Hugo van Kemenade
205e52b1ee
Update xz to 5.8.2 (#9343) 2025-12-18 00:43:51 +02:00
Andrew Murray
6bf4313a68 Updated xz to 5.8.2 2025-12-18 07:44:40 +11:00
Hugo van Kemenade
8494b06c71
Correct variable type (#9335) 2025-12-11 18:38:35 +02:00
Andrew Murray
6a769da21b Corrected variable type 2025-12-11 23:27:29 +11:00
Andrew Murray
2c6fd36f10
Docs: update major bump cadence (#9334) 2025-12-11 20:02:54 +11:00
Hugo van Kemenade
c0b8c2f0a2
Updated libjpeg-turbo to 3.1.3 (#9333) 2025-12-11 09:47:37 +02:00
Hugo van Kemenade
79ae888d45 Docs: update major bump cadence 2025-12-11 09:29:54 +02:00
Andrew Murray
11d599c798 Added documentation 2025-12-11 18:20:58 +11:00
Andrew Murray
b3da65df94 Updated libjpeg-turbo to 3.1.3 2025-12-11 10:53:04 +11:00
Hugo van Kemenade
1f424efd25
Updated zlib-ng to 2.3.2 (#9324) 2025-12-10 23:13:28 +02:00
Andrew Murray
4b2d4811e1 Added scaling argument to wrap() 2025-12-11 07:51:12 +11:00
Andrew Murray
16691657cc Added height argument to wrap() 2025-12-11 07:51:11 +11:00
Andrew Murray
9ac4edc54b Added wrap() 2025-12-11 07:51:11 +11:00
Andrew Murray
374957cefd
Fix ResourceWarnings in selftest.py (#9332) 2025-12-11 07:45:47 +11:00
Hugo van Kemenade
6d493aa817
Fix testing good P mode BMP images (#9319) 2025-12-10 22:04:23 +02:00
Hugo van Kemenade
33204aac4d
Add release notes for #9070 (#9320) 2025-12-10 21:59:36 +02:00
Hugo van Kemenade
4eb7cd6f29
Improve type hints (#9317) 2025-12-10 21:58:50 +02:00
Hugo van Kemenade
76532808f4 Fix ResourceWarning in selftest.py 2025-12-10 15:26:14 +02:00
Andrew Murray
3332c1d82e
Updated libpng to 1.6.53 (#9325) 2025-12-10 18:23:16 +11:00
Andrew Murray
b3d7263f74
Test Python 3.15 pre-release (#9331) 2025-12-07 22:28:13 +11:00
Hugo van Kemenade
a01fa7d08e Test Python 3.15 pre-release 2025-12-07 11:12:38 +02:00
Andrew Murray
db7a994ad6 Updated libpng to 1.6.53 2025-12-06 10:15:33 +11:00
Andrew Murray
07fee96880
[pre-commit.ci] pre-commit autoupdate (#9318) 2025-12-05 20:53:18 +11:00
Andrew Murray
fd1ddd6d56 Use consistent type 2025-12-03 22:46:42 +11:00
Andrew Murray
7c3ece07c9 Changed type so that im has fp attribute 2025-12-03 22:46:42 +11:00
Andrew Murray
61b1c3c841 Do not change variable type 2025-12-03 22:46:42 +11:00
Andrew Murray
46ac30aa80 Use different variables for Image and ImageFile instances 2025-12-03 22:46:42 +11:00
Andrew Murray
4024f0287d Assert image type 2025-12-03 22:46:42 +11:00
Andrew Murray
4d511d86ed Changed argument type to match use 2025-12-03 22:46:42 +11:00
Andrew Murray
fd3d44d2ef Updated zlib-ng to 2.3.2 2025-12-03 22:38:32 +11:00
Andrew Murray
24b1702360
Update actions/checkout action to v6 (#9323) 2025-12-03 20:09:44 +11:00
mergify[bot]
ae45187719
Update dependency mypy to v1.19.0 (#9322) 2025-12-03 08:47:56 +00:00
renovate[bot]
b633f49b9c
Update actions/checkout action to v6 2025-12-03 07:14:19 +00:00
renovate[bot]
7adecb792c
Update dependency mypy to v1.19.0 2025-12-03 07:14:12 +00:00
Andrew Murray
b428f7209f Open a macOS window on CI 2025-12-02 23:53:45 +11:00
Andrew Murray
04ee0cc3b1 Raise error if subprocess gives non-zero returncode 2025-12-02 23:06:18 +11:00
Andrew Murray
dbc5a4fc90 Added release notes for #9070 2025-12-02 22:26:23 +11:00
Andrew Murray
b3d9ba8e88 Removed unused files 2025-12-02 10:42:14 +11:00
Andrew Murray
47c6aae0ca Fixed testing good P mode BMP images 2025-12-02 10:40:43 +11:00
Andrew Murray
9342e209b2 Disable https://docs.zizmor.sh/audits/#obfuscation 2025-12-02 10:21:55 +11:00
pre-commit-ci[bot]
ce3e085751
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.3...v0.14.7)
- [github.com/psf/black-pre-commit-mirror: 25.9.0 → 25.11.0](https://github.com/psf/black-pre-commit-mirror/compare/25.9.0...25.11.0)
- [github.com/PyCQA/bandit: 1.8.6 → 1.9.2](https://github.com/PyCQA/bandit/compare/1.8.6...1.9.2)
- [github.com/pre-commit/mirrors-clang-format: v21.1.2 → v21.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.2...v21.1.6)
- [github.com/python-jsonschema/check-jsonschema: 0.34.1 → 0.35.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.34.1...0.35.0)
- [github.com/zizmorcore/zizmor-pre-commit: v1.16.2 → v1.18.0](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.16.2...v1.18.0)
- [github.com/sphinx-contrib/sphinx-lint: v1.0.1 → v1.0.2](https://github.com/sphinx-contrib/sphinx-lint/compare/v1.0.1...v1.0.2)
- [github.com/tox-dev/pyproject-fmt: v2.11.0 → v2.11.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.11.0...v2.11.1)
2025-12-01 17:26:21 +00:00
Andrew Murray
b0a5bc2a6b
Allow window ID to be passed to ImageGrab.grab() on macOS (#9070) 2025-12-01 20:42:09 +11:00
Andrew Murray
370da461cf
Updated libpng to 1.6.51 (#9305)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-01 10:02:09 +11:00
Hugo van Kemenade
77e16b1030
Apply encoder options when saving multiple PNG frames (#9300) 2025-11-30 22:21:42 +02:00
Hugo van Kemenade
2150f088ed
Read all non-zero transparency from mode 1 PNG images as 255 (#9282) 2025-11-30 22:20:38 +02:00
Hugo van Kemenade
972bb4c39b
Test ImageFont.ImageFont, in case freetype2 is not supported (#9287) 2025-11-30 22:20:15 +02:00
Hugo van Kemenade
c9095cb02a
Support writing IFD, SIGNED_RATIONAL and InkNames TIFF tags (#9276) 2025-11-30 22:14:18 +02:00
Hugo van Kemenade
416f02338b
Remove unused modes (#9275) 2025-11-30 22:12:22 +02:00
Hugo van Kemenade
89795df94f
Use different variables for Image and ImageFile instances (#9268) 2025-11-30 22:11:22 +02:00
Hugo van Kemenade
93aa55cece
Updated brotli to 1.2.0 (#9284) 2025-11-30 22:08:30 +02:00
Hugo van Kemenade
8d7dc9db5b
Update libimagequant to 4.4.1 (#9301) 2025-11-30 22:07:42 +02:00
Hugo van Kemenade
4a733e5092
Correct allocating new color to RGBA palette (#9313) 2025-11-30 21:57:22 +02:00
Hugo van Kemenade
da76f6d99b
Close image on ImageFont exception (#9304) 2025-11-30 21:56:35 +02:00
Hugo van Kemenade
65c32ecca4
retina -> Retina 2025-11-30 21:55:59 +02:00
Hugo van Kemenade
5543e85ad2
Update zlib-ng to 2.3.1, except on manylinux2014 aarch64 (#9312) 2025-11-29 11:13:07 +02:00
Andrew Murray
37da2ba381 Corrected allocating new color to RGBA palette 2025-11-29 17:22:44 +11:00
Andrew Murray
8814d42fd9 Update zlib-ng to 2.3.1, except on manylinux2014 aarch64 2025-11-29 14:24:43 +11:00
Andrew Murray
d06c8b3591 Test drawing a new color onto a dirty palette 2025-11-27 13:12:42 +11:00
Andrew Murray
6a9960e8c1 Only update Python palette if rawmode was different to the mode 2025-11-25 23:40:34 +11:00
Hugo van Kemenade
ec40c546d7
Updated Ubuntu version (#9306) 2025-11-22 13:40:52 +02:00
Andrew Murray
7055937eb1 Updated Ubuntu version 2025-11-22 17:47:09 +11:00
Andrew Murray
cce73b1e89 Close image on ImageFont exception 2025-11-19 21:52:21 +11:00
Andrew Murray
88247a9ef3
Updated version 2025-11-19 21:31:27 +11:00
Andrew Murray
71b3e5c015
Updated harfbuzz to 12.2.0 (#9289) 2025-11-18 18:00:44 +11:00
Andrew Murray
75280b8b0f
Merge branch 'main' into brotli 2025-11-15 19:59:23 +11:00
Andrew Murray
6107b9e82d Update libimagequant to 4.4.1 2025-11-15 07:41:59 +11:00
Hugo van Kemenade
38c6c478e0
Reapply "Use macos-latest for iOS arm64 simulator" (#9259) 2025-11-14 14:17:40 +02:00
Andrew Murray
bc1237ef3d Update dependency cibuildwheel to v3.3.0 2025-11-14 21:22:58 +11:00
Andrew Murray
142c1320b2 Apply encoder options when saving multiple PNG frames 2025-11-14 20:08:49 +11:00
Andrew Murray
3b8fd040de
Escape period in pre-commit-config (#9036) 2025-11-10 22:35:49 +11:00
Andrew Murray
8fbb801275
Add Apache-2.0 notice to IcoImagePlugin (#8947) 2025-11-10 21:56:10 +11:00
Andrew Murray
921a470506 Simplified code 2025-11-06 18:24:10 +11:00
Hugo van Kemenade
b33a31524a
Add Fedora 43 (#9290) 2025-11-05 19:24:43 +02:00
Andrew Murray
18c7f87fe3 Added Fedora 43 2025-11-05 23:21:46 +11:00
Andrew Murray
e44ce2f00e Updated harfbuzz to 12.2.0 2025-11-05 19:09:49 +11:00
Andrew Murray
b59e031256
[pre-commit.ci] pre-commit autoupdate (#9288) 2025-11-04 08:03:42 +11:00
Hugo van Kemenade
666dd52478 Drop removed rule 2025-11-03 19:56:21 +02:00
pre-commit-ci[bot]
85d783fb52
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.3 → v0.14.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.3...v0.14.3)
- [github.com/python-jsonschema/check-jsonschema: 0.34.0 → 0.34.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.34.0...0.34.1)
- [github.com/zizmorcore/zizmor-pre-commit: v1.14.2 → v1.16.2](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.14.2...v1.16.2)
- [github.com/sphinx-contrib/sphinx-lint: v1.0.0 → v1.0.1](https://github.com/sphinx-contrib/sphinx-lint/compare/v1.0.0...v1.0.1)
- [github.com/tox-dev/pyproject-fmt: v2.7.0 → v2.11.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.7.0...v2.11.0)
- [github.com/tox-dev/tox-ini-fmt: 1.6.0 → 1.7.0](https://github.com/tox-dev/tox-ini-fmt/compare/1.6.0...1.7.0)
2025-11-03 17:20:17 +00:00
Andrew Murray
b3d9bd9950 Test ImageFont.ImageFont, in case freetype2 is not supported 2025-11-03 23:07:15 +11:00
Andrew Murray
1a27f958d7 Updated brotli to 1.2.0 2025-10-31 18:19:05 +11:00
Andrew Murray
dfd24ba615 Read all non-zero transparency from mode 1 images in the same way 2025-10-30 22:03:39 +11:00
Hugo van Kemenade
e36e67081a
Simplify code now that I;16* modes are the only IMAGING_TYPE_SPECIAL (#9263) 2025-10-27 15:19:54 +02:00
Hugo van Kemenade
b90a00eccb
Remove BytesIO from DdsImagePlugin (#9273) 2025-10-27 15:16:27 +02:00
Hugo van Kemenade
ce3323afa9
Update github-actions (#9277) 2025-10-27 07:23:50 +02:00
renovate[bot]
29c5ffe745
Update github-actions 2025-10-27 02:48:10 +00:00
Hugo van Kemenade
cc4ca5bf17
Added type hints (#9269) 2025-10-24 16:56:36 +03:00
Hugo van Kemenade
148a19eee4
Fix ZeroDivisionError in DdsImagePlugin (#9272) 2025-10-24 16:44:46 +03:00
Hugo van Kemenade
a63ba0e3b6
Correct __getitem__ return type (#9264) 2025-10-24 16:42:14 +03:00
Andrew Murray
82cdaa456c Support writing SIGNED_RATIONAL tag types 2025-10-24 03:55:45 +11:00
Andrew Murray
ddd4f00720 Support writing IFD tag types 2025-10-23 20:03:14 +11:00
Andrew Murray
b04d8792f5 Support writing InkNames 2025-10-23 08:53:00 +11:00
Andrew Murray
109ee1569d Removed I;32L rawmode 2025-10-22 22:24:15 +11:00
Andrew Murray
208bbe95f9 Remove I;32L and I;32B modes 2025-10-22 22:22:00 +11:00
Andrew Murray
b1e2f2e652 Improved coverage 2025-10-22 20:08:22 +11:00
Andrew Murray
7d6f2ce90b Removed BytesIO 2025-10-21 23:35:17 +11:00
Andrew Murray
e1f4352ce9 Fixed ZeroDivisionError 2025-10-21 23:11:18 +11:00
Andrew Murray
e90bb1559c Rearranged code 2025-10-20 21:00:29 +11:00
Andrew Murray
4b90888a7d Added type hints 2025-10-20 19:38:29 +11:00
Andrew Murray
51e3fe45bf Use different variables for Image and ImageFile instances 2025-10-20 19:18:00 +11:00
Hugo van Kemenade
76f04b46c5
Fix warnings (#9257) 2025-10-17 21:18:10 +03:00
Hugo van Kemenade
2d23257595
Update macOS tested Pillow versions (#9265) 2025-10-17 15:29:08 +03:00
Andrew Murray
03d48f4011 Updated macOS tested Pillow versions 2025-10-17 23:05:33 +11:00
Andrew Murray
e969fa7aea Correct __getitem__ return type 2025-10-17 06:14:02 +11:00
Andrew Murray
ae43b36030 Simplified code now that I;16* modes are the only IMAGING_TYPE_SPECIAL 2025-10-16 20:55:56 +11:00
Hugo van Kemenade
5122c8356d
Remove Fedora 41 (#9260) 2025-10-16 07:19:52 +03:00
Yan-Ke Guo
424168b69c
Merge branch 'main' into main 2025-10-16 09:46:04 +08:00
Andrew Murray
ae7d28eddb Removed Fedora 41 2025-10-16 12:03:13 +11:00
Andrew Murray
933df2450d Reapply "Use macos-latest for iOS arm64 simulator"
This reverts commit 592b2f820a.
2025-10-16 07:21:15 +11:00
Hugo van Kemenade
3620d48459 12.1.0.dev0 version bump 2025-10-15 21:28:16 +03:00
Hugo van Kemenade
693df7b42c 12.0.0 version bump 2025-10-15 20:06:44 +03:00
Hugo van Kemenade
d175bb88a3
Use macos-14 for iOS arm64 simulator (#9258) 2025-10-15 19:22:42 +03:00
Hugo van Kemenade
592b2f820a
Revert "Use macos-latest for iOS arm64 simulator" 2025-10-15 19:00:54 +03:00
Andrew Murray
c680ff029f
Merge branch 'main' into main 2025-10-15 22:31:20 +11:00
Andrew Murray
7d89946688 Removed duplicate library 2025-10-15 22:21:51 +11:00
Andrew Murray
3eecafd62c Fixed warning 2025-10-15 22:19:38 +11:00
mergify[bot]
5dddb2ce94
Use enums for Modes and RawModes in C (#9256) 2025-10-15 10:58:36 +00:00
mergify[bot]
e7b72a3bbd
Add ImageText (#9098) 2025-10-15 10:49:52 +00:00
mergify[bot]
864d4b6e09
Shift bits before making value negative (#9255) 2025-10-15 10:21:37 +00:00
mergify[bot]
994a9def5d
Install arro3 dependencies when type checking (#9254) 2025-10-15 09:37:01 +00:00
Andrew Murray
d5e1601b32 Improved documentation 2025-10-15 20:02:12 +11:00
Andrew Murray
e533ccccfc Merge branch 'main' into imagetext 2025-10-15 19:38:38 +11:00
Andrew Murray
95a85dc669 Use snake case 2025-10-15 19:38:30 +11:00
Andrew Murray
4889863139 Renamed ImageText class to Text 2025-10-15 19:38:25 +11:00
Andrew Murray
4fbe28a3a2 Merge branch 'main' into mode_enums 2025-10-15 19:25:58 +11:00
Andrew Murray
78b0e06dbb Shift bits before making value negative 2025-10-15 19:07:21 +11:00
Hugo van Kemenade
5ee57e4c83
Support saving variable length rational TIFF tags by default (#9241) 2025-10-15 11:06:57 +03:00
Hugo van Kemenade
1148b7af72
Check return types (#9045) 2025-10-15 11:06:20 +03:00
Hugo van Kemenade
7a6664d70b
Added four private SGI TIFF tags (#9245) 2025-10-15 11:01:35 +03:00
Andrew Murray
ef323ab7d7 Install dependencies when type checking 2025-10-15 18:58:55 +11:00
Hugo van Kemenade
9e3a70a514
Band names for arrow exported images (#9099) 2025-10-15 10:56:32 +03:00
Hugo van Kemenade
608619c17f
Use macos-latest for iOS arm64 simulator (#9250) 2025-10-15 10:55:22 +03:00
Andrew Murray
9cb36a91d0
Upgrade from macos-13 (#9212)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-10-15 10:53:49 +03:00
Hugo van Kemenade
9042234052
If pasting an image onto itself at a lower position, copy from bottom (#8882) 2025-10-15 10:51:31 +03:00
Hugo van Kemenade
1e5237af77
Removed unused access for I;32L and I;32B (#9238) 2025-10-15 10:50:51 +03:00
Hugo van Kemenade
33eb16bb39
Update comment: ImagingHistogramInstance can use two bands (#9251) 2025-10-14 15:08:33 +03:00
Andrew Murray
2e74354e92
Corrected scientific-python-nightly-wheels pattern (#9252) 2025-10-14 23:06:07 +11:00
Andrew Murray
8de7e7763e Corrected scientific-python-nightly-wheels pattern 2025-10-14 21:47:56 +11:00
Andrew Murray
55a4901bba Removed BGR;15 and BGR;16 modes 2025-10-14 20:34:03 +11:00
Andrew Murray
a591000055 Removed BGR;24 and BGR;32 2025-10-14 20:31:42 +11:00
Andrew Murray
2caa504991 ImagingHistogramInstance can use two bands 2025-10-14 18:57:26 +11:00
Andrew Murray
55f3e63b22 Revert "Use macos-14 for iOS arm64 simulator (#9161)"
This reverts commit c214ad8c8d.
2025-10-14 18:25:56 +11:00
Andrew Murray
014f421221 Removed assert 2025-10-14 08:48:22 +11:00
Andrew Murray
c60b36d0a7
Run sdist when scheduled, but do not upload to scientific-python-nightly-wheels index (#9248) 2025-10-13 15:24:04 +03:00
Hugo van Kemenade
4892244908
Update 12.0.0 release notes (#9247)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-10-13 00:31:32 +03:00
Andrew Murray
5d09e0d325
Update dependency cibuildwheel to v3.2.1 (#9246) 2025-10-12 22:51:38 +11:00
Andrew Murray
416fb81074
Removed shebang lines and executable flags (#9179)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-10-12 13:19:34 +03:00
renovate[bot]
1b2121c7a1
Update dependency cibuildwheel to v3.2.1 2025-10-12 09:35:05 +00:00
Andrew Murray
e36bf768c5 Added four private SGI tags 2025-10-12 15:58:22 +11:00
Andrew Murray
c874256132 Support saving variable length rational TIFF tags by default 2025-10-12 07:08:52 +11:00
Hugo van Kemenade
fbdf607c7f
Wheels CI: Check number of expected dists (#9239)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-10-11 17:13:22 +03:00
wiredfool
52413cf0dc
Update Tests/test_arro3.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-10-11 08:25:07 +01:00
Andrew Murray
a66d0d1f05 Assert getpalette does not return None 2025-10-11 14:48:13 +11:00
Andrew Murray
755ebb8307 Assert getcolors does not return None 2025-10-11 14:48:01 +11:00
Andrew Murray
76ab80f10b Assert getpixel returns tuple 2025-10-11 14:48:01 +11:00
wiredfool
b4fe17cecf More typey lint 2025-10-10 15:39:47 +01:00
wiredfool
13e4e587e6 added import-not-found ignores, removed call-overload ignores 2025-10-10 15:34:11 +01:00
Andrew Murray
324258ca7a Split parametrization 2025-10-10 15:19:25 +01:00
Hugo van Kemenade
9fd4af55f7
Remove Pillow version from PDF comment (#9176) 2025-10-10 16:54:06 +03:00
Hugo van Kemenade
c47b8badb3
Assert image type (#8845) 2025-10-10 16:43:14 +03:00
Hugo van Kemenade
ef8d5d3c2a
Support saving variable length rational TIFF tags (#9111) 2025-10-10 16:40:37 +03:00
Andrew Murray
5d3086b01f Removed unused access for I;32L and I;32B 2025-10-10 22:44:09 +11:00
wiredfool
bd6e70fccd Check against mode 1 instead of input mode for Chops.c 2025-10-10 12:42:58 +01:00
wiredfool
2b4c7c011e
Typing import suggestion
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-10 11:55:45 +01:00
Hugo van Kemenade
6d6f0496d9
Build Python 3.14 on macOS 10.15 (#9234) 2025-10-10 13:40:56 +03:00
Hugo van Kemenade
3a8b9052e0
Added ImageDraw alpha channel examples (#9201) 2025-10-10 13:13:07 +03:00
Hugo van Kemenade
7cb074f095
Test GD transparency (#9196) 2025-10-10 12:59:22 +03:00
Hugo van Kemenade
10c674510f
Test mode when saving PPM images (#9195) 2025-10-10 12:58:56 +03:00
Hugo van Kemenade
8e3784f37b
Test unsupported BMP bitfields layout (#9193) 2025-10-10 12:58:45 +03:00
Hugo van Kemenade
396755ed1b
Test largest CUR cursor (#9191) 2025-10-10 12:58:15 +03:00
Hugo van Kemenade
274a65b5d0
Do not unnecessarily update FLI __offset (#9184) 2025-10-10 12:56:14 +03:00
Hugo van Kemenade
71e6660f5d
Fill alpha channel when quantizing RGB images (#9133) 2025-10-10 12:50:38 +03:00
Hugo van Kemenade
8c42abd946
Allow RGBA palettes to work with ImageOps.expand() (#9138) 2025-10-10 12:48:12 +03:00
Hugo van Kemenade
c22e7af885
Fixed loading rotated PCD images (#9177) 2025-10-10 12:45:28 +03:00
Andrew Murray
c40ba22a5f
Cast before shifting bits (#9236) 2025-10-10 07:58:32 +11:00
Andrew Murray
a2ef220b32 Cast before additional shifting 2025-10-09 21:01:42 +11:00
Andrew Murray
1d4cda65cf Cast to UINT32 before shifting bits 2025-10-09 21:01:17 +11:00
Hugo van Kemenade
6b4bb79b44
Use _ensure_mutable() (#9200) 2025-10-08 19:22:04 +03:00
Hugo van Kemenade
797d83f818
Seek past BeginBinary data when parsing EPS metadata (#9211) 2025-10-08 19:20:58 +03:00
Andrew Murray
cec262ce6b
Do not allow negative offset with memory mapping (#9235) 2025-10-08 19:02:27 +11:00
Andrew Murray
6d19b8adef Do not allow negative offset with memory mapping 2025-10-08 17:08:39 +11:00
Andrew Murray
7259685ba4 Build Python 3.14 on macOS 10.15 2025-10-07 09:05:53 +11:00
Hugo van Kemenade
8b41e5b479
[pre-commit.ci] pre-commit autoupdate (#9233) 2025-10-06 20:49:19 +03:00
pre-commit-ci[bot]
09e571780e
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.11...v0.13.3)
- [github.com/psf/black-pre-commit-mirror: 25.1.0 → 25.9.0](https://github.com/psf/black-pre-commit-mirror/compare/25.1.0...25.9.0)
- [github.com/pre-commit/mirrors-clang-format: v21.1.0 → v21.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.0...v21.1.2)
- [github.com/python-jsonschema/check-jsonschema: 0.33.3 → 0.34.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.33.3...0.34.0)
- [github.com/zizmorcore/zizmor-pre-commit: v1.12.1 → v1.14.2](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.12.1...v1.14.2)
- [github.com/tox-dev/pyproject-fmt: v2.6.0 → v2.7.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.6.0...v2.7.0)
2025-10-06 17:29:41 +00:00
Hugo van Kemenade
c807f6508b
Clear C image when MPO frame image size changes (#9208) 2025-10-05 11:53:06 +03:00
Andrew Murray
2275993541
When converting RGBA to PA, use RGB to P quantization (#9153) 2025-10-05 06:10:59 +11:00
Andrew Murray
b3d1836907
Update harfbuzz to 12.1.0 (#9218)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-04 19:49:09 +10:00
Andrew Murray
762bdce34f
Merge branch 'main' into rgba_pa 2025-10-04 18:58:00 +10:00
Hugo van Kemenade
1a1194abe7
Remove use of sudo from libavif and raqm install scripts (#9231) 2025-10-04 11:13:10 +03:00
Hugo van Kemenade
3ced6ca78f
Load image palette into Python after converting to PA (#9152) 2025-10-04 11:02:35 +03:00
Hugo van Kemenade
a2e2939240
Check all reserved bytes in FLI header (#9183) 2025-10-04 11:02:10 +03:00
Hugo van Kemenade
5a5c51c7a2
Limit length of read operation in ImageFont._load_pilfont_data() (#9181) 2025-10-04 11:01:36 +03:00
Hugo van Kemenade
8324b49394
Update libtiff to 4.7.1 (#9222) 2025-10-04 10:59:35 +03:00
Hugo van Kemenade
ffe00106f5
Update FreeType to 2.14.1 on macOS and Linux wheels (#9217) 2025-10-04 10:59:17 +03:00
Andrew Murray
0c0ff7c38f Removed use of sudo from libavif and raqm install scripts 2025-10-03 20:27:42 +10:00
Hugo van Kemenade
88c2c11612
Update Python version (#9230) 2025-10-02 23:56:03 +03:00
Andrew Murray
7cb518031a Updated FreeType to 2.14.1 on macOS and Linux 2025-10-02 22:21:30 +10:00
Andrew Murray
0bcfd3b55c Updated Python version 2025-10-02 21:35:26 +10:00
Andrew Murray
a953d86b4d
Python 3.9 wheels are no longer needed (#9214) 2025-10-01 23:11:53 +10:00
Hugo van Kemenade
6b10d4c1d0
Remove unused Image _expand() (#9227) 2025-09-30 19:16:40 +03:00
Andrew Murray
e2a8e217da Removed _expand() 2025-09-29 23:18:47 +10:00
Andrew Murray
637f25dc2c Revert "Allow cmake<4 when building libtiff"
This reverts commit 8141221201.
2025-09-25 21:01:33 +10:00
Andrew Murray
2c43883073 Updated libtiff to 4.7.1 2025-09-25 21:01:16 +10:00
renovate[bot]
d42e537efe
Update dependency cibuildwheel to v3.2.0 (#9219) 2025-09-23 12:17:40 +10:00
Hugo van Kemenade
4aef5d0743
Update Ghostscript to 10.6.0 (#9202) 2025-09-21 10:44:53 +03:00
Hugo van Kemenade
de4c4ae485
Update openjpeg to 2.5.4 (#9215) 2025-09-21 10:44:34 +03:00
Hugo van Kemenade
24ace1d1ef
Update harfbuzz to 11.5.0 (#9203) 2025-09-21 10:43:56 +03:00
Andrew Murray
913a6d8390 Updated harfbuzz to 11.5.0 2025-09-21 07:45:03 +10:00
Andrew Murray
ce8d05484b Use naturally created image 2025-09-21 07:44:47 +10:00
Andrew Murray
9ba1029d51 Clear C image when MPO frame image size changes 2025-09-21 07:44:47 +10:00
Andrew Murray
222933df54 Seek past BeginBinary data when parsing metadata 2025-09-21 07:44:31 +10:00
Andrew Murray
d64f56f53b Updated openjpeg to 2.5.4 2025-09-21 07:38:17 +10:00
Hugo van Kemenade
abfdbdd6ce
Updated FreeType to 2.14.1 on Windows (#9206) 2025-09-21 00:21:42 +03:00
Andrew Murray
04177eb6ba Updated FreeType to 2.14.1 on Windows 2025-09-20 20:17:10 +10:00
Andrew Murray
6916a73b57 Build FreeType 2.14.1 on macOS 13, instead of using 2.14.0 from brew 2025-09-20 20:16:50 +10:00
Andrew Murray
92e671d797 Updated tests for FreeType 2.14.1 2025-09-20 20:15:20 +10:00
renovate[bot]
9e4256e8aa
Update dependency mypy to v1.18.2 (#9213) 2025-09-19 22:22:30 +10:00
Hugo van Kemenade
0013f9590a
Updated macOS tested Pillow versions (#9209) 2025-09-17 15:36:56 +01:00
Andrew Murray
c8b4a24e75 Updated macOS tested Pillow versions 2025-09-17 19:51:50 +10:00
Andrew Murray
ca3528f46e
Document that macOS window value is a CGWindowID 2025-09-16 21:43:24 +10:00
Andrew Murray
610d564aea
Merge branch 'main' into main 2025-09-16 19:43:34 +10:00
Andrew Murray
53302c2281
Split versionadded info
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-09-16 19:43:03 +10:00
renovate[bot]
d70cba3762
Update dependency mypy to v1.18.1 (#9207) 2025-09-14 15:55:50 +10:00
Andrew Murray
5df7f98a59 Updated Ghostscript to 10.6.0 2025-09-10 13:16:12 +10:00
Andrew Murray
410fb60f65 Added alpha channel examples 2025-09-09 22:01:07 +10:00
Andrew Murray
3a580e0f79 Use _ensure_mutable 2025-09-09 21:04:16 +10:00
Hugo van Kemenade
b7e0570cb1
Add GitHub profile link to release notes (#9197) 2025-09-08 17:42:23 +03:00
Andrew Murray
4b8bcb6f37
Use link
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-09-09 00:04:01 +10:00
Andrew Murray
2d8244c45a Added GitHub profile link 2025-09-08 23:39:04 +10:00
renovate[bot]
a58fc562f0
Update github-actions (#9194) 2025-09-07 13:55:35 +10:00
Andrew Murray
b90fe802ce Test transparency 2025-09-07 12:49:10 +10:00
Andrew Murray
7d379842c1 Test saving unsupported mode 2025-09-07 12:28:20 +10:00
Andrew Murray
4469ee0fc0 Test saving P4 images 2025-09-07 12:25:56 +10:00
Hugo van Kemenade
eef4848a0a
Use monkeypatch (#9192) 2025-09-05 22:07:58 +03:00
Andrew Murray
2bf482230d Test unsupported BMP bitfields layout 2025-09-05 23:43:47 +10:00
Andrew Murray
d4ed512bec Use monkeypatch 2025-09-05 23:14:52 +10:00
Andrew Murray
067569790b Test largest cursor 2025-09-05 20:11:02 +10:00
Andrew Murray
bf18e5fe8b Assert fp is not None 2025-09-05 20:10:27 +10:00
Andrew Murray
a529797857 Assert fp is not None 2025-09-05 20:04:50 +10:00
Andrew Murray
476b122ae4 Simplified code 2025-09-05 20:00:04 +10:00
Hugo van Kemenade
ba04d58851
Only deprecate fromarray mode for changing data types (#9063) 2025-09-04 16:43:21 +03:00
Andrew Murray
54d329f98f
Updated harfbuzz to 11.4.5 (#9150)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-09-04 23:26:47 +10:00
Hugo van Kemenade
8f685e1235
Split versionadded info (#9190) 2025-09-04 15:06:51 +03:00
Andrew Murray
5de27c6258 Split versionadded info 2025-09-04 21:09:00 +10:00
Andrew Murray
73490e10ad Mention Pillow 11.3.0 behaviour 2025-09-04 21:00:13 +10:00
Hugo van Kemenade
bd63c4fdba
Deprecate Image._show (#9186) 2025-09-04 13:57:15 +03:00
Hugo van Kemenade
9e73e6e8db
Always check XMLPacket value (#9113) 2025-09-04 13:49:01 +03:00
Hugo van Kemenade
25db48254a
Rename variable to not shadow import (#9124) 2025-09-04 13:47:30 +03:00
Hugo van Kemenade
29309e4637
Remove unused code (#9114) 2025-09-04 13:46:44 +03:00
Hugo van Kemenade
ae65315e78
Fix reading RGB and CMYK IPTC images (#9088) 2025-09-04 13:41:03 +03:00
Hugo van Kemenade
61718eab59
Install zstd for libtiff on Linux wheels (#9097) 2025-09-04 13:38:34 +03:00
Hugo van Kemenade
84c04b01da
Revert "Removed unused code" (#9185) 2025-09-04 13:37:47 +03:00
Hugo van Kemenade
c0004726d6
Improve WalImageFile test coverage (#9189) 2025-09-04 13:37:39 +03:00
Hugo van Kemenade
f570c67025
Update zlib-ng to 2.2.5 (#9140) 2025-09-04 13:35:53 +03:00
Hugo van Kemenade
c1538aca21
Update raqm to 0.10.3 (#9137) 2025-09-04 13:35:19 +03:00
Hugo van Kemenade
8b5e105bc5
Update libjpeg-turbo to 3.1.2 (#9188) 2025-09-04 13:34:53 +03:00
Andrew Murray
cfca02a759 Improved WAL test coverage 2025-09-04 08:27:52 +10:00
Andrew Murray
e0da1a62ec Use walrus operator 2025-09-04 08:10:31 +10:00
Andrew Murray
f0bbab94a6 Updated libjpeg-turbo to 3.1.2 2025-09-04 07:23:15 +10:00
Andrew Murray
877707379b Deprecate Image._show 2025-09-03 22:38:37 +10:00
Andrew Murray
abf088fae5 Updated comment 2025-09-03 21:52:27 +10:00
Andrew Murray
caede14465 Revert "Removed unused code"
This reverts commit 0e22b0ca6c.
2025-09-03 21:46:54 +10:00
Hugo van Kemenade
208e9b52dc
Removed unused code (#9182) 2025-09-03 13:50:27 +03:00
Andrew Murray
e73b5ff4cd Do not unnecessarily update __offset 2025-09-03 19:35:01 +10:00
Andrew Murray
72c067af29 Check all reserved bytes in header 2025-09-03 19:23:26 +10:00
Andrew Murray
0e22b0ca6c Removed unused code 2025-09-03 18:33:52 +10:00
Andrew Murray
caacd38e1b Raise mode error before reading 2025-09-02 21:32:13 +10:00
Andrew Murray
485d9884cf Limit length of read operation 2025-09-02 21:24:57 +10:00
Andrew Murray
57a5f76e6d Removed unused split 2025-09-02 21:09:07 +10:00
pre-commit-ci[bot]
31eee6e5f7
[pre-commit.ci] pre-commit autoupdate (#9180) 2025-09-02 07:57:54 +10:00
Andrew Murray
1c70e716ce
Merge branch 'main' into fromarray_mode 2025-09-01 08:30:22 +10:00
Andrew Murray
c7a268e5a5
ImageMorph operations must have length 1 (#9102) 2025-09-01 08:23:30 +10:00
Andrew Murray
c6915f717f rotate() will use "angle % 360" 2025-08-29 07:43:51 +10:00
Andrew Murray
05a6010311 Fixed loading rotated PCD images 2025-08-29 07:35:18 +10:00
Andrew Murray
a59ce257e9 Install zstd for libtiff on Linux 2025-08-28 19:37:26 +10:00
Andrew Murray
b33254f370
Merge branch 'main' into mode_enums 2025-08-28 08:36:22 +10:00
Hugo van Kemenade
35f23fb78c
Set correct size for rotated PCD images after opening (#9086) 2025-08-27 17:59:10 +03:00
Hugo van Kemenade
801f7adb3c
Simplify check for GBR width and height (#9089) 2025-08-27 17:58:03 +03:00
Hugo van Kemenade
bb8dfa4c23
Make in parallel when building libjpeg-turbo and openjpeg for macOS and Linux wheels (#9144) 2025-08-27 17:47:24 +03:00
Hugo van Kemenade
146d03c250
Fix ZeroDivisionError in ImageStat (#9105) 2025-08-27 17:45:55 +03:00
Hugo van Kemenade
a74e4fa9a5
When deleting EXIF IFD tag, delete IFD data (#9083) 2025-08-27 17:43:19 +03:00
Hugo van Kemenade
9a2c5160f2
Allow alpha_composite to use LA images (#9066) 2025-08-27 17:42:50 +03:00
Hugo van Kemenade
bde90757fa
Improve _accept length check (#9170) 2025-08-27 17:41:40 +03:00
Andrew Murray
84e89bf5c3
Restored unpacker 2025-08-27 07:07:13 +10:00
Andrew Murray
178b3a70cc
Updated formatting 2025-08-27 06:58:51 +10:00
Andrew Murray
ed164d1bfa
pre-commit fixes 2025-08-26 22:13:45 +10:00
Andrew Murray
59d6f313d6
Removed setuptools version requirement 2025-08-26 21:07:32 +10:00
Hugo van Kemenade
f9db7a3d08
Add has_feature_version helper (#9172) 2025-08-26 11:27:20 +03:00
Andrew Murray
0d72707d4f Removed version from PDF comment 2025-08-26 08:55:11 +10:00
Hugo van Kemenade
97a4d1f593
Replace print with assert (#9171) 2025-08-22 13:14:15 +03:00
Andrew Murray
f80ac8d6b8 Check version independently 2025-08-22 19:16:38 +10:00
Andrew Murray
54f4a346ef Added has_feature_version 2025-08-22 19:06:19 +10:00
Andrew Murray
84122a20c7 Replaced print with assert 2025-08-22 18:29:25 +10:00
Andrew Murray
009444f9c5 Improved _accept length check 2025-08-21 21:56:03 +10:00
Hugo van Kemenade
9f5d1f71a0
Do not set core to DeferredError (#9166) 2025-08-20 22:21:39 +03:00
Andrew Murray
6a3bde05a4 Do not set core to DeferredError 2025-08-20 15:32:12 +10:00
renovate[bot]
34c651deb8
Update dependency cibuildwheel to v3.1.4 (#9164) 2025-08-20 08:48:38 +10:00
Hugo van Kemenade
dabeb689c9
Document ImageFile.MAXBLOCK (#9163) 2025-08-19 20:20:53 +03:00
Andrew Murray
c826b932c0 Document MAXBLOCK 2025-08-19 15:45:42 +10:00
renovate[bot]
1435339290
Update actions/checkout action to v5 (#9156) 2025-08-19 10:13:56 +10:00
Andrew Murray
c214ad8c8d
Use macos-14 for iOS arm64 simulator (#9161) 2025-08-19 06:43:07 +10:00
Hugo van Kemenade
c9907e8be2
Remove support for FreeType <= 2.9.0 (#9159) 2025-08-18 12:40:44 +03:00
Andrew Murray
62546924b5 Remove support for FreeType <= 2.9.0 2025-08-18 08:07:12 +10:00
Hugo van Kemenade
9d39fe6ada
Updated macOS version in CI targets (#9157) 2025-08-17 21:21:13 +03:00
Andrew Murray
425a3a1af0 Updated macOS version in CI targets 2025-08-16 11:33:02 +10:00
Andrew Murray
ba66fec3d2 When converting RGBA to PA, use RGB to P quantization 2025-08-15 23:39:33 +10:00
Andrew Murray
0ae2611b44 Copy C palette when merging 2025-08-15 23:22:14 +10:00
Andrew Murray
6d974b61d6 Load image palette into Python after converting to PA 2025-08-15 14:37:31 +10:00
Hugo van Kemenade
092d4422d5
Update redirected URLs (#9148) 2025-08-12 10:57:51 +03:00
Andrew Murray
a72c631877 Updated URLs 2025-08-12 12:36:33 +10:00
Hugo van Kemenade
5e7f131287
Add Debian 13 Trixie (#9147)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-08-11 17:40:32 +10:00
Hugo van Kemenade
165a133d36
Do not import from Tests directory in checks (#9143) 2025-08-09 15:10:35 +03:00
Andrew Murray
1a5acabd32 Make in parallel when building libjpeg-turbo and openjpeg 2025-08-09 19:53:05 +10:00
Hugo van Kemenade
e786019e83
Make in parallel when building brotli and libavif for macOS and Linux wheels (#9142) 2025-08-09 11:59:53 +03:00
Andrew Murray
f69c221376 Do not import from Tests directory 2025-08-09 18:56:55 +10:00
Andrew Murray
5a90fb81cb Added checks directory to mypy 2025-08-09 18:37:17 +10:00
Andrew Murray
ee8fbc0ac9 Make in parallel when building brotli and libavif 2025-08-09 14:58:31 +10:00
renovate[bot]
b1cfa7769b
Update actions/download-artifact action to v5 (#9141) 2025-08-09 07:13:41 +10:00
Andrew Murray
b8ffea2c56 Revert "Revert to zlib on macOS < 10.15"
This reverts commit 6c7917d7a6.
2025-08-08 06:05:30 +10:00
Andrew Murray
d975e312e2 Updated zlib-ng to 2.2.5 2025-08-08 05:46:10 +10:00
Hugo van Kemenade
526415d807
Fix typos (#9135) 2025-08-06 18:31:44 +03:00
Andrew Murray
35c92308ad Allow RGBA palettes to work with expand() 2025-08-06 11:41:26 +10:00
Andrew Murray
4f8ac76407 Updated raqm to 0.10.3 2025-08-06 09:00:36 +10:00
Andrew Murray
b07dbc167c Fixed typo 2025-08-06 08:17:09 +10:00
Hugo van Kemenade
1e76b758f6
Use Python 3.14 for gcc problem matching (#9134) 2025-08-05 20:27:58 +03:00
Hugo van Kemenade
680e68632c
Updated harfbuzz to 11.3.3 (#9103) 2025-08-05 12:07:27 +03:00
Andrew Murray
d3fa549ec9 Use Python 3.14 for gcc problem matching 2025-08-05 18:03:47 +10:00
Andrew Murray
0465627f0c Fill alpha channel when quantizing RGB images 2025-08-05 13:00:33 +10:00
pre-commit-ci[bot]
cee238bcb8
[pre-commit.ci] pre-commit autoupdate (#9131) 2025-08-05 06:57:50 +10:00
Andrew Murray
2973f69a75
Updated libimagequant to 4.4.0 (#9074) 2025-08-04 21:36:17 +10:00
renovate[bot]
4677cf3b16
Update dependency mypy to v1.17.1 (#9130) 2025-08-03 13:58:41 +10:00
renovate[bot]
77247b6283
Update dependency cibuildwheel to v3.1.3 (#9129) 2025-08-03 12:48:47 +10:00
Andrew Murray
fcdeb6404e Merge branch 'main' into imagetext 2025-08-02 22:18:51 +10:00
Andrew Murray
94a32628f3 Merge branch 'main' into fromarray_mode 2025-08-02 22:15:13 +10:00
Russell Keith-Magee
148e1ac914
Add libavif support for iOS (#9117)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-08-02 22:10:55 +10:00
Hugo van Kemenade
2ab301dcc9
Drop support for Python 3.9 (#9119)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-08-02 12:02:20 +00:00
Hugo van Kemenade
eb59176b09
Move imports into TYPE_CHECKING (#9123) 2025-08-02 13:56:00 +03:00
Hugo van Kemenade
baaccda280
Remove support for NumPy 1.20 when type checking (#9125) 2025-08-02 12:59:06 +03:00
Andrew Murray
ae6bb29b82 Removed support for NumPy 1.20 when type checking 2025-08-02 18:35:16 +10:00
Andrew Murray
0620daf860 Renamed variable to not shadow import 2025-08-02 13:10:18 +10:00
Andrew Murray
27a7582b35 Moved imports into TYPE_CHECKING 2025-08-02 11:40:35 +10:00
Andrew Murray
726de49229
Merge branch 'main' into mode_enums 2025-08-01 10:25:32 +10:00
Andrew Murray
5fc0cf19c6
Merge branch 'main' into pyarrow_band_names 2025-08-01 10:25:14 +10:00
Andrew Murray
19829c3d95 Updated harfbuzz to 11.3.3 2025-08-01 10:23:45 +10:00
Russell Keith-Magee
98d6c3bf88
Restore pyroma test for iOS (#9116)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-08-01 10:22:28 +10:00
Hugo van Kemenade
162836a004
Use correct bands for two band histograms (#9054) 2025-07-31 14:40:57 +03:00
Hugo van Kemenade
9a37051bc6
Improve features test coverage (#9077) 2025-07-31 14:37:29 +03:00
Hugo van Kemenade
54de16836b
Remove WebP feature handling (#9096) 2025-07-31 13:30:42 +03:00
Hugo van Kemenade
ba5f81fb6b
Add support for Python 3.14 (#9120)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-07-30 22:23:39 +10:00
renovate[bot]
bae97e1a2b
Update dependency cibuildwheel to v3.1.2 (#9118) 2025-07-30 21:50:45 +10:00
Andrew Murray
e8b3c17ebc Updated documentation 2025-07-29 07:28:03 +10:00
Hugo van Kemenade
8ec31431cb
Drop support for PyPy3.10 (#9112) 2025-07-28 22:34:58 +03:00
Andrew Murray
98d38a3bff
Updated libpng to 1.6.50 (#9058) 2025-07-28 18:52:06 +10:00
Andrew Murray
283dcfc024 Removed unused code 2025-07-26 23:39:11 +10:00
Andrew Murray
a6acc67660 Always check XMLPacket value 2025-07-26 21:00:26 +10:00
Andrew Murray
53b6d57b73 Drop support for PyPy3.10 2025-07-26 19:39:54 +10:00
renovate[bot]
7dbcb32cbe
Update cygwin/cygwin-install-action action to v6 (#9108)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-07-26 19:32:57 +10:00
Andrew Murray
7afbafd1e2 Support saving variable length rational TIFF tags 2025-07-26 19:21:50 +10:00
Luke Granger-Brown
ec6d5efe4d
Deprecate ImageCmsProfile product_name and product_info (#8995)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-07-26 17:33:11 +10:00
Andrew Murray
63163d065d Removed WebP feature handling 2025-07-24 19:34:46 +10:00
Andrew Murray
969e468749 Allow ImageDraw text() to use ImageText 2025-07-24 19:34:30 +10:00
Andrew Murray
24681a3927 Added ImageText 2025-07-24 19:34:29 +10:00
Andrew Murray
103a5a0b59 Fixed ZeroDivisionError 2025-07-24 19:33:15 +10:00
Hugo van Kemenade
640f55a655
Update for pyroma 5.0 (#9093) 2025-07-24 12:25:04 +03:00
Andrew Murray
f4d86e4f44 Use teardown_method 2025-07-24 07:27:39 +10:00
wiredfool
9e415c7876 A way to make nested arrays in nano arrow but detouring through a buffer 2025-07-21 17:24:52 +02:00
wiredfool
c07fe6e943 Added flat image metadata tests
This metadata is available in nanoarrow, but not pyarrow or arro3
2025-07-21 11:33:14 +02:00
wiredfool
7d2abbdcf9 lint. 2025-07-21 11:22:45 +02:00
wiredfool
28c7645d8b Added tests for integration with nanoarrow 2025-07-21 11:19:45 +02:00
wiredfool
1a02d4ed5a lint fixes 2025-07-20 13:01:39 +02:00
wiredfool
1159e65b4f Added integration tests for Arro3, comparable to PyArrow tests 2025-07-20 12:58:54 +02:00
wiredfool
adfb66f1d6 Fix Compliation errors from rebase 2025-07-20 10:18:59 +02:00
wiredfool
64556405e2 WIP - Not working in pyarrow 2025-07-19 17:34:39 +02:00
eyedav
84aa4372fd linter changes 2025-07-19 17:06:44 +02:00
eyedav
d82576ff38 require types-setuptools>=75.2.0
this is necessary to have https://github.com/python/typeshed/pull/12791
2025-07-19 17:03:31 +02:00
Yay295
2f169fa121 use mode enums in _imagingcms.c 2025-07-19 17:02:05 +02:00
Yay295
0567f064e4 add debug check that all modes and rawmodes are defined 2025-07-19 17:02:05 +02:00
eyedav
28adda9299 build Mode.c as a common library 2025-07-19 17:02:00 +02:00
Yay295
e483a976d2 use a different temp build dir for each module 2025-07-19 17:00:37 +02:00
eyedav
47503477d4 add Mode.c as a dependency for _imagingft.c and _webp.c 2025-07-19 17:00:35 +02:00
Yay295
f8bfa2fe4e use more mode enums in decode.c 2025-07-19 16:58:11 +02:00
Yay295
a53f83f023 use mode enums in _imagingft.c 2025-07-19 16:58:11 +02:00
eyedav
aa39e84f7a use mode enums in Jpeg2KDecode.c 2025-07-19 16:58:08 +02:00
wiredfool
85212dbbb6 Add image band metadata for the 4 channel images 2025-07-19 16:55:52 +02:00
Yay295
4d721bc591 use mode enums in _webp.c 2025-07-19 16:54:36 +02:00
eyedav
9527ce7f8c change mode structs to enums
Structs have better type safety, but they make allocation more difficult, especially when we have multiple Python modules trying to share the same code.
2025-07-19 16:54:32 +02:00
Yay295
4b07ed52fd use Mode struct for windows display code 2025-07-19 16:00:28 +02:00
Yay295
16fc61ee65 use RawMode struct for jpegmode 2025-07-19 16:00:28 +02:00
Yay295
422eb1ebc4 replace some string function usage with imaging mode checks 2025-07-19 16:00:28 +02:00
Yay295
579c55ea86 check for null input in findMode() and findRawMode() 2025-07-19 16:00:28 +02:00
Yay295
20a5aeac84 fix findRawMode()
and change findMode() to match
2025-07-19 16:00:28 +02:00
Yay295
cacb8b3ce7 define rawmodes 2025-07-19 16:00:28 +02:00
eyedav
c9c50ac678 initialize accessors similar to converters/packers/unpackers 2025-07-19 16:00:26 +02:00
Yay295
feb7e6ef2d use mode structs in map.c 2025-07-19 15:55:48 +02:00
eyedav
d11819ca6b use mode structs in Unpack.c 2025-07-19 15:55:44 +02:00
Yay295
31118b0019 set pointer to NULL after free 2025-07-19 15:54:15 +02:00
Yay295
39d434b39d use (void) for empty function parameters 2025-07-19 15:54:15 +02:00
Yay295
141c95df9a use mode structs in TiffDecode.c 2025-07-19 15:54:15 +02:00
eyedav
e75a0a9c39 use mode structs in Storage.c 2025-07-19 15:54:11 +02:00
eyedav
858b0b3805 use mode structs in Resample.c 2025-07-19 15:47:47 +02:00
Yay295
c80fba3045 use mode structs in Reduce.c 2025-07-19 15:47:10 +02:00
Yay295
fb73d9003e use mode structs in Quant.c 2025-07-19 15:47:10 +02:00
Yay295
7e48697f82 use mode structs in Point.c 2025-07-19 15:47:10 +02:00
Yay295
2a9d712ceb use mode structs in Paste.c 2025-07-19 15:47:10 +02:00
Yay295
af3c24e12b use mode structs in Palette.c 2025-07-19 15:47:10 +02:00
eyedav
e5bc5b4ffa use mode structs in Pack.c 2025-07-19 15:47:07 +02:00
eyedav
4906285619 add function isModeI16() to check if a mode is an I;16 mode 2025-07-19 15:41:13 +02:00
Yay295
378c3bd23d use mode structs in Matrix.c 2025-07-19 15:39:18 +02:00
Yay295
0abfdd25b1 use mode structs in JpegEncode.c 2025-07-19 15:39:18 +02:00
Yay295
30d4cd0229 use mode structs in JpegDecode.c 2025-07-19 15:39:18 +02:00
Yay295
98a2c63326 use mode structs in Jpeg2KEncode.c 2025-07-19 15:39:18 +02:00
Yay295
33272580d0 use mode structs in Jpeg2KDecode.c 2025-07-19 15:39:18 +02:00
Yay295
27497700ee use mode structs in Histo.c 2025-07-19 15:39:18 +02:00
Yay295
2668338583 use mode structs in GetBBox.c 2025-07-19 15:39:18 +02:00
Yay295
cfe9155a0b use mode structs in Geometry.c 2025-07-19 15:39:18 +02:00
eyedav
af22363327 use mode structs in Filter.c 2025-07-19 15:39:16 +02:00
Yay295
6202eefcff use mode structs in Fill.c 2025-07-19 15:37:08 +02:00
Yay295
19c0d1da76 use mode structs in File.c 2025-07-19 15:37:08 +02:00
Yay295
b5c4b821bc use mode structs in Effects.c 2025-07-19 15:37:08 +02:00
eyedav
bcfe5f2172 use mode structs in Draw.c 2025-07-19 15:37:03 +02:00
eyedav
9bf3495898 use mode structs in Convert.c 2025-07-19 15:12:51 +02:00
Yay295
ecf1fce82b use mode structs in Chops.c 2025-07-19 14:53:31 +02:00
Yay295
6f6e1f99fc use mode structs in BoxBlur.c 2025-07-19 14:53:31 +02:00
Yay295
38c75b9449 use mode structs in Blend.c 2025-07-19 14:53:31 +02:00
Yay295
d0541a73b9 use mode structs in Bands.c 2025-07-19 14:53:31 +02:00
Yay295
82182ba548 use mode structs in AlphaComposite.c 2025-07-19 14:53:31 +02:00
eyedav
0df2ed0640 use mode structs in Access.c 2025-07-19 14:53:22 +02:00
eyedav
a12dc30dc0 use mode structs in encode.c and decode.c 2025-07-19 14:46:29 +02:00
Yay295
a37f53c949 use mode structs in tkImaging.c 2025-07-19 14:44:51 +02:00
eyedav
12409e4574 use mode structs in _imaging.c 2025-07-19 14:44:41 +02:00
Yay295
63a45ad8d0 add special modes 2025-07-19 14:29:08 +02:00
Yay295
cd93629a5c use a struct for mode names instead of just a string 2025-07-19 14:29:08 +02:00
Andrew Murray
a39d14648b Updated manifest 2025-07-16 13:54:43 +10:00
Andrew Murray
a426eb55af Remove file after test completion 2025-07-16 13:54:33 +10:00
Andrew Murray
91bbeb5dcb Revert iOS change until the test runs again 2025-07-16 13:54:13 +10:00
wiredfool
d56032047d
Add parallel compile from pybind11 (#8990) 2025-07-15 18:26:13 +02:00
Hugo van Kemenade
5e26d2fa2c
Improve WmfImagePlugin test coverage (#9090) 2025-07-15 09:16:08 +03:00
renovate[bot]
638eb1b999
Update dependency mypy to v1.17.0 (#9092) 2025-07-15 13:23:40 +10:00
Hugo van Kemenade
71d495add8
Improve DdsImagePlugin test coverage (#9091) 2025-07-14 23:40:29 +03:00
Andrew Murray
7516805121 Improved DDS test coverage 2025-07-14 19:29:27 +10:00
Andrew Murray
79914ec8a5 Check for scaling in macOS windows 2025-07-13 15:11:23 +08:00
Andrew Murray
7eaac3fcf0 Updated documentation 2025-07-13 15:11:23 +08:00
Yan-Ke Guo
1f7e9c3b51 Apply suggestions from code review
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-07-13 15:11:23 +08:00
GUO YANKE
5ce88dbe53 feat(ImageGrab): enhance grab function to support window-based screenshot capturing on macOS 2025-07-13 15:11:23 +08:00
Andrew Murray
d85fa7a247 Improved WmfImagePlugin test coverage 2025-07-13 16:13:44 +10:00
Andrew Murray
4adff39bfd Improved test coverage 2025-07-12 19:55:58 +10:00
Andrew Murray
6fdbf54331 Width and height are unsigned 2025-07-12 19:50:19 +10:00
Andrew Murray
cfa51ad4ad Populate single band 2025-07-12 15:09:07 +10:00
Andrew Murray
68ac3375c6 Codec is always "iptc" 2025-07-12 12:47:54 +10:00
Andrew Murray
bc2519abf1 Removed helper method _i8, unused since dump() was removed 2025-07-12 12:34:33 +10:00
Hugo van Kemenade
d80cf0ee1b
Improve ImageMath test coverage (#9087) 2025-07-11 20:35:36 +03:00
Andrew Murray
a8bb7579dc Improved ImageMath test coverage 2025-07-11 21:06:30 +10:00
Hugo van Kemenade
7b1ba29b5b
Remove unused _save_cjpeg (#9084) 2025-07-11 10:58:56 +03:00
Hugo van Kemenade
3c4fe62c1e
Update libwebp to 1.6.0 (#9082) 2025-07-11 10:46:17 +03:00
Andrew Murray
7328cf2e5e Reduced number of bytes read 2025-07-11 17:19:56 +10:00
Andrew Murray
561ae3760c Set correct size for rotated images after opening 2025-07-11 17:18:47 +10:00
Andrew Murray
74e36e0ee5 Added RGBX and CMYK as alternatives for RGBA array data 2025-07-11 16:48:46 +10:00
Andrew Murray
985544d557 Do not disable libwebpexamples 2025-07-11 13:28:08 +10:00
Andrew Murray
722c130b31
Restored URL
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-07-11 13:12:38 +10:00
Andrew Murray
d88986a184
Link transitive dependencies
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-07-11 12:53:43 +10:00
Andrew Murray
50dde1c125 Remove unused _save_cjpeg 2025-07-10 23:19:16 +10:00
Andrew Murray
8b695cc0d3 When deleting EXIF IFD tag, clear IFD data 2025-07-10 22:50:05 +10:00
Andrew Murray
6c12d188db Updated libwebp to 1.6.0 2025-07-10 22:33:31 +10:00
Hugo van Kemenade
d74fdc4b5d
Ensure dynamic libjpeg libraries are not linked (#9081) 2025-07-10 11:06:32 +03:00
Russell Keith-Magee
2af930b2f7
Ensure dynamic libjpeg libraries are not linked. 2025-07-10 12:07:38 +08:00
Andrew Murray
31e6c716ac Improved features test coverage 2025-07-09 22:26:25 +10:00
Hugo van Kemenade
329d6a6a62
Remove reference to libtiff 3.x (#9072) 2025-07-08 20:01:35 +03:00
Hugo van Kemenade
3e5df07b34
Fix unclosed file warning (#9065) 2025-07-08 19:57:09 +03:00
Hugo van Kemenade
d58f4d5f1f
Added "Colors" to concepts (#9067) 2025-07-08 19:56:53 +03:00
Andrew Murray
cbd47d8609 Removed handling of deprecated WebP features 2025-07-08 23:07:07 +10:00
Andrew Murray
c9cf688ee7 Removed ImageDraw.getdraw hints deprecation section 2025-07-08 21:10:26 +10:00
renovate[bot]
2195faf0dc
Update dependency cibuildwheel to v3.0.1 (#9075) 2025-07-08 13:44:13 +10:00
Andrew Murray
06f5cd1dde
Restored manylinux2014 wheels (#9059) 2025-07-08 11:31:03 +10:00
Andrew Murray
99737228c5 Only deprecate fromarray mode for changing data types 2025-07-08 06:53:22 +10:00
Andrew Murray
7ec13fedc7
Merge branch 'main' into alpha_composite 2025-07-08 06:50:44 +10:00
Hugo van Kemenade
27d47b3abf
[pre-commit.ci] pre-commit autoupdate (#9073) 2025-07-07 23:43:15 +03:00
Andrew Murray
dc7d646db0 Use correct bands for 2 band histograms 2025-07-08 06:39:56 +10:00
Andrew Murray
e88f312029 Fix unclosed file warning 2025-07-08 06:38:16 +10:00
Andrew Murray
4cfef00574 Added "Colors" to concepts 2025-07-08 06:37:03 +10:00
pre-commit-ci[bot]
14b0cebfc1
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.0 → v0.12.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.0...v0.12.2)
- [github.com/PyCQA/bandit: 1.8.5 → 1.8.6](https://github.com/PyCQA/bandit/compare/1.8.5...1.8.6)
- [github.com/pre-commit/mirrors-clang-format: v20.1.6 → v20.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.6...v20.1.7)
- [github.com/python-jsonschema/check-jsonschema: 0.33.1 → 0.33.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.33.1...0.33.2)
- [github.com/woodruffw/zizmor-pre-commit: v1.9.0 → v1.11.0](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.9.0...v1.11.0)
2025-07-07 17:16:48 +00:00
Hugo van Kemenade
44a553a0a2
Pyroma now supports PEP 639 (#9064) 2025-07-07 19:12:30 +03:00
Hugo van Kemenade
ef129003d9
Update macOS tested Pillow versions (#9068) 2025-07-07 16:23:04 +03:00
Andrew Murray
756dd04705 Removed reference to libtiff 3.x 2025-07-07 19:09:39 +10:00
Andrew Murray
a84458ffbd Revert "Work around pyroma test"
This reverts commit d8a0cb5db1.
2025-07-07 18:57:58 +10:00
Hugo van Kemenade
dcd202568a
Remove deprecations for Pillow 12.0.0 (#9053) 2025-07-07 11:49:02 +03:00
Andrew Murray
dc9e0cf326
Thanks, folks! (#9056) 2025-07-07 09:48:39 +10:00
Andrew Murray
1ee91f22ba Updated macOS tested Pillow versions 2025-07-05 22:51:02 +10:00
Andrew Murray
3152da4735 Allow alpha_composite to use LA images 2025-07-05 13:51:18 +10:00
Andrew Murray
5554e778bb Removed unnecessary checks 2025-07-05 13:44:02 +10:00
Jeffrey A. Clark
77f3a091b8
Setup nit: "fork" should be lowercased (#9055) 2025-07-01 10:54:12 -04:00
Andrew Murray
f2417d8b39 Added release notes 2025-07-02 00:00:21 +10:00
Andrew Murray
0e3aac1ed1 Updated deprecation timeline 2025-07-02 00:00:21 +10:00
Andrew Murray
92bafe6b88 Removed support for FreeType <= 2.9.0 2025-07-02 00:00:21 +10:00
Andrew Murray
aaf217cea0 Removed ICNS (width, height, scale) sizes 2025-07-02 00:00:21 +10:00
Andrew Murray
9fbc255ce5 Removed non-image modes in ImageCms 2025-07-02 00:00:21 +10:00
Andrew Murray
b4bc43fed2 Removed ImageCms constants and versions() 2025-07-02 00:00:21 +10:00
Andrew Murray
4301c1fde6 Removed ImageMath eval and options parameters 2025-07-02 00:00:21 +10:00
Andrew Murray
0a29d6392a Removed IptcImageFile helper functions 2025-07-02 00:00:21 +10:00
Andrew Murray
9c9449af34 Removed support for LibTIFF < 4 2025-07-02 00:00:16 +10:00
Andrew Murray
a7e00fba8b Removed ImageDraw.getdraw hints parameter 2025-07-01 23:57:50 +10:00
Andrew Murray
88018c1c2d Removed id and unsafe_ptrs 2025-07-01 23:57:50 +10:00
Andrew Murray
cce39084f5 Removed specific WebP feature checks 2025-07-01 23:57:50 +10:00
Andrew Murray
b72b8dd84d Removed JpegImageFile.huffman_ac and JpegImageFile.huffman_dc 2025-07-01 23:57:50 +10:00
Andrew Murray
1800e580d2 Removed ImageFile raise_oserror() 2025-07-01 23:57:50 +10:00
Andrew Murray
5d4a05465d Removed Image isImageType() 2025-07-01 23:57:50 +10:00
Andrew Murray
583f0a50d5 Removed BGR;15, BGR;16 and BGR;24 modes 2025-07-01 23:57:46 +10:00
Jeffrey A. Clark
d4ef93150f Thanks, folks!
As a general rule I think we should acknowledge when significant
contribtions come from outside the core team. We know the core team
does a lot of work (thank you!) but it's not always obvious when
significant contributions come from outside the core team.

In the old change log, we had ACKs via `[radarhere]` syntax which I
miss. I don't expect we'll start using the old change log again but
maybe we can make a note in the release notes to include such ACKs as
needed and appropriate.
2025-07-01 09:25:32 -04:00
Jeffrey A. Clark
0cd2d3b24b Setup nit: "fork" should be lowercased 2025-07-01 09:10:20 -04:00
Andrew Murray
37cd041e5e 12.0.0.dev0 version bump 2025-07-01 19:25:23 +10:00
Andrew Murray
89f1f4626a 11.3.0 version bump 2025-07-01 17:41:24 +10:00
Andrew Murray
f2de251c76
Updated check script paths (#9052) 2025-07-01 15:17:56 +10:00
Hugo van Kemenade
84855d11c8
Raise FileNotFoundError when opening an empty path (#9048) 2025-06-30 17:48:44 +03:00
Andrew Murray
204d11d4da Raise FileNotFoundError when opening an empty path 2025-06-30 22:29:41 +10:00
Hugo van Kemenade
2b39f7581e
Handle IPTC TIFF tags with incorrect type (#8925) 2025-06-30 15:25:19 +03:00
Hugo van Kemenade
e7a53ba19b
Do not update palette for L mode GIF frame (#8924) 2025-06-30 15:24:18 +03:00
Andrew Murray
49efe40f28 Escape period 2025-06-30 22:19:14 +10:00
Hugo van Kemenade
c22230b761
Use save parameters as encoderinfo defaults (#9001) 2025-06-30 15:13:12 +03:00
Russell Keith-Magee
da10ed1cf3
Add support for iOS (#9030)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-06-30 21:46:07 +10:00
Kylian Ronfleux--Corail
be2b4e7864
Fix qtables and quality scaling (#8879)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-06-30 20:46:40 +10:00
Andrew Murray
d4162f8505 Updated return type 2025-06-30 18:27:49 +10:00
Hugo van Kemenade
a2fbd58f4b
Read 16-bit McIdas images into I;16B mode to allow for memory mapping (#9046) 2025-06-29 15:38:26 +03:00
Hugo van Kemenade
144890255f
Support ttb multiline text (#8730) 2025-06-28 14:35:13 +03:00
Hugo van Kemenade
c084bd7d95
Use unpacking (#9044) 2025-06-28 14:33:10 +03:00
Hugo van Kemenade
d263e3ba13
Fix saving MPO with more than one appended image (#8979) 2025-06-28 14:32:33 +03:00
Andrew Murray
4ac2403532 Read 16-bit images into I;16B mode to allow for memory mapping 2025-06-28 15:48:44 +10:00
Andrew Murray
26ae44e059 Merge branch 'main' into ttb 2025-06-28 13:49:43 +10:00
Andrew Murray
ed82f4d235 Use unpacking 2025-06-28 10:57:23 +10:00
Andrew Murray
5732a86cc6
Use snake case
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-28 10:52:25 +10:00
Andrew Murray
a370209fea
Add match parameter to pytest.warns() (#9038) 2025-06-28 10:29:34 +10:00
Andrew Murray
69c0c422c8
Increase pytest verbosity (#9040)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-28 10:29:01 +10:00
Andrew Murray
a0a1ff14c4 Merge branch 'main' into encoderinfo_frames 2025-06-28 01:35:59 +10:00
Andrew Murray
646b4a4ecd
Merge branch 'main' into mpo 2025-06-28 01:20:15 +10:00
Andrew Murray
41129ce1cb
Use list
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-28 01:20:02 +10:00
Hugo van Kemenade
3a66b1d291
Restore original encoderinfo after saving (#8942) 2025-06-27 18:04:43 +03:00
Hugo van Kemenade
935e9e4fbd
Return PixelAccess from first load of ICO and IPTC images (#8922) 2025-06-27 18:02:48 +03:00
Hugo van Kemenade
c96b27711c
Improve justifying text (#8905) 2025-06-27 18:01:25 +03:00
Hugo van Kemenade
ba37249ab7
Set color table fourth channel to zero for 1 and L mode when saving BMP (#8889) 2025-06-27 18:00:06 +03:00
Hugo van Kemenade
3a18e555f0
Assert palette is not None (#8877) 2025-06-27 17:53:55 +03:00
Hugo van Kemenade
3d21c16977
Improve reading XPM images (#8874) 2025-06-27 17:53:34 +03:00
Andrew Murray
d07aa6fd17
Added release notes for #9041 (#9042)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-28 00:30:22 +10:00
Andrew Murray
ef98b3510e
Fix buffer overflow when saving compressed DDS images (#9041)
Co-authored-by: Eric Soroos <eric-github@soroos.net>
2025-06-28 00:29:58 +10:00
Hugo van Kemenade
958c449b98
Close image after assert
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-06-27 16:17:20 +03:00
Andrew Murray
e783aff688
Improve SgiImagePlugin test coverage (#8896) 2025-06-27 15:32:30 +03:00
Hugo van Kemenade
6aff8fcc18
Fix PT031 (#135) 2025-06-27 14:30:41 +03:00
Andrew Murray
a61a23d7ae Fixed PT031 2025-06-27 13:00:48 +10:00
Andrew Murray
092e37a56c
Merge branch 'main' into bump-pre-commit 2025-06-27 11:04:44 +10:00
Hugo van Kemenade
1788ab7887
Do not import type checking (#8854) 2025-06-26 18:52:09 +03:00
Hugo van Kemenade
cb061f7269
Update ruff pre-commit ID (#8994) 2025-06-26 18:50:17 +03:00
Hugo van Kemenade
a27731b2af
Improve type hints (#8883) 2025-06-26 18:49:39 +03:00
Hugo van Kemenade
d1894dcd46 Add match parameter to pytest.warns() 2025-06-26 18:12:36 +03:00
Hugo van Kemenade
234875bf90 Update Ruff hook from legacy 2025-06-26 17:56:26 +03:00
Hugo van Kemenade
b9afe18646 Bump pre-commit hooks 2025-06-26 17:56:26 +03:00
Frankie Dintino
3d261a2101
Add AVIF to wheels using only aomenc and dav1d AVIF codecs for reduced size (#8858)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-26 16:21:44 +10:00
Andrew Murray
23ed906b62 Removed default limit of 4 2025-06-25 22:00:36 +10:00
Andrew Murray
ecd264fffc Use "parallel" config setting and 4 as defaults 2025-06-25 21:43:03 +10:00
Hugo van Kemenade
46d969168e
Use PEP 489 multi-phase initialization (#8983) 2025-06-25 11:32:37 +01:00
Andrew Murray
a549c5528a
Merge branch 'main' into pybind11 2025-06-25 20:31:48 +10:00
Hugo van Kemenade
1e5eb3b29d
Support saving I;16L TIFF images (#9015) 2025-06-25 11:11:47 +01:00
Hugo van Kemenade
8655b7c559
Only check DHT marker for libjpeg-turbo (#9025) 2025-06-25 11:09:55 +01:00
Hugo van Kemenade
8cf8b0dde0
Do not call sys.executable in ImageShow in PyInstaller application (#9028) 2025-06-25 10:46:46 +01:00
Hugo van Kemenade
c704f43288
Deprecate fromarray mode argument (#9018) 2025-06-25 10:44:39 +01:00
Hugo van Kemenade
0450f99596
Search for libtiff library file first on Windows and macOS (#9034) 2025-06-25 10:42:00 +01:00
Andrew Murray
e1ee8afc7d Search for libtiff library file first on Windows and macOS 2025-06-25 10:42:09 +10:00
Andrew Murray
acd8b0c2ac
Fix libtiff cleanup (#9002) 2025-06-25 09:09:31 +10:00
Hugo van Kemenade
129267bc82
Use percent formatting for _dbg calls (#9035) 2025-06-24 18:37:07 +01:00
Andrew Murray
18f8af78d3 Pass strings or tuples of strings to _dbg 2025-06-24 20:35:09 +10:00
Andrew Murray
1557585411 Use percent formatting 2025-06-24 20:29:38 +10:00
Andrew Murray
2954964cd2
Removed ImageCmsProfile._set method (#9032)
Co-authored-by: Luke Granger-Brown <git@lukegb.com>
2025-06-23 07:05:43 +10:00
Andrew Murray
ae02518314
Use same AVIF URL when fetching dependency (#8871) 2025-06-22 22:08:51 +10:00
Hugo van Kemenade
f8d53fb8e6
Added Python 3.14 macOS x86-64 wheels (#9031) 2025-06-22 09:36:57 +01:00
Andrew Murray
78bc045db9
Merge branch 'main' into fromarray_mode 2025-06-21 21:03:37 +10:00
Hugo van Kemenade
13faa4681c
Deprecate saving I mode images as PNG (#9023) 2025-06-21 11:24:28 +01:00
Andrew Murray
216dc4ca60 Added Python 3.14 macOS x86-64 wheels 2025-06-21 19:12:23 +10:00
Andrew Murray
f937dd27cd Do not call sys.executable in PyInstaller application 2025-06-20 23:44:30 +10:00
Andrew Murray
2316c930f9 Removed default argument 2025-06-19 22:46:09 +10:00
thisismypassport
ef0bab0c65
Support writing QOI images (#9007)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-06-19 18:16:26 +10:00
renovate[bot]
92de1db067
Update dependency mypy to v1.16.1 (#9026) 2025-06-19 11:12:40 +10:00
Andrew Murray
79e0b0b6ad Allow for custom stacklevel in deprecations 2025-06-18 22:19:20 +10:00
Andrew Murray
a4e8d675b4 Only check DHT marker for libjpeg-turbo 2025-06-18 21:59:31 +10:00
Andrew Murray
d23d56e195 Deprecate saving I mode images as PNG 2025-06-17 23:10:15 +10:00
Hugo van Kemenade
4d0ebb040a
Add release notes for #8912 and #8969 (#9019) 2025-06-16 13:25:43 +03:00
Andrew Murray
7b5e11deb7 Updated heading 2025-06-16 20:06:53 +10:00
Andrew Murray
c19afb9430
Use names
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-16 20:05:34 +10:00
Hugo van Kemenade
ef683e9d78
Simplify C error handling (#9021) 2025-06-16 13:01:46 +03:00
Hugo van Kemenade
01267f9dac
Improve BLP tests (#9020) 2025-06-16 13:00:30 +03:00
Hugo van Kemenade
850271a912
Fix warning (#9016) 2025-06-16 12:57:45 +03:00
Andrew Murray
8309962926 Replaced ImagingError_OSError with PyErr_SetString 2025-06-16 08:19:27 +10:00
Andrew Murray
cb433ad00a Replaced ImagingError_Clear with PyErr_Clear 2025-06-16 08:15:08 +10:00
Andrew Murray
ce8083e0d8 Match error message 2025-06-14 18:40:03 +10:00
Andrew Murray
59667bbec5 Use *_tofile helpers 2025-06-14 18:39:30 +10:00
Hugo van Kemenade
222b86222e
Update libpng to 1.6.49 (#9014) 2025-06-14 10:24:58 +03:00
Andrew Murray
3ac1edf6da Added release notes for #8912 2025-06-14 17:13:02 +10:00
Andrew Murray
27ce12bb7a Added release notes for #8969 2025-06-14 16:44:42 +10:00
Andrew Murray
e6af31e709 Deprecate fromarray mode argument 2025-06-14 16:09:11 +10:00
Andrew Murray
5aa09cd107 Updated libpng to 1.6.49 2025-06-14 12:23:01 +10:00
Andrew Murray
925fe51904 Support saving I;16L images 2025-06-14 12:22:48 +10:00
Andrew Murray
4ba97d1327 Removed entries for non-existent modes 2025-06-14 12:22:48 +10:00
Andrew Murray
a219e96fd3 Fixed warning 2025-06-14 12:22:29 +10:00
Hugo van Kemenade
a3d91cb0ce
CI: Require Python >= 3.13.5 on Windows (#9017) 2025-06-14 12:21:31 +10:00
Andrew Murray
2e5117305b
Add Python 3.14 beta wheels (#9012) 2025-06-13 18:59:32 +10:00
Hugo van Kemenade
3841db0252 Fix: Invalid skip selector: 'pp39-*' 2025-06-13 00:08:52 +03:00
Hugo van Kemenade
aca0e57126 Add 3.14 to CI targets 2025-06-12 23:47:28 +03:00
Hugo van Kemenade
4a1eea8466 Add Python 3.14 beta wheels 2025-06-12 23:47:28 +03:00
Hugo van Kemenade
a76dca9c45
Test Python 3.14t on macOS and Linux (#9011) 2025-06-12 19:26:11 +03:00
Hugo van Kemenade
5996dbdc3a
Update dependency cibuildwheel to v3 (#9010) 2025-06-12 19:13:45 +03:00
Andrew Murray
9bffc015e6 Use pypy.exe if it exists 2025-06-12 23:52:51 +10:00
Andrew Murray
b9aac77003 Test Python 3.14t 2025-06-12 22:48:27 +10:00
Andrew Murray
d2295c0843 Do not activate virtualenv 2025-06-12 18:53:35 +10:00
renovate[bot]
b65a7acf25
Update dependency cibuildwheel to v3 2025-06-11 13:20:34 +00:00
Andrew Murray
8ccdc399df
Remove padding between interleaved PCX palette data (#9005) 2025-06-11 16:19:09 +03:00
Andrew Murray
7f7c27f66a
Start QOI decoding with a zero-initialized array of previously seen pixels (#9008) 2025-06-11 22:56:57 +10:00
Andrew Murray
3eb893f0c1
Updated libjpeg-turbo to 3.1.1 (#9009) 2025-06-11 13:56:28 +03:00
Andrew Murray
056dc89a3c
Correct drawing I;16 horizontal lines (#8985) 2025-06-10 15:12:40 +03:00
Hugo van Kemenade
ff624fe1e6
Reduce number of bytes read for PCX header (#9004) 2025-06-10 15:01:02 +03:00
Andrew Murray
d7a45cc250
ImageFont does not handle multiline text (#9000) 2025-06-10 14:57:37 +03:00
Hugo van Kemenade
de053fbae0
Handle XMP data from an UNDEFINED TIFF tag (#8997) 2025-06-10 14:57:15 +03:00
Andrew Murray
36cea19532
Do not decode bytes in PPM error message (#8958) 2025-06-10 14:08:29 +03:00
Andrew Murray
646885e546
Parse XMP tag bytes without decoding to string (#8960)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-06-10 14:06:28 +03:00
Andrew Murray
e65e5bea45 Start decoding with a zero-initialized array of previously seen pixels 2025-06-10 20:30:18 +10:00
Andrew Murray
b844007cdc
Clear TIFF core image if memory mapping was used for last load (#8962) 2025-06-10 17:03:31 +10:00
Andrew Murray
6bd55684e0
Only accept missing tkinter when building wheels on Windows (#8981) 2025-06-10 09:00:08 +03:00
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
Hugo van Kemenade
8e5a15bab7
Call startswith once with a tuple (#8998) 2025-06-08 19:19:53 +02:00
Andrew Murray
0bb99e5561 Use save parameters as encoderinfo defaults 2025-06-07 15:08:16 +10:00
Andrew Murray
04c984f2f2 Removed duplicate code 2025-06-07 11:29:11 +10:00
Andrew Murray
89c38258dc Assert getcolors() does not return None 2025-06-07 11:13:30 +10:00
Andrew Murray
a3da70e76e Assert load() does not return None 2025-06-07 11:13:30 +10:00
Andrew Murray
cba096b4a9 Assert pixel data is tuple 2025-06-07 11:13:12 +10:00
Andrew Murray
33460d2f82 Assert _getmp() does not return None 2025-06-07 11:09:38 +10:00
Andrew Murray
0d1edba311 Assert tile args is tuple 2025-06-07 11:09:38 +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
9d5ea827e4 Call startswith once with a tuple 2025-06-05 18:16:05 +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
Hugo van Kemenade
1bf32ae892
Fix test (#8996) 2025-06-04 09:06:09 +02:00
Andrew Murray
eb0256acc0 Fixed test 2025-06-03 22:44:26 +10:00
Andrew Murray
fa7413904b Updated ruff ID 2025-06-03 14:13:22 +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
Eric Soroos
b931402046 add pybind11 elsewhere so mypy can find it 2025-05-31 15:14:17 +02:00
wiredfool
2059e06005 Add parallel compile from pybind11 2025-05-31 14:46:07 +02:00
Hugo van Kemenade
d730e60078
Update Ubuntu CI targets (#8988) 2025-05-31 10:52:59 +02:00
Hugo van Kemenade
598066d9e1
Stop testing deprecated Windows Server 2019 runner image (#8989) 2025-05-31 07:12:50 +02:00
Andrew Murray
9327e425ba Stop testing deprecated Windows Server 2019 2025-05-31 12:02:16 +10:00
Andrew Murray
bc4138f169 ubuntu-latest now uses Ubuntu 24.04 2025-05-31 11:48:49 +10:00
仓鼠
3944db288a
Update MinGW package names (#8987) 2025-05-31 11:10:45 +10:00
wiredfool
256f6ea1c1
Valgrind Memory Leak Checking (#8954) 2025-05-30 14:28:40 +01:00
wiredfool
f34b4a1806
Add parallel test target, using pytest-xdist (#8972) 2025-05-30 13:28:09 +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
wiredfool
399b6c1045
Update Makefile
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-05-30 10:40:07 +01:00
wiredfool
98cf15e9e4
Update depends/docker-test-valgrind-memory.sh
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-05-30 10:35:13 +01:00
wiredfool
6a60b2e6dd Remove Tests/ path arg, this is already configured 2025-05-30 10:27:11 +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
5a04b9581b
Run slow tests on valgrind, but without timeout (#8975) 2025-05-28 08:20:35 +10:00
Hugo van Kemenade
06e618c470
Removed CMAKE_POLICY_VERSION_MINIMUM=3.5 for libavif (#8973) 2025-05-27 17:18:20 +03:00
Hugo van Kemenade
90f115cd33
Reduced number of bytes read in WMF header (#8964) 2025-05-27 17:17:15 +03:00
Andrew Murray
bcc6e42bf8 Fixed saving MPO with more than one appended image 2025-05-27 21:08:58 +10:00
Andrew Murray
0eef5e20ef
Merge pull request #29 from wiredfool/tiff_mmap
Mark the image read-only in the C layer if it's created from a read only buffer
2025-05-27 09:12:43 +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
Hugo van Kemenade
086e05f42f
Do not build against libavif < 1 (#8969) 2025-05-25 23:29:21 +03:00
Hugo van Kemenade
bce93319a9
Updated libpng to 1.6.48 (#8940) 2025-05-25 14:14:56 +03: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
6096f335c1
Merge branch 'main' into valgrind-leakcheck 2025-05-24 15:41:48 +10:00
Andrew Murray
bcf1f85b30
Merge branch 'main' into parallel-test 2025-05-24 12:03:59 +10:00
Andrew Murray
57b77bde96 Removed CMAKE_POLICY_VERSION_MINIMUM=3.5 2025-05-24 11:55:18 +10:00
Andrew Murray
9f0614de7e
Merge branch 'main' into patch-1 2025-05-24 10:34:10 +10:00
Andrew Murray
a4f477565a
Merge branch 'main' into fix_arrow_8907 2025-05-24 10:34:05 +10:00
Andrew Murray
5c2cabfa6c
Merge branch 'main' into avif 2025-05-24 10:30:29 +10:00
Andrew Murray
4eb89f8e5b Reduced number of bytes read for header 2025-05-24 10:24:42 +10:00
Andrew Murray
e018dc99fa Updated libpng to 1.6.48 2025-05-24 08:51:51 +10:00
Hugo van Kemenade
7e4d8e2f55
Updated Ghostscript to 10.5.1 (#8939) 2025-05-23 19:17:35 +03:00
Hugo van Kemenade
038ca7f3cc
Updated harfbuzz to 11.2.1 (#8937) 2025-05-23 19:17:23 +03:00
Hugo van Kemenade
97aa25ac6b
Updated libavif to 1.3.0 (#8949) 2025-05-23 19:17:07 +03:00
Eric Soroos
4d0678ca33 Add parallel test target, using pytest-xdist 2025-05-23 16:35:57 +02:00
pre-commit-ci[bot]
c63db77db3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-05-23 13:37:05 +00:00
Eric Soroos
60a1a20536 add timeouts to two more tests 2025-05-23 15:35:23 +02:00
wiredfool
edfc2caf62 Merge radarhere/fix_arrow_8907
* edit of elt typ
2025-05-23 11:04:55 +01:00
Andrew Murray
6807bd3d70 Added type hints 2025-05-23 11:04:08 +01:00
wiredfool
9526d949b0
Update Tests/test_pyarrow.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-05-23 10:58:28 +01:00
wiredfool
2603a249df
Update depends/docker-test-valgrind-memory.sh
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-05-23 10:57:03 +01:00
Andrew Murray
7824d2f8c6 Update rust when building libavif 2025-05-23 08:48:38 +10:00
Andrew Murray
45d1c4162b Do not build against libavif < 1 2025-05-22 15:55:43 +10:00
Stefan
a666057989
HTTP -> HTTPS
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-05-21 15:40:16 +02:00
pre-commit-ci[bot]
c35082b619 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-05-17 08:48:02 +00:00
Eric Soroos
20b49a332b Remove timeout as the specific reason,
pytest-timeout doesn't raise a timeout error.
2025-05-17 10:45:43 +02: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
f1957b49b2 Xfail timouts in Valgrind tests
* ensure that the env variable is set in the makefile
2025-05-16 12:08:45 +02:00
Eric Soroos
2d506f6f5a correct target 2025-05-15 22:06:35 +02:00
Eric Soroos
a6b8b3af77 executable 2025-05-15 22:04:14 +02:00
Eric Soroos
218f055865 Add github workflow/test-script 2025-05-15 21:59:02 +02:00
Eric Soroos
d5449d5760 Guess so. 2025-05-15 21:11:31 +02:00
Eric Soroos
fb126af7a6 Adding pytest-valgrind install 2025-05-15 21:10:48 +02:00
Andrew Murray
efa2288643 Updated libavif to 1.3.0 2025-05-15 08:38:33 +10:00
Eric Soroos
7aa6a61d43 Wrap Makefile 2025-05-13 23:50:52 +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
84b88a9fbc Suppress all python level leaks for now 2025-05-13 10:58:12 +02:00
Eric Soroos
fdfba982c8 fix memory leak in arrow schema 2025-05-13 10:28:09 +02:00
Eric Soroos
4984c45da2 valgrind memory leak check 2025-05-13 10:27:38 +02:00
Andrew Murray
c64a7b5098 Updated harfbuzz to 11.2.1 2025-05-13 07:41:00 +10:00
Eric Soroos
74ab5ac4cd Fix memory leak in arrow export using array structure 2025-05-12 00:27:56 +02:00
Andrew Murray
78887f6114 Corrected comment 2025-05-09 23:52:18 +10:00
Hugo van Kemenade
3c71559804
Improve support for Python 3.14 (#8948) 2025-05-08 19:43:29 +03:00
Andrew Murray
215069af5d Added support for Python 3.14 2025-05-08 22:39:31 +10:00
Andrew Murray
71a916ad53 Do not install PyQt6 on Python 3.14 2025-05-08 22:13:49 +10:00
Andrew Murray
c7193f74fc Updated error message 2025-05-08 20:10:34 +10:00
pre-commit-ci[bot]
d02f786873
[pre-commit.ci] pre-commit autoupdate (#8944)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-08 19:16:40 +10:00
Stefan
349cc44fd4
Add Apache-2.0 notice to IcoImagePlugin
Closes #8946.
2025-05-07 17:21:22 +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
2245fd09de Updated Ghostscript to 10.5.1 2025-04-30 07:54:07 +10:00
Hugo van Kemenade
07df26aa5d
Refactor docs Makefile (#8933)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-04-29 22:37:45 +10:00
Hugo van Kemenade
e23f017af1
Allow loading ImageFile state from Pillow < 11.2.1 (#8938) 2025-04-29 15:05:10 +03:00
Andrew Murray
47bebfc801 Allow loading state from Pillow < 11.2.1 2025-04-29 14:57:10 +10:00
Jeffrey A. Clark
c2f1b981b7
Add template for quarterly release issue (#8932) 2025-04-28 11:52:00 -04:00
Andrew Murray
dbe538a130 Updated template name 2025-04-28 06:19:18 +10:00
Andrew Murray
f1d5cdaa07 Use sentence case 2025-04-28 06:17:47 +10:00
Jeffrey A. Clark
e140027262 Move checklist to issue template 2025-04-27 15:45:40 -04:00
Jeffrey A. Clark
e6ff42303b
Update .github/ISSUE_TEMPLATE/RELEASE.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-27 15:38:02 -04:00
Jeffrey A. Clark
1eba198b62
Update .github/ISSUE_TEMPLATE/RELEASE.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-27 15:37:56 -04:00
Jeffrey A. Clark
fcaffa2229
Update .github/ISSUE_TEMPLATE/RELEASE.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-27 15:37:50 -04:00
Jeffrey A. Clark
6881863eab
Update .github/ISSUE_TEMPLATE/RELEASE.md
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-27 15:37:42 -04:00
Hugo van Kemenade
6a63907341
Remove outdated comment (#8929) 2025-04-27 18:16:34 +03:00
Andrew Murray
6f672191ad
Branch uses .x 2025-04-27 22:30:35 +10:00
Jeffrey A. Clark
0205fb4fa2
Update .github/ISSUE_TEMPLATE/RELEASE.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-04-27 08:21:57 -04:00
Jeffrey A. Clark
8ab3bc469e
Update .github/ISSUE_TEMPLATE/RELEASE.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-04-27 08:21:48 -04:00
renovate[bot]
da9d5522f7
Update dependency cibuildwheel to v2.23.3 (#8931)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-27 21:35:08 +10:00
Jeffrey A. Clark
4c2227758e Add template for quarterly release issue 2025-04-27 07:09:53 -04: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
45e24e429f Rearrance so black doesn't screw up the formatting 2025-04-21 10:54:00 +01:00
wiredfool
bc4b664b70 Add integer range tests 2025-04-21 10:46:45 +01:00
wiredfool
ce204f47f4 lint 2025-04-21 10:37:32 +01:00
wiredfool
6bf791a3e7 Use a named tuple for the packed parameters 2025-04-21 10:27:49 +01:00
Andrew Murray
58e48745cc
Add list of third-party plugins (#8910)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-21 12:14:08 +03:00
Hugo van Kemenade
8f123cd692
Update redirected URL (#8919) 2025-04-21 12:13:25 +03:00
Hugo van Kemenade
348589a367
Docs: use sentence case for headers (#8914)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-04-21 19:03:31 +10:00
Hugo van Kemenade
d03ce3d235
Docs: remove unused Makefile targets (#8917)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-04-21 18:22:03 +10: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
Hugo van Kemenade
03e7871afd
Add make [-C docs] htmllive to rebuild and reload HTML files (#8913)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2025-04-20 00:18:01 +03:00
Hugo van Kemenade
d546233be4
Remove indentation from lists (#8915) 2025-04-19 22:50:57 +03:00
Andrew Murray
cf48bbf0c4 Removed indentation from list 2025-04-19 20:26:03 +10:00
Hugo van Kemenade
eb0395442c
Merge pull request #8904 from radarhere/harfbuzz 2025-04-18 14:29:58 +03:00
Andrew Murray
00ae9dda35 Changed harfbuzz buildtype to minsize 2025-04-18 18:49:11 +10:00
wiredfool
ac500460df lint 2025-04-17 22:22:31 +01:00
wiredfool
c729d4e208 Test uint32 array creation -> image32 images 2025-04-17 22:16:27 +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
ccc4668d4e Updated harfbuzz to 11.1.0 2025-04-17 08:04:34 +10:00
Andrew Murray
3d4119521c
Close file pointer earlier (#8895) 2025-04-16 18:49:57 +03:00
Andrew Murray
f630ec097b
Build Windows arm64 wheels on arm64 runner (#8898) 2025-04-16 14:05:08 +03:00
Andrew Murray
6ea7dc8eea
Add Fedora 42 (#8899) 2025-04-16 10:06:52 +03:00
Andrew Murray
507fefbce4
Python 3.13 is tested on Arch (#8894) 2025-04-15 14:02:35 +03:00
Andrew Murray
bd39801a7b
Merge pull request #8893 from python-pillow/doc-fix
Move XV Thumbnails to read only section
2025-04-15 12:16:17 +10:00
Jeffrey A. Clark
8b1777b999 Move XV Thumbnails to read only section 2025-04-14 14:51:01 -04:00
Andrew Murray
4716bb7818
Update macOS tested Pillow versions (#8890) 2025-04-13 16:59:05 +03: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
1299039ec4
Merge pull request #8887 from radarhere/fedora
Removed Fedora 40
2025-04-13 11:27:27 +03:00
Andrew Murray
5294021438 Removed Fedora 40 2025-04-13 09:26: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
857b8846ea
Merge pull request #8885 from radarhere/releasenotes 2025-04-12 19:32:07 +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
Hugo van Kemenade
d52c2db317
Do not include libavif in wheels 2025-04-12 18:30:08 +03:00
Andrew Murray
8dafc38371 Added 11.2.1 release notes 2025-04-12 19:24:35 +10:00
Andrew Murray
07d7800248 Removed release notes update 2025-04-12 19:08:45 +10:00
Andrew Murray
04909483a7
Remove GPL v2 license (#8884) 2025-04-12 10:29:06 +03:00
Hugo van Kemenade
774d0aedce
Merge pull request #8868 from radarhere/xz_upgrade
Updated xz to 5.8.1
2025-04-12 10:27:17 +03:00
Hugo van Kemenade
d1e27fc86c
Merge pull request #8870 from radarhere/harfbuzz_upgrade
Updated harfbuzz to 11.0.1
2025-04-12 10:20:59 +03:00
Andrew Murray
81fa4e18c7 If pasting image to self at lower position with mask, copy from bottom 2025-04-12 08:19:18 +10:00
Andrew Murray
79f834ef65 If pasting an image onto itself at a lower position, copy from bottom 2025-04-11 22:26:42 +10:00
Andrew Murray
b2945ec2aa Test truncated header 2025-04-10 22:07:55 +10:00
Andrew Murray
dce9608961 Test unknown colour and missing colour key 2025-04-10 21:59:04 +10: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
Andrew Murray
75d3f1d3bd Assert palette is not None 2025-04-10 18:41:12 +10:00
Andrew Murray
c8d98d56a0
Added avif to config settings (#8875) 2025-04-10 09:21:48 +03:00
Hugo van Kemenade
5b1a64c53c
[pre-commit.ci] pre-commit autoupdate 2025-04-10 09:20:41 +03:00
Andrew Murray
6b5f8d768d Do not include libavif in wheels 2025-04-10 13:55:02 +10:00
Andrew Murray
179ae9d395 Disable building harfbuzz tests 2025-04-08 22:05:29 +10:00
Andrew Murray
8b7d72440e Specify both C and Cpp 2025-04-08 20:15:45 +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
pre-commit-ci[bot]
f6eb2e7fa5
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.4)
- [github.com/pre-commit/mirrors-clang-format: v19.1.7 → v20.1.0](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.7...v20.1.0)
- [github.com/python-jsonschema/check-jsonschema: 0.31.2 → 0.32.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.31.2...0.32.1)
- [github.com/woodruffw/zizmor-pre-commit: v1.4.1 → v1.5.2](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.4.1...v1.5.2)
- [github.com/abravalheri/validate-pyproject: v0.23 → v0.24.1](https://github.com/abravalheri/validate-pyproject/compare/v0.23...v0.24.1)
2025-04-07 17:17:00 +00:00
Andrew Murray
82bccf70a0 Added XZ_CLMUL_CRC:BOOL=OFF to allow Windows x86 to use xz 5.8.1 2025-04-06 11:10:05 +10:00
Andrew Murray
1db27be6a0 Use same URL as wheels-dependencies.sh 2025-04-05 16:09:12 +11:00
Andrew Murray
1ba32fce48 Updated harfbuzz to 11.0.1 2025-04-05 15:44:46 +11:00
Hugo van Kemenade
cda26be10e
Merge pull request #8850 from hugovk/pep639
Replace deprecated classifier with licence expression (PEP 639)
2025-04-04 18:36:02 +03: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
61d3dd9e83 Updated xz to 5.8.1, except on Windows x86 2025-04-04 22:12:54 +11:00
Andrew Murray
9f4195752d
Added type hints (#8867) 2025-04-03 13:24:37 +03:00
renovate[bot]
8691112a2c
Update scientific-python/upload-nightly-action action to v0.6.2 (#8865) 2025-04-03 13:23:36 +03:00
Andrew Murray
2d452c82e5
Removed condition that is always true (#8862) 2025-04-03 13:17:54 +03:00
Andrew Murray
f4cd5e7502 Assert image type 2025-04-03 18:44:45 +11:00
Andrew Murray
7e15c54cad
Use multibuild build_github (#8861) 2025-04-02 15:53:14 +03:00
Hugo van Kemenade
92eb58ef15
Merge pull request #8859 from radarhere/filename
Include filename in ImageFile state
2025-04-02 15:51:49 +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
Andrew Murray
867c4772c2 Do not import type checking 2025-04-01 20:23:16 +11: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
c19482f888
Merge pull request #8853 from radarhere/arrow
Added release notes for #8330
2025-04-01 19:28:41 +11:00
Andrew Murray
f205a45f44 Added release notes for #8330 2025-04-01 19:10:11 +11: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
Andrew Murray
869aa5843c
Merge pull request #8851 from radarhere/tiff
Allow cmake<4 when building libavif and libtiff
2025-04-01 18:30:45 +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
Andrew Murray
348bf6550d Allow cmake<4 when building libavif 2025-04-01 16:33:55 +11:00
Andrew Murray
8141221201 Allow cmake<4 when building libtiff 2025-04-01 16:28:07 +11: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
999d9a7f0c
Updated xz to 5.8.0 on manylinux2014 by removing po4a dependency (#8848) 2025-04-01 07:09:09 +03:00
Hugo van Kemenade
d8a0cb5db1 Work around pyroma test 2025-03-31 23:04:08 +03:00
Hugo van Kemenade
e995eef424 Replace deprecated classifier with licence expression (PEP 639) 2025-03-31 23:04:08 +03:00
Andrew Murray
b1f7ba0a41
Merge pull request #8772 from radarhere/zlib_macos
Revert to zlib on macOS < 10.15
2025-03-31 08:47:49 +11:00
Andrew Murray
f673f3e543
Close file handle on error (#8846) 2025-03-30 21:16:50 +03:00
Andrew Murray
81be8d5410
Fixed unclosed file warning (#8847) 2025-03-30 21:16:25 +03:00
Andrew Murray
25af4f1841 Added release notes 2025-03-31 00:32:35 +11:00
Andrew Murray
b4a480ff2c Corrected documentation 2025-03-31 00:31:56 +11:00
mergify[bot]
60b5131e9f
Merge pull request #8844 from radarhere/import
Do not import TYPE_CHECKING
2025-03-30 12:34:51 +00: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
Andrew Murray
14fb62e36c
Assert image type (#8619) 2025-03-30 10:42:46 +03:00
Adian Kozlica
feaded9d41
Merge pull request #2 from radarhere/image_grab_wayland_kde
Updated documentation
2025-03-30 03:16:59 +02:00
Andrew Murray
382c3ab10d spectacle may also be used on Linux 2025-03-30 11:16:05 +11:00
Adian Kozlica
ec11f7aaed
Merge branch 'main' into image_grab_wayland_kde 2025-03-29 23:51:29 +01:00
Adian Kozlica
2f672935eb
Merge pull request #1 from radarhere/image_grab_wayland_kde
Do not create temporary file if no utility is available
2025-03-29 23:44:12 +01:00
Andrew Murray
e053be3412
Updated version
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-30 07:27:30 +11: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
ae52f9f37d
Added release notes for #8781 and #8837 (#8843)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-29 15:21:51 +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
1cb6c7c347
Parametrize tests (#8838)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-28 14:27:39 +02: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
e1f0def839
Updated xz to 5.8.0, except on manylinux2014 (#8836)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-27 14:43:07 +02:00
Andrew Murray
fecb53b4b9
Merge pull request #8837 from radarhere/bcn_decode
Do not convert BC1 LUT to UINT32
2025-03-27 23:13:33 +11:00
Andrew Murray
295a5e9bd7 Do not convert BC1 LUT to UINT32 2025-03-27 21:36:17 +11:00
Andrew Murray
b8abded99b
Change back to actions/setup-python (#8833)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-25 15:31:49 +02:00
Andrew Murray
b6b6eae996
Merge pull request #8832 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.23.2
2025-03-25 13:10:44 +11:00
renovate[bot]
14d495a519
Update dependency cibuildwheel to v2.23.2 2025-03-25 00:41:03 +00:00
Andrew Murray
053b5790e1
Added media_white_point (#8829)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-24 15:22:21 +02:00
Andrew Murray
bca693bd82
Updated harfbuzz to 11.0.0 (#8830)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-24 08:33:45 +02:00
Hugo van Kemenade
af09976a5f
Merge pull request #8825 from radarhere/fixme
Removed FIXME
2025-03-21 22:09:16 +02:00
Hugo van Kemenade
478ccb4e69
Merge pull request #8823 from radarhere/test_fp
Simplified test code
2025-03-21 15:04:21 +02:00
Andrew Murray
c7e3158d51 Added explicit test for opening and saving image with string 2025-03-21 20:47:38 +11:00
Andrew Murray
9334bf040e Do not cast unnecessarily 2025-03-21 20:41:52 +11:00
Andrew Murray
8d55054877 Reuse temp path 2025-03-21 20:41:15 +11:00
Andrew Murray
8d440f734b Removed unused argument 2025-03-21 20:39:36 +11:00
Andrew Murray
21ff960c9c Test that an unlimited number of lines is not read by __init__ 2025-03-21 08:51:41 +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
Hugo van Kemenade
e66ebb6428
Merge pull request #8822 from radarhere/comment
Updated comment
2025-03-19 16:13:37 +02:00
Hugo van Kemenade
b40bcab6dd
Merge pull request #8824 from radarhere/dds_docs
Added release notes for #8807
2025-03-19 15:18:23 +02:00
Andrew Murray
700d36f2d2 Added release notes for #8807 2025-03-20 00:11:18 +11:00
Andrew Murray
6cc5f1f0ad Simplified code 2025-03-19 20:58:40 +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
Hugo van Kemenade
039ecaca62
Merge pull request #8820 from radarhere/tiff_timeout
If every TIFF tile covers the image, only use the last offset
2025-03-18 15:20:21 +02:00
Hugo van Kemenade
eec43cfbc0
Merge pull request #8817 from radarhere/typo
DXT3 images are read in RGBA mode
2025-03-17 21:33:06 +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
6c7917d7a6 Revert to zlib on macOS < 10.15 2025-03-17 07:54:47 +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
Hugo van Kemenade
33ce0140fb
Merge pull request #8806 from radarhere/fli
Improved FliImagePlugin test coverage
2025-03-16 17:06:53 +02:00
Hugo van Kemenade
2748b91100
Merge pull request #8819 from radarhere/qemu
Use docker/setup-qemu-action
2025-03-16 15:02:50 +02:00
Andrew Murray
7767e83e6c Use action to setup qemu 2025-03-16 22:24:13 +11:00
Andrew Murray
9953256bbf Revert "Use Ubuntu 22.04 for 24.04 ppc64le and s390x"
This reverts commit e31441fc41.
2025-03-16 22:12:14 +11:00
Andrew Murray
004bb0e8ee
Merge pull request #8818 from python-pillow/renovate/cibuildwheel-2.x 2025-03-16 08:21:44 +11:00
renovate[bot]
db30ef7423
Update dependency cibuildwheel to v2.23.1 2025-03-15 19:49:03 +00:00
Andrew Murray
7b725a8fc4 DXT3 images are read in RGBA mode 2025-03-15 13:04:26 +11:00
Andrew Murray
5efcaa4603
Updated Ghostscript to 10.5.0 (#8814)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-14 08:50:28 +02:00
Andrew Murray
d97441cb86
Install libtiff-dev (#8816)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-14 08:49:59 +02:00
Andrew Murray
4b9d9f55cd
Updated libtiff to 4.7.0 (#8812)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-12 00:59:25 +02:00
Andrew Murray
b965116982
Merge pull request #8810 from hugovk/renovate-cron
Replace deprecated Renovate schedule with cron syntax
2025-03-11 11:00:29 +11:00
Hugo van Kemenade
a38d4d2583 Replace deprecated Renovate schedule with cron syntax 2025-03-10 22:44:13 +01:00
Andrew Murray
baa299a6f4 Moved code outside of context manager 2025-03-08 09:56:23 +11:00
Andrew Murray
5575c1d072 Test missing frame size 2025-03-08 09:56:00 +11:00
Andrew Murray
e946c7b14a
Test using _seek to skip frames (#8804)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-03-06 17:42:10 +02: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
c23bf05201
Merge pull request #8797 from radarhere/pcx
Improved PcxImagePlugin test coverage
2025-03-05 18:08:26 +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
Hugo van Kemenade
5f36c9af43
Merge pull request #8801 from radarhere/match
Use match argument
2025-03-05 17:16:21 +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
Andrew Murray
7552893792
Merge pull request #8799 from hugovk/flake8-pie
Call `startswith`/`endswith` once with a tuple, and `range` without `start=0`
2025-03-05 19:12:35 +11:00
Andrew Murray
3607d1ade3 Use match argument 2025-03-05 00:03:37 +11:00
Andrew Murray
c0b5d013f6 Test bad image size and unknown PCX mode 2025-03-04 22:19:06 +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
1f4beb4a5c Lint with flake8-pie 2025-03-03 23:57:40 +02:00
Andrew Murray
c7ed097dd1
Merge pull request #8783 from radarhere/bdf
Improved BdfFontFile test coverage
2025-03-04 08:29:33 +11:00
Andrew Murray
5ce8929ed4
Updated test name
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-04 07:48:12 +11:00
Hugo van Kemenade
5187b54235
Merge pull request #8795 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-03-03 20:40:28 +02:00
Hugo van Kemenade
0c9a3a7019
Merge pull request #8770 from radarhere/harfbuzz
Updated harfbuzz to 10.4.0
2025-03-03 19:17:41 +02:00
pre-commit-ci[bot]
c1703f5330
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.4...v0.9.9)
- [github.com/PyCQA/bandit: 1.8.2 → 1.8.3](https://github.com/PyCQA/bandit/compare/1.8.2...1.8.3)
- [github.com/python-jsonschema/check-jsonschema: 0.31.1 → 0.31.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.31.1...0.31.2)
- [github.com/woodruffw/zizmor-pre-commit: v1.3.0 → v1.4.1](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.3.0...v1.4.1)
- [github.com/tox-dev/pyproject-fmt: v2.5.0 → v2.5.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.5.0...v2.5.1)
2025-03-03 17:15:48 +00:00
Hugo van Kemenade
4efc096c7d
Merge pull request #8788 from radarhere/jpeg_comment
JPEG comments are from the COM marker
2025-03-03 18:47:21 +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
17c7beffd8
Merge branch 'main' into harfbuzz 2025-03-03 17:41:34 +02:00
Hugo van Kemenade
8e8b94ada4
Merge pull request #8764 from radarhere/libpng
Updated libpng to 1.6.47
2025-03-03 17:40:33 +02:00
Hugo van Kemenade
04438f46fd
Merge pull request #8742 from radarhere/lcms2
Updated lcms2 to 2.17
2025-03-03 17:40:24 +02:00
Hugo van Kemenade
f89952cb04
Merge pull request #8778 from radarhere/mingw
Revert "Do not install libimagequant"
2025-03-03 17:38:47 +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
Hugo van Kemenade
7145057ef8
Merge pull request #8767 from radarhere/ftex
Only set mode when necessary in FtexImagePlugin
2025-03-03 17:35:36 +02:00
Hugo van Kemenade
952d6e9a61
Merge pull request #8766 from radarhere/ftex_test
Improved FtexImagePlugin test coverage
2025-03-03 17:35:03 +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
renovate[bot]
2d97521aa3
Update dependency mypy to v1.15.0 2025-03-03 02:38:52 +00: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
Hugo van Kemenade
5d52ede584
Merge pull request #8789 from hugovk/wheels-pypy3.11
Build PyPy3.11 wheel for macOS 10.15 x86_64
2025-03-02 14:34:23 +02:00
Andrew Murray
c60682af67 JPEG comments are from the COM marker 2025-03-02 22:34:58 +11:00
Hugo van Kemenade
db4534a8cf Build PyPy3.11 wheel for macOS 10.15 x86_64 2025-03-02 12:00:46 +02:00
Andrew Murray
bcdb688233
Merge pull request #8785 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.23.0
2025-03-02 09:11:34 +11:00
renovate[bot]
397f8c752b
Update dependency cibuildwheel to v2.23.0 2025-03-01 20:50:23 +00:00
Andrew Murray
ff4f5d4cb6 Test ValueError 2025-03-01 21:41:30 +11:00
Andrew Murray
d6b94421d0 Updated harfbuzz to 10.4.0 2025-03-01 11:37:49 +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
153fd4801c Revert "Do not install libimagequant"
This reverts commit 1e115987af.
2025-02-27 22:24:48 +11:00
Andrew Murray
85f439f575 _seek_check already raises an EOFError 2025-02-25 18:46:22 +11:00
Hugo van Kemenade
d7d48df9af
Merge pull request #8771 from radarhere/fontfile 2025-02-22 17:27:55 +02:00
Andrew Murray
ae7c4920c9 Test that subsequent compile() calls do not change anything 2025-02-22 08:09:44 +11:00
Andrew Murray
ddb238c70d Only set mode when necessary 2025-02-20 07:57:10 +11:00
Andrew Murray
ae6bb4cac2 Test invalid texture compression format 2025-02-19 23:28:25 +11:00
Hugo van Kemenade
769a14dca5
Merge pull request #8765 from radarhere/mpo 2025-02-19 12:39:25 +02:00
Andrew Murray
dc94d1d8bb Test opening file with plugin directly 2025-02-19 18:27:05 +11:00
Hugo van Kemenade
1496d87d3a
Merge pull request #8763 from radarhere/sphinx
Update Sphinx to 8.2 to remove nitpick ignore
2025-02-19 08:29:53 +02:00
Andrew Murray
4415b4ad36 Updated libpng to 1.6.47 2025-02-19 08:47:04 +11:00
Hugo van Kemenade
1126733edf
Merge pull request #8762 from radarhere/sun 2025-02-18 20:59:37 +02:00
Andrew Murray
b096018fdd Update Sphinx to 8.2 to remove nitpick ignore 2025-02-18 22:27:13 +11:00
Andrew Murray
5d40e6aead Test RGBX raw mode 2025-02-18 20:48:04 +11:00
Andrew Murray
4b7e75be2d Test errors 2025-02-18 20:47:17 +11:00
Andrew Murray
fe1cab6ea0
Merge pull request #8761 from hugovk/slice-startswith
Replace slice and comparison with `startswith`/`endswith`
2025-02-18 18:41:42 +11:00
mergify[bot]
f6d227e128
Merge pull request #8760 from radarhere/px
Corrected type check
2025-02-17 22:05:00 +00: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
Andrew Murray
322e121a92 Corrected type check 2025-02-18 07:56:11 +11:00
Andrew Murray
fa58313c41
Merge pull request #8759 from radarhere/tar
Improve TarIO test coverage
2025-02-18 07:40:50 +11:00
Hugo van Kemenade
17541258c0
Merge pull request #8618 from radarhere/px 2025-02-17 13:30:17 +02:00
Hugo van Kemenade
a254b8cfeb
Merge pull request #8741 from radarhere/type 2025-02-17 13:29:44 +02:00
Hugo van Kemenade
0e333bf0dc
Merge pull request #8738 from radarhere/pkg_config 2025-02-17 13:28:21 +02:00
Hugo van Kemenade
3f111b986e
Merge pull request #8748 from radarhere/gif 2025-02-17 13:07:20 +02:00
Andrew Murray
1ac527a9e1
Merge pull request #8758 from hugovk/pypy3.11
Add PyPy3.11 to CI
2025-02-17 22:00:20 +11:00
Andrew Murray
19010bb301
Use match
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-17 21:49:08 +11:00
Andrew Murray
017b16b803
Removed argument
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-17 21:48:09 +11:00
Hugo van Kemenade
15e4c1a724 Fix ShellCheck 2025-02-17 12:19:44 +02:00
Andrew Murray
152d982644 Test missing subfile 2025-02-17 20:20:45 +11:00
Andrew Murray
9762c9e30e Test unexpected end of tar file 2025-02-17 20:20:02 +11:00
Hugo van Kemenade
216690ff17 Add PyPy3.11 to CI 2025-02-16 21:29:54 +02:00
Hugo van Kemenade
8a3c4f5965
Merge pull request #8757 from mgorny/pycapi-compat-pypy311 2025-02-16 21:23:43 +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
0364cfdfc4
Merge pull request #8754 from hugovk/update-tox
Don't call `make clean` or `pip` in tox
2025-02-16 06:23:57 +11:00
mergify[bot]
fed5d85cd6
Merge pull request #8756 from radarhere/open
Don't shadow builtin open
2025-02-15 18:40:09 +00:00
Andrew Murray
7f414846a3 Don't shadow builtin open 2025-02-16 05:08:22 +11:00
Andrew Murray
1650425283
Merge pull request #8673 from freakboy3742/zlib-ng-with-sip
Rewrite the install_name of the ZLIB-NG library on macOS
2025-02-16 05:00:36 +11:00
Andrew Murray
f8566b90eb
Merge pull request #8755 from hugovk/rm-_wedge
Remove debug `Image._wedge`
2025-02-16 04:54:27 +11:00
Andrew Murray
397e6f2710
Merge pull request #8753 from hugovk/rm-unused
Remove unused `bdf_slant` and `bdf_spacing` variables
2025-02-16 04:24:13 +11:00
Hugo van Kemenade
126026e5e5 Don't shadow builtin open 2025-02-15 16:35:07 +02:00
Hugo van Kemenade
028f0d6ea9 Remove unused data read 2025-02-15 16:35:07 +02:00
Hugo van Kemenade
ff960b8841 Remove debug Image._wedge 2025-02-15 16:35:07 +02:00
Hugo van Kemenade
8261348fff Don't call pip in tox 2025-02-15 14:27:52 +02:00
Hugo van Kemenade
1c18d29c34 Remove unused bdf_slant and bdf_spacing variables 2025-02-15 13:26:06 +02:00
Hugo van Kemenade
c4eb2fe597
Merge pull request #8752 from radarhere/mingw_test 2025-02-15 13:00:20 +02:00
Andrew Murray
9f0398ef32 Removed unused code 2025-02-15 21:07:43 +11:00
Andrew Murray
ad6c4f82f3 Updated lcms2 to 2.17 2025-02-15 09:27:16 +11:00
Hugo van Kemenade
ede46d47fc
Merge pull request #8745 from radarhere/zlibng 2025-02-14 23:59:06 +02:00
Hugo van Kemenade
9b2ea830e0
Merge pull request #8744 from radarhere/imagequant 2025-02-14 23:54:19 +02:00
Hugo van Kemenade
ad231352a8
Merge pull request #8747 from radarhere/monkeypatch
Use monkeypatch
2025-02-13 20:03:00 +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
Andrew Murray
8020d423bc Use monkeypatch 2025-02-12 18:36:14 +11:00
Andrew Murray
45d8d80567 Updated zlib-ng to 2.2.4 2025-02-11 11:36:55 +11:00
Andrew Murray
c566a81c64 Updated libimagequant to 4.3.4 2025-02-10 21:47:37 +11:00
Hugo van Kemenade
3c2310e090
Merge pull request #8739 from radarhere/boolean 2025-02-09 16:05:54 +02:00
Hugo van Kemenade
c81f2f5014
Merge pull request #8740 from radarhere/tuple 2025-02-09 16:05:29 +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
Andrew Murray
1b0095fad4 Pass CFLAGS to build_simple directly 2025-02-08 17:23:41 +11:00
Andrew Murray
56a72a3da4
Merge branch 'main' into zlib-ng-with-sip 2025-02-08 16:31:36 +11:00
Andrew Murray
f4db366e41 Merge branch 'main' into px 2025-02-07 08:51:58 +11:00
Andrew Murray
f056c259a7 Support ttb multiline text 2025-02-06 22:30:09 +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
f55a0900f4
Merge pull request #8724 from radarhere/mingw_libimagequant 2025-02-06 13:25:03 +02:00
Hugo van Kemenade
c73796dc1e
Merge pull request #8733 from radarhere/tuple 2025-02-06 13:19:29 +02:00
Hugo van Kemenade
dd2bb392e6
Merge pull request #8732 from radarhere/unused_parse 2025-02-06 13:18:34 +02:00
Hugo van Kemenade
a7524a34b2
Merge pull request #8727 from radarhere/getpixel 2025-02-06 13:17:26 +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
Andrew Murray
92eb11eb09
Merge pull request #8729 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-02-04 07:19:15 +11:00
Andrew Murray
00790e925d
Updated comment 2025-02-04 06:49:46 +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
pre-commit-ci[bot]
90d2506074
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.4)
- [github.com/psf/black-pre-commit-mirror: 24.10.0 → 25.1.0](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...25.1.0)
- [github.com/PyCQA/bandit: 1.8.0 → 1.8.2](https://github.com/PyCQA/bandit/compare/1.8.0...1.8.2)
- [github.com/pre-commit/mirrors-clang-format: v19.1.6 → v19.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.6...v19.1.7)
- [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.31.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.30.0...0.31.1)
- [github.com/woodruffw/zizmor-pre-commit: v1.0.0 → v1.3.0](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.0.0...v1.3.0)
- [github.com/tox-dev/tox-ini-fmt: 1.4.1 → 1.5.0](https://github.com/tox-dev/tox-ini-fmt/compare/1.4.1...1.5.0)
2025-02-03 17:35:25 +00:00
Andrew Murray
ce1996d804 Use getpixel() instead of load() 2025-02-03 19:32:59 +11:00
Hugo van Kemenade
4d1f874096
Merge pull request #8725 from radarhere/macos 2025-02-01 12:23:49 +02:00
Andrew Murray
347a3865bf Revert "Ignore brew dependencies for libraqm on macOS 13"
This reverts commit dfd53564ff.
2025-02-01 12:21:15 +11:00
Andrew Murray
69c9572517 Added ImageDraw link 2025-02-01 10:54:18 +11:00
Andrew Murray
fca48db866
Added quote marks
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-01 10:02:42 +11:00
Hugo van Kemenade
c5d27af0f1
Merge pull request #8723 from radarhere/tiff_iimm 2025-01-31 17:53:06 +02:00
Andrew Murray
5bbbc46240 Fixed exceptions when closing AppendingTiffWriter 2025-02-01 01:13:30 +11:00
Andrew Murray
ec72d20d23 Added release notes 2025-02-01 00:47:21 +11:00
Andrew Murray
9a58456c9b
Added versionadded for justify
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-01 00:44:26 +11: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
1e115987af Do not install libimagequant 2025-01-31 19:09:03 +11:00
Andrew Murray
e4f2a4a291
Merge pull request #8717 from radarhere/none
Use Py_RETURN_NONE macro when possible
2025-01-30 22:27:42 +11: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
Andrew Murray
a9d05a1e51
Fixed unclosed file warnings (#8705)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-01-27 22:59:44 +02:00
Andrew Murray
e19a1496c2
Use monkeypatch (#8707)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-01-27 12:17:51 +02:00
Aleksandr Karpinskii
e7ae4aaad0 Use Py_RETURN_NONE macro when possible 2025-01-27 18:17:03 +11:00
Andrew Murray
569b785371
Updated harfbuzz to 10.2.0 (#8688)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-01-25 09:04:52 +02:00
Hugo van Kemenade
0bfaba1dca
Merge pull request #8711 from radarhere/xz
Updated xz to 5.6.4
2025-01-24 23:01:30 +02:00
Hugo van Kemenade
7cd98e8b7c
Merge pull request #8712 from radarhere/libpng
Updated libpng to 1.6.46
2025-01-24 23:00:59 +02:00
Hugo van Kemenade
6973d6968f
Merge pull request #8710 from radarhere/libimagequant
Updated libimagequant to 4.3.4
2025-01-24 23:00:30 +02:00
Andrew Murray
16a8e2bde4 Updated xz to 5.6.4 2025-01-24 23:46:14 +11:00
Andrew Murray
f52dbe749b Updated libpng to 1.6.46 2025-01-24 23:46:03 +11:00
Andrew Murray
9d4232101f Updated libimagequant to 4.3.4 2025-01-24 23:40:21 +11:00
Hugo van Kemenade
51df14282f
Merge pull request #8713 from radarhere/22_04 2025-01-24 14:38:30 +02:00
Andrew Murray
e31441fc41 Use Ubuntu 22.04 for 24.04 ppc64le and s390x 2025-01-24 19:51:07 +11:00
Andrew Murray
8a90975c14 Seek relative to current position 2025-01-22 23:14:34 +11:00
Hugo van Kemenade
58dd4a7dac
Merge pull request #8702 from radarhere/imagefile_fp 2025-01-20 19:29:05 +02: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
cf7dd2f0e9
Merge pull request #8700 from radarhere/ubuntu 2025-01-18 11:10:40 +02:00
Andrew Murray
ba606622b4 Updated Ubuntu arm to 24.04 with arm64 runner 2025-01-18 13:53:39 +11:00
Hugo van Kemenade
a92a664ee5
Merge pull request #8699 from radarhere/mozjpeg 2025-01-17 23:53:04 +02:00
Andrew Murray
284297755a Updated capitalization 2025-01-18 07:55:49 +11:00
Andrew Murray
e79b298443 Merge branch 'main' into mozjpeg 2025-01-18 07:54:07 +11:00
Andrew Murray
30c4ad484c
Updated capitalization
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-18 07:48:15 +11:00
Hugo van Kemenade
4f7510b77b
Merge pull request #8689 from radarhere/get_child_images 2025-01-17 22:29:50 +02:00
Hugo van Kemenade
85a6df534c
Merge pull request #8698 from radarhere/arm64 2025-01-17 21:50:35 +02:00
Hugo van Kemenade
7446348b73
Merge pull request #8525 from hugovk/gha-windows-32-bit 2025-01-17 20:46:08 +02:00
Andrew Murray
6a0ac411e2 Added mozjpeg documentation 2025-01-17 18:57:12 +11:00
Andrew Murray
be8e55d28d Added deprecation warning 2025-01-17 18:34:23 +11:00
Andrew Murray
176c5b3749 Added pypy to CIBW_ENABLE 2025-01-17 11:51:42 +11:00
Andrew Murray
a04e76a84f Use arm64 Linux runners 2025-01-17 11:51:21 +11:00
Andrew Murray
d2122ab17f
Merge pull request #8696 from radarhere/numpy
Test Windows amd64 wheels with NumPy
2025-01-17 08:45:08 +11:00
Hugo van Kemenade
ade99aaa90
Merge branch 'main' into gha-windows-32-bit 2025-01-16 17:01:59 +02: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
Hugo van Kemenade
e59549f4e5
Merge pull request #8695 from radarhere/miniconda 2025-01-16 14:12:20 +02:00
Hugo van Kemenade
df7e42eef1
Merge pull request #8681 from radarhere/types 2025-01-16 14:00:25 +02:00
Andrew Murray
536aee5bbd Test Numpy on amd64 2025-01-16 22:12:53 +11:00
Andrew Murray
e70c821436 Removed miniconda CPPFLAGS 2025-01-16 20:57:49 +11:00
Hugo van Kemenade
84d58a0282
Merge pull request #8694 from radarhere/exceptions 2025-01-14 17:04:39 +02:00
Hugo van Kemenade
bdfd881c6d
Merge pull request #8690 from radarhere/314 2025-01-14 16:24:41 +02:00
Andrew Murray
cf438c53ee Removed UnidentifiedImageError, as it inherits from OSError 2025-01-14 21:04:08 +11:00
Andrew Murray
0f2c554c69 Improved comment 2025-01-14 21:03:20 +11:00
Hugo van Kemenade
f521a4be7d
Merge pull request #8686 from radarhere/test_embeddable_wheels 2025-01-13 21:21:06 +02:00
Andrew Murray
2ce2ff297c Test Python 3.14 pre-release 2025-01-14 05:54:19 +11:00
Hugo van Kemenade
513a72abb5
Merge pull request #8691 from radarhere/sphinx 2025-01-13 19:08:28 +02:00
Andrew Murray
a4018d192c Added Sphinx configuration key 2025-01-13 21:07:32 +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
7166a09538 Skip test_embeddable if compiler cannot be initialized 2025-01-11 18:57:41 +11:00
Hugo van Kemenade
3111e37bf4
Merge pull request #8679 from radarhere/test 2025-01-10 21:13:33 +02:00
Hugo van Kemenade
bce6097a96
Merge pull request #8684 from radarhere/spider 2025-01-10 19:29:23 +02:00
Andrew Murray
64bfdff6c8 Only F mode starts with F 2025-01-10 21:51:33 +11:00
Hugo van Kemenade
8878511476
Merge pull request #8683 from radarhere/test_embeddable 2025-01-10 12:01:59 +02:00
Andrew Murray
0d93c030a5 Test passes in Python 3.13 2025-01-10 19:10:42 +11:00
Andrew Murray
8430193bed
Merge pull request #8682 from hugovk/mingw
Use python-numpy and python-olefile instead of virtual python3 packages
2025-01-10 07:53:52 +11:00
Andrew Murray
5ad7f70ade
Merge branch 'main' into types 2025-01-09 23:44:33 +11:00
Andrew Murray
15ade68f40
Merge branch 'main' into test 2025-01-09 23:44:29 +11:00
Hugo van Kemenade
8603d6512a Use python-numpy and python-olefile instead of python3-numpy and python3-olefile 2025-01-09 14:22:29 +02:00
Hugo van Kemenade
6fc496ee5b
Merge pull request #8678 from radarhere/mingw 2025-01-09 14:18:02 +02:00
Andrew Murray
4d14991604 Corrected argument types 2025-01-09 14:58:58 +11:00
Andrew Murray
a34a9cd6d1 Improved test coverage 2025-01-09 14:49:48 +11:00
Andrew Murray
f938af5c3c Do not catch exception only to assert it is None 2025-01-09 14:38:07 +11:00
Andrew Murray
aa686894a6 Removed unused assert_all_same 2025-01-09 14:32:46 +11:00
Andrew Murray
440b09e831 Removed unused mode argument from assert_image_similar_tofile 2025-01-09 14:32:17 +11:00
Andrew Murray
2eb112329e Use python-pip instead of python3-pip 2025-01-09 08:32:42 +11:00
Hugo van Kemenade
af3b904233
Merge pull request #8663 from radarhere/bigtiff 2025-01-08 19:15:31 +02:00
Hugo van Kemenade
93f45a3992
Merge pull request #8670 from radarhere/libpng 2025-01-08 19:12:20 +02:00
Hugo van Kemenade
e8040a7a0f
Merge pull request #8666 from radarhere/imagefile_tile 2025-01-08 19:09:33 +02:00
Hugo van Kemenade
bd4fd58ded
Merge pull request #8668 from radarhere/spider_test 2025-01-08 19:06:48 +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
aaff3f1f3d
Merge pull request #8649 from radarhere/ico 2025-01-08 18:55:31 +02:00
Hugo van Kemenade
e9ab468277
Merge pull request #8648 from radarhere/png_text 2025-01-08 18:45:54 +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
Hugo van Kemenade
38a5f72d21
Merge pull request #8674 from radarhere/wheel_paths 2025-01-08 16:34:38 +02:00
Andrew Murray
fb7e2199e0
Merge pull request #8675 from python-pillow/renovate/github-actions
Update cygwin/cygwin-install-action action to v5
2025-01-08 20:29:01 +11:00
renovate[bot]
84c8e38b2d
Update cygwin/cygwin-install-action action to v5 2025-01-08 07:38:51 +00:00
Andrew Murray
f281eb9b46 Trigger from changes in pyproject.toml 2025-01-08 18:27:20 +11:00
Russell Keith-Magee
120ba1c13d
Rewrite the install_name of the ZLIB-NG library on macOS. 2025-01-08 14:01:06 +08:00
Andrew Murray
ee2b8c5256 Switch to .tar.gz for libpng 2025-01-08 10:26:21 +11:00
Andrew Murray
86b8e1e45f Updated libpng to 1.6.45 2025-01-08 10:19:09 +11:00
Andrew Murray
f36c667467 Improved test coverage 2025-01-07 22:24:08 +11:00
Andrew Murray
aef6df2d04 Use ImageFile._Tile 2025-01-07 21:51:23 +11: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
Hugo van Kemenade
128f3f46d4
Merge pull request #8664 from radarhere/coverage 2025-01-07 12:49:04 +02:00
Andrew Murray
6e9592b504
Merge pull request #8665 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-01-07 09:03:05 +11:00
pre-commit-ci[bot]
b1749dff08
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.8.6)
- [github.com/pre-commit/mirrors-clang-format: v19.1.5 → v19.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.5...v19.1.6)
- [github.com/woodruffw/zizmor-pre-commit: v0.10.0 → v1.0.0](https://github.com/woodruffw/zizmor-pre-commit/compare/v0.10.0...v1.0.0)
2025-01-06 17:35:41 +00:00
Andrew Murray
7708e4b524 Improved Docker coverage reporting 2025-01-06 20:30:47 +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
Hugo van Kemenade
2486361002
Merge pull request #8661 from radarhere/no_giflib
Removed giflib as webp dependency
2025-01-04 11:12:32 +02:00
Andrew Murray
66795e9c26
Merge branch 'main' into no_giflib 2025-01-04 17:26:10 +11:00
Hugo van Kemenade
ef223f52f7
Merge pull request #8658 from radarhere/giflib
Corrected installing ImageMagick on cifuzz
2025-01-04 08:24:39 +02:00
Andrew Murray
cce0f5b653 Removed giflib as webp dependency 2025-01-04 10:34:59 +11:00
Hugo van Kemenade
9ae8cb8e8e
Merge pull request #8657 from cdce8p/overload-exif_transpose 2025-01-03 15:00:22 +02: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
Andrew Murray
d12e78badf
Removed exif_transpose return type checks 2025-01-03 01:00:19 +01:00
Andrew Murray
1d771ff4a4 Do not call yum on cifuzz 2025-01-03 10:26:47 +11:00
Andrew Murray
48712f29ce
Merge pull request #8655 from radarhere/giflib
Updated to giflib 5.2.2 on Linux
2025-01-03 08:15:48 +11:00
Marc Mueller
1678f7f215 Add overloads for exif_transpose 2025-01-02 17:38:21 +01:00
Hugo van Kemenade
261ed66c11
Merge branch 'main' into giflib 2025-01-02 18:09:21 +02:00
Hugo van Kemenade
66f5a3facc
Merge pull request #8653 from radarhere/freetype 2025-01-02 18:08:34 +02:00
Hugo van Kemenade
9f2c702b4f
Merge pull request #8656 from hugovk/zlib-2.2.3 2025-01-02 18:07:50 +02:00
Andrew Murray
2d7597ac6a Updated to giflib 5.2.2 on Linux 2025-01-02 22:50:25 +11:00
Hugo van Kemenade
22d50fd2c1
Merge pull request #8654 from radarhere/macos 2025-01-02 12:57:30 +02:00
Hugo van Kemenade
ade15fcdd3 Upgrade zlib-ng to 2.2.3 2025-01-02 12:46:24 +02:00
Andrew Murray
6b4619c4f5 Updated macOS tested Pillow versions 2025-01-02 20:46:58 +11: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
f636cb8c15 Updated freetype to 2.13.3 2025-01-02 10:28:51 +11:00
Hugo van Kemenade
dfb368a7e9
Merge pull request #8651 from radarhere/blp
Corrected BLP1 alpha depth handling
2025-01-01 17:27:28 +02:00
Andrew Murray
5d998d3fed Improved coverage 2025-01-01 23:38:24 +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
beda2b6e8d Removed unused image open 2025-01-01 10:49:24 +11:00
Andrew Murray
8d78cfcc5a Added return types 2025-01-01 09:10:16 +11:00
Andrew Murray
d626e6ab9f text is a property 2025-01-01 09:07:41 +11:00
Hugo van Kemenade
aa0f4127b8
Merge pull request #8646 from radarhere/centos 2024-12-31 17:04:35 +02:00
Andrew Murray
e34427167d Added CentOS Stream 10 2024-12-31 23:26:09 +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
d42f22baaf Added release notes 2024-12-31 21:38:05 +11:00
Hugo van Kemenade
c7026d9bc8
Merge pull request #8642 from radarhere/bigtiff 2024-12-31 12:31:40 +02:00
Andrew Murray
f91b111fac Removed pre-C99 definitions 2024-12-31 20:42:49 +11:00
Andrew Murray
c3fac1d78f
Merge pull request #8643 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.14.1
2024-12-31 11:25:01 +11:00
Andrew Murray
1de617fbe7 Added release notes 2024-12-31 11:13:14 +11:00
renovate[bot]
e27115ee8d
Update dependency mypy to v1.14.1 2024-12-30 23:31:05 +00: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
Hugo van Kemenade
8c3fbd5055
Merge pull request #8641 from radarhere/rawmode 2024-12-30 12:04:10 +02: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
Andrew Murray
a4f976ca27
Merge pull request #8638 from hugovk/pre-commit-zizmor
Add zizmor to pre-commit and fix potential cache-poisoning in wheels workflow
2024-12-30 09:44:40 +11:00
Hugo van Kemenade
171531cb67
Merge pull request #8635 from radarhere/exif_ifd 2024-12-29 21:36:15 +02:00
Hugo van Kemenade
ec49b98bbb
Merge pull request #8637 from radarhere/rgbx_16n 2024-12-29 21:35:37 +02:00
Hugo van Kemenade
8d28514e40 Add zizmor to pre-commit and fix potential cache-poisoning in wheels workflow 2024-12-29 21:16:42 +02:00
Hugo van Kemenade
743256f80b
Merge pull request #8633 from radarhere/jfif_unit 2024-12-29 20:45:20 +02:00
Hugo van Kemenade
76df02d28b
Merge pull request #8627 from radarhere/xmp
Added release notes for writing XMP bytes to JPEG and MPO
2024-12-29 11:07:53 +02:00
Andrew Murray
ea962bf1d8 Added RGBX;16N to RGB unpacker 2024-12-29 16:59:32 +11:00
Andrew Murray
9368a86397 Keep new IFDs when converting EXIF to bytes 2024-12-29 07:43:47 +11:00
Andrew Murray
1a79d1025c
Merge pull request #8592 from radarhere/jpeg2000_cmyk_save
Support saving CMYK JP2 images
2024-12-29 06:25:37 +11:00
Andrew Murray
9bebecf36d Use versionadded 2024-12-28 22:18:02 +11:00
Andrew Murray
973cd6481a Merge branch 'main' into jpeg2000_cmyk_save 2024-12-28 22:08:08 +11:00
Hugo van Kemenade
41a89ea2dd
Merge pull request #8622 from radarhere/jpeg2000_comment 2024-12-28 13:05:26 +02:00
Hugo van Kemenade
1cf1932d33
Merge pull request #8631 from radarhere/buffer_size 2024-12-28 12:47:05 +02:00
Andrew Murray
8945875c6c Populate DPI from JFIF cm density 2024-12-28 21:28:44 +11:00
Hugo van Kemenade
e8dad19409
Merge pull request #8628 from radarhere/monkeypatch
Use monkeypatch
2024-12-28 11:32:35 +02:00
Andrew Murray
05c981ffd7 Removed buffer_size variable 2024-12-28 15:41:19 +11:00
Andrew Murray
4e82f2bec0
Merge pull request #8630 from radarhere/imagegrab_macos
Do not use temporary file in ImageGrab.grabclipboard() on macOS
2024-12-28 15:15:51 +11:00
Andrew Murray
f10e9f42d3 Do not use temporary file in grabclipboard() on macOS 2024-12-28 14:29:29 +11:00
Andrew Murray
23083f28ab Use monkeypatch 2024-12-28 14:02:19 +11:00
Andrew Murray
cfe8379d90 Added release notes for #8483 2024-12-28 13:02:23 +11:00
Andrew Murray
ad747f3fd8 Added release notes 2024-12-28 12:38:50 +11:00
Andrew Murray
0220b025c5 Updated documentation for #7947 and #8592 2024-12-28 12:33:59 +11:00
Andrew Murray
439d5cf2a0
Merge branch 'main' into jpeg2000_cmyk_save 2024-12-28 07:42:56 +11:00
Hugo van Kemenade
d008d12ba3
Merge pull request #8625 from radarhere/containerio 2024-12-27 21:51:08 +02:00
Hugo van Kemenade
cf09e8ea50
Merge pull request #8620 from radarhere/polygon 2024-12-27 21:47:49 +02:00
Hugo van Kemenade
86d396a124
Merge pull request #8555 from radarhere/exif 2024-12-27 21:45:00 +02:00
Hugo van Kemenade
2c3395f262
Merge pull request #8553 from radarhere/tile 2024-12-27 21:43:38 +02:00
Hugo van Kemenade
dc84811cae
Merge pull request #8551 from radarhere/guessing 2024-12-27 21:41:47 +02:00
Hugo van Kemenade
4df23c0f26
Merge pull request #8535 from radarhere/tiff 2024-12-27 21:40:12 +02:00
Hugo van Kemenade
99ee337e07
Merge pull request #8529 from radarhere/tiff_tags 2024-12-27 21:35:02 +02:00
Hugo van Kemenade
dcd0479772
Merge pull request #8499 from radarhere/stub 2024-12-27 21:31:11 +02:00
Hugo van Kemenade
f42d1c1b04
Merge pull request #8483 from radarhere/xmp 2024-12-27 21:30:54 +02:00
Hugo van Kemenade
510c84ad03
Merge pull request #8476 from radarhere/jpeg_state 2024-12-27 21:29:17 +02:00
Hugo van Kemenade
4db5be1182
Merge pull request #8626 from radarhere/monkeypatch 2024-12-27 16:39:10 +02:00
Andrew Murray
89f1498796 Updated argument types to match Image draft 2024-12-27 11:38:47 +11:00
Andrew Murray
0148684c24 Use monkeypatch 2024-12-27 11:29:47 +11:00
Andrew Murray
aef3aa2ab3 Pass file handle to ContainerIO 2024-12-27 11:26:07 +11:00
Andrew Murray
e16e334013
Merge pull request #28 from nulano/emf_records
Skip failing WMF records on 32-bit Windows
2024-12-27 11:09:42 +11:00
Nulano
2ea3ea94a1 Skip failing WMF records on 32-bit Windows 2024-12-26 22:06:07 +01:00
Hugo van Kemenade
f9767fb00f
Merge pull request #8624 from radarhere/type_hint_spider 2024-12-26 22:20:50 +02:00
Hugo van Kemenade
6e66166234
Merge pull request #8623 from radarhere/threads 2024-12-26 22:17:44 +02:00
Andrew Murray
622722f295 Corrected loadImageSeries type hint 2024-12-26 20:04:27 +11:00
Andrew Murray
62b7cb62f4 Fixed indentation 2024-12-26 19:06:23 +11:00
Andrew Murray
dd410e4b32 Added reading of J2K comments 2024-12-26 10:51:45 +11:00
Andrew Murray
fb3d80e390 Fixed connecting discontiguous corners 2024-12-24 00:41:27 +11:00
Andrew Murray
601a56def1 Assert palette is not None 2024-12-23 12:03:13 +11:00
Andrew Murray
5d5543b35c Assert that load() does not return None 2024-12-23 11:57:27 +11:00
Andrew Murray
0074c3bf34 Assert that a tuple is returned by getpixel() 2024-12-23 11:45:36 +11:00
Andrew Murray
0e3f51dec6
Merge pull request #8613 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.14.0
2024-12-22 15:11:09 +11:00
Hugo van Kemenade
1146190d75
Merge pull request #8615 from radarhere/exiftags 2024-12-22 00:34:42 +02:00
Andrew Murray
5fe80e1c48 Use hex values more consistently 2024-12-22 07:30:59 +11:00
Andrew Murray
b99a00f44f Updated MakerNote IFD capitalization 2024-12-22 07:24:08 +11:00
Andrew Murray
08e1f9ebc1 Lint fixes 2024-12-21 13:06:09 +11:00
renovate[bot]
3d0f438949
Update dependency mypy to v1.14.0 2024-12-21 01:38:05 +00:00
Andrew Murray
cf4110ff06
Replace constants with enums (#8611)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-12-20 15:55:44 +02:00
Andrew Murray
e7e5420e0a
Merge pull request #8612 from radarhere/webp
Updated libwebp to 1.5.0
2024-12-20 23:42:02 +11:00
Andrew Murray
0e80a5a88f
Merge branch 'main' into webp 2024-12-20 20:33:18 +11:00
Andrew Murray
5bd2f489fa
Install libjpeg-turbo8-dev (#8610)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-12-20 09:44:50 +02:00
Andrew Murray
c6f42cb6a5 Updated libwebp to 1.5.0 2024-12-20 14:46:01 +11:00
Andrew Murray
413cae5a03
Merge branch 'main' into emf_records 2024-12-18 19:01:56 +11:00
Andrew Murray
cbc55c4621
Raise ValueError when WMF inch is zero (#8600)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-12-18 08:08:51 +02:00
Andrew Murray
de8335ba8f
Extract tar files with "data" filter in Windows build scripts (#8606)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-12-18 08:07:34 +02:00
Hugo van Kemenade
feeacf46ad
Merge pull request #8608 from radarhere/libjpeg-turbo
Updated libjpeg-turbo URL
2024-12-18 08:05:13 +02:00
Andrew Murray
962bfc6fd5 Updated libjpeg-turbo URL 2024-12-18 10:39:52 +11:00
Hugo van Kemenade
76919ad962
Merge pull request #8567 from radarhere/winbuild
Derive dir from filename if root is the same in winbuild
2024-12-17 16:11:14 +02:00
Andrew Murray
0ca832cfa5
Merge branch 'main' into xmp 2024-12-17 18:43:00 +11:00
Andrew Murray
88f6be3f19
Merge pull request #8604 from radarhere/libjpeg-turbo
Updated libjpeg-turbo and harfbuzz URLs
2024-12-17 08:24:27 +11:00
Hugo van Kemenade
2c120b53f6
Merge pull request #8579 from radarhere/tiff_debug
Do not describe raw data as a table
2024-12-16 15:16:41 +02:00
Hugo van Kemenade
e40033dfc4
Merge pull request #8494 from radarhere/gif_palette
Improved handling of RGBA palettes when saving GIF images
2024-12-16 15:10:17 +02:00
Andrew Murray
0958114521 Corrected harfbuzz URL 2024-12-16 21:03:33 +11:00
Andrew Murray
5e35ca359c Updated libjpeg-turbo URL 2024-12-16 20:17:36 +11:00
Andrew Murray
935c34a157
Merge branch 'main' into winbuild 2024-12-16 09:55:29 +11:00
Hugo van Kemenade
6e45e71052
Merge pull request #8601 from radarhere/zlib 2024-12-15 23:17:17 +02:00
Hugo van Kemenade
c2f21a233f
Merge pull request #8599 from radarhere/releasenotes 2024-12-15 17:07:13 +02:00
Andrew Murray
7f6ebfb8c5 Added release notes for #8500 2024-12-15 23:40:38 +11:00
Andrew Murray
6373e8bcc4 Use .tar.gz zlib to match macOS and Linux 2024-12-15 22:58:35 +11:00
Andrew Murray
62d8ccc015 Derive dir from filename if root is the same 2024-12-15 12:11:41 +11:00
Andrew Murray
a7338f8ce7
Merge pull request #8500 from nulano/zlib-ng
Use zlib-ng instead of zlib
2024-12-15 07:01:42 +11:00
Hugo van Kemenade
c79aab7cc9
Merge pull request #8598 from radarhere/libxau
Updated libXau to 1.0.12
2024-12-14 11:50:32 +02:00
Andrew Murray
01bc487ff4
Merge branch 'main' into zlib-ng 2024-12-14 19:06:00 +11:00
Andrew Murray
0e5f5fcb29 Updated libXau to 1.0.12 2024-12-14 16:33:20 +11:00
Hugo van Kemenade
bce51744f6
Merge pull request #8596 from radarhere/macos
Test libjpeg-turbo on macOS
2024-12-13 17:18:47 +02:00
Andrew Murray
642b44c315 Test libjpeg-turbo on macOS 2024-12-14 01:25:28 +11:00
Hugo van Kemenade
bc8e581efd
Merge pull request #8593 from radarhere/brew
Do not attempt to install cmake if it is already present
2024-12-13 13:37:56 +02:00
Hugo van Kemenade
0a513879d1
Merge pull request #8595 from radarhere/libjpeg-turbo
Updated libjpeg-turbo to 3.1.0
2024-12-13 13:37:05 +02:00
Andrew Murray
e361930936 Updated libjpeg-turbo to 3.1.0 2024-12-13 18:56:59 +11:00
Andrew Murray
9ed96704d3 Do not attempt to install cmake if it is already present 2024-12-13 07:28:48 +11:00
Andrew Murray
522505b714 Support saving CMYK JPEG2000 images 2024-12-10 18:33:12 +11:00
Hugo van Kemenade
d66c51a356
Merge pull request #8533 from radarhere/harfbuzz_10_1_0
Updated harfbuzz to 10.1.0
2024-12-10 09:29:30 +02:00
Hugo van Kemenade
335dd2aa7c
Merge pull request #8591 from radarhere/openjpeg_253
Updated openjpeg to 2.5.3
2024-12-10 09:29:16 +02:00
Andrew Murray
2215eaf21d Updated openjpeg to 2.5.3 2024-12-10 06:25:48 +11:00
Jeffrey A. Clark
90591d75db
Merge pull request #8586 from python-pillow/pre-commit-ci-update-config
Replace python-pillow.org with python-pillow.github.io
2024-12-07 09:02:47 -05:00
Hugo van Kemenade
c5474ed433 Replace python-pillow.org with python-pillow.github.io 2024-12-06 20:26:07 +02:00
Hugo van Kemenade
76356c5fe4
Merge pull request #8582 from radarhere/imagefile_tile
ImageFile tile is never None
2024-12-03 13:11:43 +02:00
Andrew Murray
3ce33a253a self.tile is not None 2024-12-03 20:14:03 +11:00
Hugo van Kemenade
78504658b1
Merge pull request #8580 from python-pillow/renovate/cibuildwheel-2.x 2024-12-03 09:06:43 +02:00
Andrew Murray
f4a9304bb3 Use CIBW_ENABLE 2024-12-03 13:35:00 +11:00
renovate[bot]
80c562573a
Update dependency cibuildwheel to v2.22.0 2024-12-03 02:28:52 +00:00
Andrew Murray
c16ae6fefa Do not describe raw data as a table 2024-12-03 09:19:26 +11:00
Andrew Murray
595bdf2057
Merge pull request #8578 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-12-03 09:07:41 +11:00
Hugo van Kemenade
0ab21dff1e Fix new Ruff errors 2024-12-02 20:29:38 +02:00
pre-commit-ci[bot]
0000729f2a
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.1)
- [github.com/PyCQA/bandit: 1.7.10 → 1.8.0](https://github.com/PyCQA/bandit/compare/1.7.10...1.8.0)
- [github.com/pre-commit/mirrors-clang-format: v19.1.3 → v19.1.4](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.3...v19.1.4)
- [github.com/python-jsonschema/check-jsonschema: 0.29.4 → 0.30.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.4...0.30.0)
- [github.com/abravalheri/validate-pyproject: v0.22 → v0.23](https://github.com/abravalheri/validate-pyproject/compare/v0.22...v0.23)
2024-12-02 17:34:54 +00:00
Hugo van Kemenade
d4383f923d
Merge pull request #8577 from hugovk/copyright-years 2024-12-02 09:05:43 +02:00
Hugo van Kemenade
513fe2ca2d Only use start year in copyright, remove end years 2024-12-01 23:15:54 +02:00
Hugo van Kemenade
32ee1060d1
Merge pull request #8576 from radarhere/config 2024-11-30 19:02:54 +02:00
Andrew Murray
c61e5502da
Merge pull request #8575 from radarhere/mingw
Python 3.12 is tested on MinGW
2024-11-30 23:18:34 +11:00
Andrew Murray
1d15ce8c49 Updated build option error messages 2024-11-30 23:17:42 +11:00
Andrew Murray
1fab591f42 Python 3.12 is tested on MinGW 2024-11-30 21:17:31 +11:00
Hugo van Kemenade
c388ad06a4
Merge pull request #8574 from radarhere/raqm
Use brew formula to install libraqm
2024-11-30 10:29:20 +02:00
Andrew Murray
10527918e3 Use brew formula to install libraqm 2024-11-29 17:13:07 +11:00
Andrew Murray
1c152258c3
Merge pull request #8560 from Knio/tom/bufferedio
Fix file position desync when calling into libtiff
2024-11-29 13:37:33 +11:00
Andrew Murray
b1a9199e44
Merge pull request #8571 from radarhere/changes
Added link to GitHub releases in CHANGES
2024-11-29 08:42:21 +11:00
Andrew Murray
4986609938 Use zlib-ng on macOS 2024-11-28 21:31:54 +11:00
Andrew Murray
7ff4bcb39d
Merge pull request #27 from hugovk/radarhere-changes
Update/remove references to CHANGES.rst
2024-11-28 19:35:41 +11:00
Hugo van Kemenade
c36a5b669b Update/remove references to CHANGES.rst 2024-11-28 10:29:05 +02:00
Andrew Murray
02250e81b7 Added link to GitHub releases 2024-11-28 07:58:10 +11:00
Andrew Murray
b25a5a4072
Merge pull request #8570 from hugovk/release-drafter-uncategorised-last
Release drafter: move removals, deprecations, documentation up, and uncategorised changes last
2024-11-27 09:11:00 +11:00
Hugo van Kemenade
5174c596ca Release drafter: move removals, deprecations, documentation up, and uncategorised changes last 2024-11-26 22:06:47 +02:00
Andrew Murray
7dcf4d8ab3 Added logging to fixIFD() 2024-11-25 19:41:41 +11:00
Hugo van Kemenade
4304414473
Merge pull request #8566 from radarhere/cmake_wheel
Do not attempt to install cmake a second time when building macOS or Linux wheels
2024-11-25 09:11:07 +02:00
Andrew Murray
540a0b73a7 Use installed cmake 2024-11-25 12:15:25 +11:00
Hugo van Kemenade
d7ffb39731
Merge pull request #8565 from hugovk/Quansight-Labs/setup-python 2024-11-24 15:02:24 +02:00
Hugo van Kemenade
16e409a8d2 Test 3.13t (free-threaded) from Quansight-Labs/setup-python on Linux/macOS 2024-11-24 13:46:28 +02:00
Hugo van Kemenade
e4b07cce98
Merge pull request #8557 from python-pillow/renovate/github-actions 2024-11-23 18:46:55 +02:00
Andrew Murray
dab795c808
Merge branch 'main' into zlib-ng 2024-11-22 18:27:44 +11:00
Andrew Murray
8a82e0c66b
Merge branch 'main' into renovate/github-actions 2024-11-22 18:26:28 +11:00
Hugo van Kemenade
09d75436f3
Merge pull request #8562 from radarhere/mingw_packages 2024-11-22 08:40:05 +02:00
Andrew Murray
30f03b2bff Removed SETUPTOOLS_USE_DISTUTILS="stdlib" 2024-11-22 11:05:33 +11:00
Andrew Murray
9c3d8fb581 Do not install Pyroma, to use only system packages 2024-11-22 11:02:50 +11:00
Andrew Murray
69c9a7ffcf Use zlib-ng on Linux 2024-11-21 20:39:08 +01:00
Andrew Murray
bfe40b5129 Prevent Cygwin bash from being used by codecov-action 2024-11-21 19:24:08 +11:00
Tom Flanagan
9fd4450281
Merge pull request #1 from radarhere/tom/bufferedio
Moved test
2024-11-20 05:22:49 -08:00
Tom Flanagan
82dfbc35b1
Update src/PIL/TiffImagePlugin.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-11-20 05:21:14 -08:00
Andrew Murray
925db45526 Moved test 2024-11-20 22:40:29 +11:00
Andrew Murray
cb1653f627 Updated comment 2024-11-20 22:33:23 +11:00
pre-commit-ci[bot]
44cc0bebb8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-11-20 05:52:53 +00:00
Tom Flanagan
c7a9582eab Fix file position desync when calling into libtiff 2024-11-19 21:49:33 -08:00
Andrew Murray
e02e4aaf1d Updated harfbuzz to 10.1.0 2024-11-19 07:12:54 +11:00
Andrew Murray
3f5f3bb07b
Merge branch 'main' into zlib-ng 2024-11-18 22:25:19 +11:00
Hugo van Kemenade
0995305eb4
Merge pull request #8497 from freakboy3742/homebrew-isolation 2024-11-18 12:17:40 +02:00
Russell Keith-Magee
96b898c826
A couple more cleanups from code review. 2024-11-18 09:56:45 +08:00
Andrew Murray
c70dacff62 Updated from deprecated "file" to "files" 2024-11-16 21:44:00 +11:00
renovate[bot]
6136a92d06
Update codecov/codecov-action action to v5 2024-11-16 09:48:28 +00:00
Russell Keith-Magee
54f23345d2
More tweaks from code review. 2024-11-16 09:58:29 +08:00
Andrew Murray
185a03f1a2 Do not create new image when exif_transpose() is used in place 2024-11-16 12:05:06 +11:00
Andrew Murray
84f5c7e5ba Added default value for _Tile offset 2024-11-13 22:53:29 +11:00
Andrew Murray
871963b8dd Replaced tuple args with mode string where equivalent 2024-11-13 22:53:18 +11:00
Andrew Murray
48c7eb22c0 Added default value for _Tile args 2024-11-13 22:45:52 +11:00
Russell Keith-Magee
0e3eb70ea0
Merge pull request #1 from radarhere/homebrew-isolation
Disable platform guessing instead of adding dependencies-prefix
2024-11-13 11:49:37 +08:00
Russell Keith-Magee
9dc690427f
Correct the lookup of libfribidi on x86 macOS installs. 2024-11-13 11:03:26 +08:00
Andrew Murray
6fa775e324 Platform guessing affects more than just Linux 2024-11-12 22:46:24 +11:00
Andrew Murray
378df7a5b2 Disable platform guessing instead of adding dependencies-prefix 2024-11-12 22:41:57 +11:00
Andrew Murray
5bff2f3b28 Update CHANGES.rst [ci skip] 2024-11-10 21:32:54 +11:00
Hugo van Kemenade
b7bbcfbffb
Merge pull request #8545 from radarhere/realpath 2024-11-10 11:51:57 +02:00
Andrew Murray
2303018ebf Removed use of os.path.realpath 2024-11-09 20:06:33 +11:00
mergify[bot]
ab496d04ce
Merge pull request #8544 from radarhere/type_hints_quotes
Removed quotes after dropping support for Python 3.8
2024-11-09 08:20:12 +00:00
Andrew Murray
7674b1a07a Removed quotes after dropping support for Python 3.8 2024-11-09 18:43:12 +11:00
Andrew Murray
9f09d48f37 Update CHANGES.rst [ci skip] 2024-11-09 18:20:52 +11:00
Andrew Murray
a01c31a1a3
Merge pull request #8519 from cubanpit/patch-1
Allow linking to zlib import library on Windows
2024-11-09 14:08:44 +11:00
Russell Keith-Magee
681a03b1c3
Apply suggestions from code review
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-11-09 10:29:29 +08:00
Hugo van Kemenade
d642d2c36f
Merge pull request #8541 from radarhere/gcc 2024-11-08 16:23:15 +02:00
Andrew Murray
0a5b0f29e5 Run gcc problem matcher on Python 3.13 2024-11-09 00:18:59 +11:00
Andrew Murray
c5e89ee914
Merge pull request #26 from nulano/imagegrab-dynamic-link
Fix GetWindowDpiAwarenessContext NULL check
2024-11-08 11:01:39 +11:00
Russell Keith-Magee
4e35852ccc
Correct typo in comment.
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-11-08 05:34:35 +08:00
Andrew Murray
acba5c47f8 Lint fix 2024-11-08 08:26:16 +11:00
Ondrej Baranovič
a6c941ac2c
Do not load GetWindowDpiAwarenessContext until its needed
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-11-07 22:22:02 +01:00
Nulano
4b8867069b Fix GetWindowDpiAwarenessContext NULL check 2024-11-07 22:06:28 +01:00
pre-commit-ci[bot]
288d77efd6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-11-07 20:46:01 +00:00
Andrew Murray
a44b3067b0
Fallback to PER_MONITOR_AWARE if GetWindowDpiAwarenessContext is not available
Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
2024-11-08 07:45:29 +11:00
Andrew Murray
7763350f07 Fallback to PER_MONITOR_AWARE 2024-11-08 07:30:09 +11:00
Hugo van Kemenade
09bf28e9d7
Update platform support
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-11-07 15:46:08 +02:00
Hugo van Kemenade
a262b1991b
Update winbuild/README.md
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-11-07 12:54:28 +02:00
Andrew Murray
48f183802a
Merge branch 'main' into gha-windows-32-bit 2024-11-07 10:14:04 +11:00
Andrew Murray
2e7da079cd
Merge pull request #8514 from hugovk/tests-trove-extra
Add trove-classifiers>=2024.10.12 to 'tests' extra and use for Windows CI
2024-11-07 10:11:13 +11:00
Hugo van Kemenade
e5f2874e26
Require coverage>=7.4.2 (#129) 2024-11-06 23:51:30 +02:00
Andrew Murray
042f3ff083 Require coverage>=7.4.2 2024-11-07 07:52:18 +11:00
Andrew Murray
b11aec3963
Merge branch 'main' into tests-trove-extra 2024-11-07 07:50:51 +11:00
Hugo van Kemenade
2e09d7a910
Merge pull request #8538 from radarhere/macos 2024-11-06 13:43:37 +02:00
Andrew Murray
b0345c1c7b Updated macOS tested Pillow versions 2024-11-06 22:08:22 +11:00
Russell Keith-Magee
904416bda1
Merge branch 'main' into homebrew-isolation 2024-11-06 14:33:25 +08:00
Russell Keith-Magee
e82b5398e7
Correct handling of vendored fribidi. 2024-11-06 14:12:51 +08:00
Pietro F. Fontana
a1d862f1d6
Be more specific in comment
Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
2024-11-05 15:39:03 +01:00
Andrew Murray
3cdaee45f5 Raise UnidentifiedImageError when opening TIFF without dimensions 2024-11-05 21:20:20 +11:00
Hugo van Kemenade
7fe56d62c6
Merge pull request #8534 from radarhere/parse 2024-11-05 12:15:38 +02:00
Andrew Murray
f68219713c
Merge branch 'main' into imagegrab 2024-11-05 21:15:08 +11:00
Hugo van Kemenade
8561875b2d
Merge pull request #8532 from radarhere/type_hint 2024-11-05 12:12:43 +02:00
Andrew Murray
48db4a1d4d Use test image filename 2024-11-05 19:40:03 +11:00
Andrew Murray
9622266c2a Use DPI awareness from window 2024-11-05 18:33:25 +11:00
Andrew Murray
2d23a84049 Fixed type hint 2024-11-05 17:18:46 +11:00
Andrew Murray
28e5b929f8 Test 0 2024-11-05 08:40:09 +11:00
Andrew Murray
b6413cd588 Cast to uint64_t 2024-11-05 07:16:49 +11:00
Andrew Murray
607acbf95e Allow window to be supplied for ImageGrab.grab() on Windows 2024-11-05 07:05:39 +11:00
Hugo van Kemenade
5628213ab0 Upgrade pip for all 2024-11-04 21:17:47 +02:00
mergify[bot]
82199efbf7
Merge pull request #8531 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-11-04 18:26:52 +00:00
pre-commit-ci[bot]
4b7f6a6eb0
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.7.2)
- [github.com/psf/black-pre-commit-mirror: 24.8.0 → 24.10.0](https://github.com/psf/black-pre-commit-mirror/compare/24.8.0...24.10.0)
- [github.com/pre-commit/mirrors-clang-format: v19.1.1 → v19.1.3](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.1...v19.1.3)
- [github.com/python-jsonschema/check-jsonschema: 0.29.3 → 0.29.4](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.3...0.29.4)
- [github.com/tox-dev/pyproject-fmt: 2.2.4 → v2.5.0](https://github.com/tox-dev/pyproject-fmt/compare/2.2.4...v2.5.0)
- [github.com/abravalheri/validate-pyproject: v0.20.2 → v0.22](https://github.com/abravalheri/validate-pyproject/compare/v0.20.2...v0.22)
2024-11-04 17:35:35 +00:00
Andrew Murray
37679c8673 Pass IFDs to libtiff as TIFF_LONG8 2024-11-04 20:55:00 +11:00
Hugo van Kemenade
a60981650b
Merge pull request #8527 from python-pillow/renovate/migrate-config 2024-11-04 08:45:59 +02:00
Andrew Murray
89735266ad
Merge pull request #8526 from hugovk/zizmor
Apply security fixes to GitHub Actions
2024-11-04 16:34:23 +11:00
renovate[bot]
924df0ac5c
Migrate config .github/renovate.json 2024-11-03 23:22:57 +00:00
Hugo van Kemenade
d3db931f21 Fix error[excessive-permissions]: overly broad workflow or job-level permissions 2024-11-02 23:31:21 +02:00
Hugo van Kemenade
9faf598c89 Fix warning[artipacked]: credential persistence through GitHub Actions artifacts 2024-11-02 23:29:56 +02:00
Hugo van Kemenade
1c4f29f2ce Test the oldest Python on 32-bit Windows 2019 2024-11-02 16:28:07 +02:00
Hugo van Kemenade
327e13ffd0 Stop testing on AppVeyor 2024-11-02 15:41:57 +02:00
Hugo van Kemenade
5771f0ec37
Merge pull request #8523 from nulano/winarm64 2024-11-02 15:36:05 +02:00
Ondrej Baranovič
6fe7160cb9
Update Windows 11 Arm64 tested versions 2024-11-02 14:03:53 +01:00
Hugo van Kemenade
48a4ee9904
Merge pull request #8521 from hugovk/gcov 2024-11-02 12:55:48 +02:00
Hugo van Kemenade
141e8d2546 Remove unused 'gcov: true' for codecov-action@v4 2024-11-02 12:08:23 +02:00
Andrew Murray
a9e110e64a
Merge pull request #8520 from radarhere/fedora
Added Fedora 41
2024-11-02 19:45:55 +11:00
Andrew Murray
71016f23b4 Added Fedora 41 2024-11-02 17:51:01 +11:00
Pietro F. Fontana
aae90c3c01
Allow linking to shared zlib
If compiled as shared library zlib produces `zlib1.dll` and `zdll.lib`.
2024-11-01 15:42:08 +01:00
Russell Keith-Magee
51e3623066
Revert x86_64 homebrew location change (with explanation). 2024-10-31 09:54:02 +08:00
Russell Keith-Magee
01270b5859
Use the intended entry point for the x86_64 brew binary.
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-31 06:27:54 +08:00
Hugo van Kemenade
0bf15f0f2a Upgrade pip 2024-10-30 22:24:37 +02:00
Hugo van Kemenade
67c2e04f70 Add trove-classifiers>=2024.10.12 to 'tests' extra and use for Windows CI 2024-10-30 08:37:19 +02:00
Russell Keith-Magee
96ae15c5cd
Merge branch 'main' into homebrew-isolation 2024-10-30 06:25:08 +08:00
Russell Keith-Magee
c6912f81ff
Corrected typo in code comment.
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-30 05:43:23 +08:00
Hugo van Kemenade
16372dd951
Merge pull request #8512 from radarhere/qtables 2024-10-29 17:50:25 +02:00
Andrew Murray
80cf74030d
Removed fixture
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-10-29 23:13:01 +11:00
Andrew Murray
467f12022e
Merge branch 'main' into homebrew-isolation 2024-10-29 22:38:27 +11:00
Andrew Murray
624848ff97 Do not repeatedly save to the same path 2024-10-29 22:21:53 +11:00
Andrew Murray
2d1d801ec0 Update CHANGES.rst [ci skip] 2024-10-29 22:15:56 +11:00
Hugo van Kemenade
e214dbf75c
Merge pull request #8509 from radarhere/toqpixmap
Detach PyQt6 QPixmap instance before returning
2024-10-29 13:06:37 +02:00
Hugo van Kemenade
0fd608626a
Merge pull request #8511 from radarhere/multibuild_lib64
Upgraded multibuild to remove openjpeg lib64 copy
2024-10-29 13:04:24 +02:00
Russell Keith-Magee
6d137043f7
Remove stray debug. 2024-10-29 10:01:46 +08:00
Russell Keith-Magee
d1a4f8029b
Don't use multibuild variables before invoking multibuild. 2024-10-29 09:54:15 +08:00
Russell Keith-Magee
ec214e4d7c
Can't check IS_MACOS until common_utils is invoked. 2024-10-29 09:39:58 +08:00
Russell Keith-Magee
72d81e24a8
Simplify Linux config by correcting a logic error in macOS config. 2024-10-29 09:25:47 +08:00
Russell Keith-Magee
c74a5bdd85
Correct paths used for Linux build. 2024-10-29 09:02:05 +08:00
Russell Keith-Magee
8308bf361e
Bump multibuild to include more cmake changes. 2024-10-29 07:48:07 +08:00
Russell Keith-Magee
08554684b3
Revert fribidi/raqm changes for macOS builds. 2024-10-29 07:48:07 +08:00
Andrew Murray
5ab79bcc1f
Merge branch 'main' into zlib-ng 2024-10-29 09:53:02 +11:00
Andrew Murray
3e4be4b235
Merge branch 'main' into homebrew-isolation 2024-10-29 09:52:29 +11:00
Andrew Murray
e5706a590b Upgraded multibuild to remove openjpeg lib64 copy 2024-10-29 09:04:06 +11:00
Hugo van Kemenade
bdd0b8630c
Merge pull request #8502 from radarhere/libdeflate 2024-10-28 16:43:09 +02:00
Andrew Murray
73600eea94 Detach PyQt6 QPixmap instance before returning 2024-10-29 00:34:24 +11:00
Andrew Murray
9a4b3e05d6
Merge pull request #8496 from lysnikolaou/fix-font-face-threading-crash
Fix SEGFAULT from calling FT_New_Face/FT_Done_Face in multiple threads
2024-10-27 08:38:53 +11:00
Andrew Murray
b4ba466541 Do not skip failing records on 32-bit 2024-10-27 07:03:35 +11:00
Andrew Murray
8c1dc0de3c
Merge branch 'main' into emf_records 2024-10-26 22:01:47 +11:00
Andrew Murray
29cdbce39e Update CHANGES.rst [ci skip] 2024-10-26 21:13:01 +11:00
Hugo van Kemenade
23023dee8d
Merge pull request #8485 from radarhere/emf 2024-10-26 12:45:52 +03:00
Andrew Murray
ed910a68d6 Only replace version suffix if zlib-ng is present 2024-10-26 11:23:49 +02:00
Andrew Murray
1654eeacba
Merge pull request #8484 from radarhere/fixture
Use fixture to re-open image for each JPEG2000 test
2024-10-26 19:42:59 +11:00
Andrew Murray
f92599aa93 Renamed fixture 2024-10-26 19:05:16 +11:00
Andrew Murray
ce4059171c Skip failing records when rendering 2024-10-26 18:41:05 +11:00
Hugo van Kemenade
81a3bf5f58
Merge pull request #8504 from radarhere/mpo
Move MPO into "Fully supported formats"
2024-10-26 09:43:02 +03:00
Hugo van Kemenade
35ddbb48c3
Merge pull request #8505 from radarhere/warnings
Fixed catching warnings
2024-10-26 09:41:09 +03:00
Andrew Murray
413bbb31c9 Fixed catching warnings 2024-10-26 16:15:46 +11:00
Andrew Murray
e1f4b5a68f Move MPO into "Fully supported formats" 2024-10-26 15:10:41 +11:00
Andrew Murray
a43e5bb735 brew remove libdeflate 2024-10-26 14:26:47 +11:00
Andrew Murray
c07e089fd1
Merge branch 'main' into zlib-ng 2024-10-26 11:53:47 +11:00
Andrew Murray
64eed14867
Merge pull request #8498 from radarhere/winbuild
Added filename placeholder in winbuild URL
2024-10-26 11:52:33 +11:00
Nulano
7885066e5f PIL.features: Add a compile-time zlib-ng feature flag and version number 2024-10-25 21:30:22 +02:00
Nulano
3e0849bfb5 winbuild: Replace zlib with zlib-ng built with CMake 2024-10-25 20:35:17 +02:00
Lysandros Nikolaou
bb3515d649
Make PyMutex static and get rid of initialization 2024-10-25 17:32:29 +02:00
Andrew Murray
4b9399f8bf Use register_handler 2024-10-25 22:00:45 +11:00
Russell Keith-Magee
43c34fc0a5
Copy manylinux lib64 files from the correct built prefix. 2024-10-25 17:20:34 +08:00
Andrew Murray
fa7678987e Simplified code 2024-10-25 19:56:36 +11:00
Andrew Murray
c46946f3a4 Added filename placeholder in URL 2024-10-25 19:13:39 +11:00
Russell Keith-Magee
0961d3d22b
Possible fix for linux build failures. 2024-10-25 16:10:29 +08:00
Russell Keith-Magee
140a06e0fd
Explicitly disable libdeflate on libtiff. 2024-10-25 16:04:56 +08:00
Russell Keith-Magee
5a8373e527
Correct a dumb pip invocation error. 2024-10-25 14:47:51 +08:00
Russell Keith-Magee
06dbfedb0f
Bump the multibuild version to fix jpeg-turbo issue. 2024-10-25 13:51:37 +08:00
Russell Keith-Magee
00809a2551
Tweaks to ensure isolation from Homebrew on x86_64. 2024-10-25 13:42:46 +08:00
Russell Keith-Magee
fc35fcc5ea
Cleanups and typos identified by code review. 2024-10-25 10:55:30 +08:00
Russell Keith-Magee
0fe55d6115
Isolate macOS build from Homebrew. 2024-10-25 09:53:06 +08: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
Andrew Murray
8af2d7640e Pass palette mode to putpalette 2024-10-24 23:26:13 +11:00
Hugo van Kemenade
822ec3d05d
Merge pull request #8491 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.13.0
2024-10-23 07:30:34 +03:00
renovate[bot]
6a55f2df03
Update dependency mypy to v1.13.0 2024-10-23 02:36:15 +00:00
Hugo van Kemenade
31b82ee297
Merge pull request #8490 from radarhere/license 2024-10-22 13:05:06 +03:00
Andrew Murray
22c05e232c Update license to MIT-CMU 2024-10-22 17:56:02 +11:00
Andrew Murray
ccd4683f45
Merge pull request #8487 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.12.1
2024-10-21 12:11:35 +11:00
renovate[bot]
beb32bbb1f
Update dependency mypy to v1.12.1 2024-10-21 00:18:00 +00:00
Andrew Murray
55579084cd Corrected EMF DPI 2024-10-19 20:40:13 +11:00
Hugo van Kemenade
331e4e7517
Merge pull request #8482 from radarhere/imagefile 2024-10-18 14:33:26 +03:00
Andrew Murray
5b06597075 Use fixture to re-open image for each test 2024-10-18 19:29:22 +11:00
Andrew Murray
203ca12626 Allow encoderinfo to be set for appended images 2024-10-18 19:09:22 +11:00
Andrew Murray
98f975dbbe Do not save XMP from info 2024-10-18 18:56:23 +11:00
Andrew Murray
a337138f92 Updated type hint 2024-10-18 08:32:14 +11:00
Andrew Murray
d59b169ed2 Update CHANGES.rst [ci skip] 2024-10-17 23:10:48 +11:00
Hugo van Kemenade
6e2ebaae2d
Merge pull request #8474 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.12.0
2024-10-17 08:16:14 +03:00
Andrew Murray
0beb2228f9 Include JpegImageFile layers in state 2024-10-17 12:44:25 +11:00
Andrew Murray
4611a24661 Fix IFDRational with a zero denominator 2024-10-17 10:58:48 +11:00
Andrew Murray
5ff20273d9 Updated type hints 2024-10-17 10:46:26 +11:00
renovate[bot]
c252b708ee
Update dependency mypy to v1.12.0 2024-10-16 21:41:38 +00:00
Andrew Murray
11c654c187 Update CHANGES.rst [ci skip] 2024-10-16 23:07:35 +11:00
mergify[bot]
1c11d4581c
Merge pull request #8469 from radarhere/disable
Fixed disabling a feature during install
2024-10-16 11:38:07 +00:00
Andrew Murray
7c194b54ef Fixed disabling a feature 2024-10-16 21:37:14 +11:00
Hugo van Kemenade
96fb0e63ea
Merge pull request #8467 from radarhere/pypy
Skip PyPy3.9 wheels
2024-10-16 08:27:11 +03:00
Andrew Murray
8393972c35 Skip PyPy3.9 wheels 2024-10-16 09:56:33 +11:00
Andrew Murray
37e56350a3
Merge pull request #8466 from radarhere/fedora
Removed Fedora 39
2024-10-16 09:14:28 +11:00
Hugo van Kemenade
304732f75e
Merge pull request #8465 from radarhere/tile 2024-10-15 18:05:37 +03:00
Hugo van Kemenade
455e6da119 11.1.0.dev0 version bump 2024-10-15 17:30:25 +03:00
Andrew Murray
a433f24f0b tile is already an empty list 2024-10-15 22:14:26 +11:00
Hugo van Kemenade
204aae6682 11.0.0 version bump 2024-10-15 08:55:00 +03:00
Andrew Murray
3911afbc97 Removed Fedora 39 2024-10-14 16:56:48 +11:00
Andrew Murray
f2cc87b1f0 Update CHANGES.rst [ci skip] 2024-10-13 11:19:41 +11:00
Andrew Murray
c855e8e5f9
Merge pull request #8464 from radarhere/imagemath_type_hint
Added type hints to remaining ImageMath methods
2024-10-13 11:00:15 +11:00
Andrew Murray
dc3751599f
Merge pull request #8463 from hugovk/update-3.13-date
Update Python 3.13 release date
2024-10-13 09:32:26 +11:00
Hugo van Kemenade
c3d81d6375 Update Python 3.13 release date 2024-10-12 23:52:57 +03:00
Andrew Murray
a60610c93f Added type hints 2024-10-13 07:42:17 +11:00
Andrew Murray
a5c58f2182
Merge pull request #8460 from hugovk/mit-cmu
Update licence to MIT-CMU
2024-10-13 07:10:09 +11:00
Hugo van Kemenade
e74994ed37 Update licence to MIT-CMU 2024-10-12 16:50:36 +03:00
Andrew Murray
b5e1115bf2 Update CHANGES.rst [ci skip] 2024-10-12 21:10:47 +11:00
Hugo van Kemenade
686b5e2cb4
Merge pull request #8392 from radarhere/tiff_seek
Do not create core image in TIFF seek()
2024-10-12 11:46:36 +03:00
Hugo van Kemenade
914f7e1c58
Merge pull request #8365 from radarhere/openjpeg
Removed custom build_openjpeg
2024-10-12 11:46:01 +03:00
Hugo van Kemenade
b0d79c87f1
Merge pull request #8197 from radarhere/imagecms_core
Conditionally define ImageCms type hint to avoid requiring core
2024-10-12 11:30:17 +03:00
Hugo van Kemenade
fd74857bcf
Merge pull request #8417 from radarhere/appendingTiffWriter
Support writing LONG8 offsets in AppendingTiffWriter
2024-10-12 11:29:09 +03:00
Hugo van Kemenade
3dded83076
Merge pull request #8461 from radarhere/undone
Use ImageFile.MAXBLOCK when saving TIFF images
2024-10-12 11:25:55 +03:00
Andrew Murray
00c5989d4e Use MAXBLOCK 2024-10-12 13:44:48 +11:00
Hugo van Kemenade
08b561e25d
Merge pull request #8459 from radarhere/webp 2024-10-11 14:59:26 +03:00
Andrew Murray
e93dcc1578 Update CHANGES.rst [ci skip] 2024-10-11 21:09:52 +11:00
Hugo van Kemenade
ecdd519a0e
Merge pull request #8458 from radarhere/dup 2024-10-11 13:07:44 +03:00
Andrew Murray
afbf45055a Always raise warnings for deprecated feature checks 2024-10-11 20:59:15 +11:00
Andrew Murray
7edf952832 Do not close provided file handles with libtiff 2024-10-11 19:37:56 +11:00
Hugo van Kemenade
3d9c05c224
Merge pull request #8457 from hugovk/sphinx-8.1 2024-10-11 10:58:08 +03:00
Hugo van Kemenade
fdd5d0c0fb Use CVE and CWE roles from Sphinx 8.1 2024-10-10 21:35:48 +03:00
Andrew Murray
97438cb8fd Update CHANGES.rst [ci skip] 2024-10-10 22:50:26 +11:00
Andrew Murray
d99229e4d1
Merge pull request #8455 from radarhere/wheels 2024-10-10 22:18:49 +11:00
Andrew Murray
7777260b6b
Merge pull request #8438 from radarhere/filter 2024-10-10 21:50:51 +11:00
Andrew Murray
ff245fcb40 Revert "Skip QEMU-emulated wheels on workflow dispatch event"
This reverts commit f39ca5db5a.
2024-10-10 19:43:11 +11:00
mergify[bot]
dab9559c04
Merge pull request #8453 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.21.3
2024-10-09 10:07:27 +00:00
renovate[bot]
e37209ace5
Update dependency cibuildwheel to v2.21.3 2024-10-09 09:11:46 +00:00
Andrew Murray
a9b9a63614 Do not create core image in seek(), when load() might not run 2024-10-08 20:48:32 +11:00
Andrew Murray
949079bf36
Merge pull request #8448 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-10-08 08:28:53 +11:00
pre-commit-ci[bot]
a609d65b33 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-07 17:56:23 +00:00
pre-commit-ci[bot]
ef47d6e5e5
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.3...v0.6.9)
- [github.com/PyCQA/bandit: 1.7.9 → 1.7.10](https://github.com/PyCQA/bandit/compare/1.7.9...1.7.10)
- [github.com/pre-commit/mirrors-clang-format: v18.1.8 → v19.1.1](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.8...v19.1.1)
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
- [github.com/python-jsonschema/check-jsonschema: 0.29.2 → 0.29.3](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.2...0.29.3)
- [github.com/sphinx-contrib/sphinx-lint: v0.9.1 → v1.0.0](https://github.com/sphinx-contrib/sphinx-lint/compare/v0.9.1...v1.0.0)
- [github.com/tox-dev/pyproject-fmt: 2.2.1 → 2.2.4](https://github.com/tox-dev/pyproject-fmt/compare/2.2.1...2.2.4)
- [github.com/abravalheri/validate-pyproject: v0.19 → v0.20.2](https://github.com/abravalheri/validate-pyproject/compare/v0.19...v0.20.2)
- [github.com/tox-dev/tox-ini-fmt: 1.3.1 → 1.4.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.3.1...1.4.1)
2024-10-07 17:55:54 +00:00
Andrew Murray
7097a9a3b8 Update CHANGES.rst [ci skip] 2024-10-07 22:12:41 +11: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
Alexander Karpinsky
a227f22fd9
Apply suggestions from code review [ci skip]
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-10-07 14:35:25 +04:00
Hugo van Kemenade
029ec8559b
Merge pull request #8445 from radarhere/apply 2024-10-07 12:51:43 +03:00
Hugo van Kemenade
026181ed25
Merge pull request #8447 from radarhere/imagingft_unused 2024-10-07 12:51:25 +03:00
Hugo van Kemenade
f5ce8a9d61
Merge pull request #8446 from radarhere/close 2024-10-07 12:16:17 +03:00
Alexander Karpinsky
8e332eb3b0 Apply suggestions from code review
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-07 13:05:13 +04:00
Andrew Murray
8de66597f9 Removed unused code 2024-10-07 19:17:59 +11:00
Andrew Murray
76dd669e6b Fixed unclosed file warning 2024-10-07 16:50:05 +11:00
Andrew Murray
feeceb9ae6 Simplified code 2024-10-07 15:34:28 +11:00
Andrew Murray
27c1bb2654 Update CHANGES.rst [ci skip] 2024-10-07 07:48:32 +11:00
Hugo van Kemenade
96f1a6e8b1
Merge pull request #8281 from Yay295/eps_test 2024-10-06 15:58:57 +03:00
Hugo van Kemenade
838e0fb1a5
Merge pull request #8443 from radarhere/apng_p_transparency 2024-10-06 15:58:07 +03:00
Andrew Murray
b77cd009e2 Use transparency when combining P frames 2024-10-06 11:30:27 +11:00
Andrew Murray
01bb78a8e7
Merge pull request #8441 from hugovk/attest
Generate and upload attestations to PyPI
2024-10-06 11:11:57 +11:00
Andrew Murray
f3deba0ab6
Merge pull request #8442 from hugovk/appveyor-3.13
Test Python 3.13 on AppVeyor
2024-10-06 10:55:40 +11:00
Hugo van Kemenade
d2dfd126b3
Updated CI target (#128) 2024-10-06 01:04:57 +03:00
Andrew Murray
e2f996e2bd Updated CI target 2024-10-06 08:55:15 +11:00
Andrew Murray
1b57b32caf Test ignoring second ImageData 2024-10-05 16:28:03 -05:00
Hugo van Kemenade
a9cbf6d5a7 Test Python 3.13 on AppVeyor 2024-10-06 00:22:46 +03:00
Andrew Murray
d4fedc852c Rename test image 2024-10-05 08:06:44 -05:00
Yay295
8e6d518ea8
change parameter type from list to tuple
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-05 08:05:00 -05:00
Andrew Murray
418ae7caa2 Support BuiltinFilter for I;16* images 2024-10-05 01:12:51 +10:00
Andrew Murray
07be6fca17 Corrected check for BuiltinFilter 2024-10-04 23:26:54 +10:00
Andrew Murray
51c577df82
Merge pull request #8436 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.21.2
2024-10-03 13:55:35 +10:00
renovate[bot]
33f065eb5e
Update dependency cibuildwheel to v2.21.2 2024-10-03 00:41:31 +00:00
Andrew Murray
c27de88ea6
Merge pull request #8435 from radarhere/cifuzz
Test cifuzz when wheel dependencies change
2024-10-02 20:02:28 +10:00
Andrew Murray
547e7dcc5d Test cifuzz when wheel dependencies change 2024-10-02 19:17:13 +10:00
Hugo van Kemenade
79f95c98d3
Merge pull request #8434 from radarhere/xz
Updated xz to 5.6.3
2024-10-02 09:15:33 +03:00
Andrew Murray
baf2d8160a Updated xz to 5.6.3 2024-10-02 09:48:09 +10:00
Yay295
f9c69deaae
simplify setting self._size
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-01 09:35:22 -05:00
Yay295
c0d04e8b34
use .size instead of ._size
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-01 09:33:33 -05:00
Andrew Murray
84b167dfd5 Update CHANGES.rst [ci skip] 2024-10-01 21:11:56 +10:00
Hugo van Kemenade
0e0cb06a8d
Merge pull request #8431 from radarhere/imageenhance 2024-10-01 13:58:11 +03:00
Hugo van Kemenade
07389b2f18
Merge pull request #8416 from radarhere/compact_within_map 2024-10-01 13:55:50 +03:00
Hugo van Kemenade
c9c8d45898
Merge pull request #8422 from radarhere/resize_i16 2024-10-01 13:55:13 +03:00
Hugo van Kemenade
ea15e0e622
Merge pull request #8413 from radarhere/sgirle_memory 2024-10-01 13:52:22 +03:00
Hugo van Kemenade
747fdf5069
Merge pull request #8402 from radarhere/sgirle 2024-10-01 13:52:08 +03:00
Andrew Murray
f614580a2d
Merge pull request #8430 from python-pillow/renovate/github-actions
Update scientific-python/upload-nightly-action action to v0.6.1
2024-10-01 08:46:37 +10:00
Andrew Murray
749bec097c Do not convert image unnecessarily 2024-10-01 07:11:24 +10:00
renovate[bot]
4bfc77a1b1
Update scientific-python/upload-nightly-action action to v0.6.1 2024-09-30 20:19:02 +00:00
Yay295
782f0e8a5a change "Read" to "Parse" in comment
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-30 08:23:28 -05:00
Yay295
75286a4e40 add some comments 2024-09-30 08:23:28 -05:00
Andrew Murray
f3fe22d2f2 Break if the bit depth or mode id are unknown 2024-09-30 08:23:28 -05:00
Yay295
56e4ad0dea don't name positional arguments 2024-09-30 08:23:28 -05:00
Yay295
6b168a3e2b add EPS test for image with ImageData and BoundingBox (atend) 2024-09-30 08:23:27 -05:00
Yay295
00bbd4a5b9 use "with Image" instead of closing manually 2024-09-30 08:23:27 -05:00
Yay295
3ccecd91ce convert eps using pnmraw instead of ppmraw
This lets Ghostscript choose the best device to use (pbmraw, pgmraw, ppmraw) based on the image data.
2024-09-30 08:23:27 -05:00
Yay295
283b41afa0 test 1.eps size and data 2024-09-30 08:23:26 -05:00
Yay295
6fe4375f28 move eps test images to their own folder
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-09-30 08:23:26 -05:00
Andrew Murray
c6b08ef32c Update CHANGES.rst [ci skip] 2024-09-30 22:13:24 +10:00
Hugo van Kemenade
c5835fe86b
Merge pull request #8427 from radarhere/appveyor 2024-09-30 14:53:20 +03:00
Hugo van Kemenade
4f965289e1
Merge pull request #8429 from radarhere/macos 2024-09-30 14:52:12 +03:00
Hugo van Kemenade
0314bb3331
Merge pull request #8408 from radarhere/fli 2024-09-30 14:50:54 +03:00
Andrew Murray
42ad42c174
Merge branch 'main' into resize_i16 2024-09-30 19:50:26 +10:00
Andrew Murray
a99361a38f Raise an error if path is compacted during mapping 2024-09-30 19:50:08 +10:00
Andrew Murray
851449edfc Free memory on early return 2024-09-30 19:49:13 +10:00
Andrew Murray
fc65e437cf Prevent division by zero 2024-09-30 19:48:53 +10:00
Andrew Murray
cc0b6b9de9 Cast int before potentially exceeding INT_MAX 2024-09-30 19:47:52 +10:00
Andrew Murray
94c3ee6944
Merge branch 'main' into bitmap_buffer 2024-09-30 19:47:11 +10:00
Hugo van Kemenade
7e6e08ea6a
Merge pull request #8428 from radarhere/cifuzz 2024-09-30 12:37:12 +03:00
Andrew Murray
b94c5c5e34 Updated macOS tested Pillow versions 2024-09-30 19:32:21 +10:00
Andrew Murray
7a62c788ed Updated tested Python versions 2024-09-30 19:15:40 +10:00
Andrew Murray
21ab53e0c0 Updated test environment documentation 2024-09-30 12:38:13 +10:00
Hugo van Kemenade
3beac54715
Merge pull request #8425 from python-pillow/renovate/github-actions
Update scientific-python/upload-nightly-action action to v0.6.0
2024-09-29 11:28:16 +00:00
renovate[bot]
3a734b5d4b
Update scientific-python/upload-nightly-action action to v0.6.0 2024-09-29 05:19:39 +00:00
mergify[bot]
c6e07d0272
Merge pull request #8400 from radarhere/geometry
Check image value before use
2024-09-28 23:07:00 +00:00
Hugo van Kemenade
e9f831d3db
Merge branch 'main' into geometry 2024-09-28 15:45:39 -07:00
Andrew Murray
ed143f5fec Update CHANGES.rst [ci skip] 2024-09-29 06:40:50 +10:00
Hugo van Kemenade
a89b3d53ff
Merge pull request #8424 from radarhere/harfbuzz 2024-09-28 09:06:25 -07:00
Hugo van Kemenade
58ef920771
Merge pull request #8420 from radarhere/libimagequant_lib64 2024-09-28 09:05:51 -07:00
Andrew Murray
e976096c2e Allow libimagequant shared library path to change 2024-09-28 20:39:04 +10:00
Andrew Murray
30fca7a1d6 Install meson through pip 2024-09-28 18:38:45 +10:00
Hugo van Kemenade
25592b634e
Merge pull request #8423 from radarhere/lint 2024-09-27 23:50:06 -07:00
Andrew Murray
d33270ab51 Set default resize sampling for I;16* images to BICUBIC 2024-09-28 15:35:42 +10:00
Andrew Murray
2e73ffe703 Exclude multibuild from black and ruff 2024-09-28 15:29:09 +10:00
Andrew Murray
e306546bf1 Use ruff check 2024-09-28 15:16:33 +10:00
Andrew Murray
04a00d273c Support all resampling filters when resizing I;16* images 2024-09-28 14:27:40 +10:00
Andrew Murray
bda62c1ac5 Revert "Temporarily disable cifuzz"
This reverts commit 3146940716.
2024-09-28 12:32:44 +10:00
Hugo van Kemenade
86b42a95d8
Merge pull request #8421 from radarhere/harfbuzz 2024-09-27 16:02:50 -07:00
Andrew Murray
485a062010 Update CHANGES.rst [ci skip] 2024-09-27 23:13:03 +10:00
Andrew Murray
fb8db83122 Updated harfbuzz to 10.0.1 on macOS 2024-09-27 17:35:06 +10:00
Andrew Murray
71da6d8952 Downgrade harfbuzz on OSS Fuzz 2024-09-27 16:37:10 +10:00
Andrew Murray
4ca2b92503 Use $IS_ALPINE instead of $MB_ML_LIBC 2024-09-27 14:59:27 +10:00
Alexander Karpinsky
b9d1768561
Catch AttributeError for BitmapImage.__photo
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-26 16:27:55 +04:00
Alexander Karpinsky
d133199391
Merge pull request #8386 from uploadcare/webp-capsule
Use Capsule for WEBP saving
2024-09-26 14:20:50 +04:00
Hugo van Kemenade
23070b721f
Merge pull request #8419 from radarhere/fribidi 2024-09-25 23:52:45 -07:00
Andrew Murray
d8e3572caa Updated fribidi to 1.0.16 2024-09-26 08:52:29 +10:00
Andrew Murray
7cf351cfc5 Added additional test 2024-09-25 20:37:41 +10:00
Andrew Murray
5d16eb73eb Update CHANGES.rst [ci skip] 2024-09-25 19:07:32 +10:00
Andrew Murray
24e9961c4f Support writing LONG8 offsets 2024-09-25 18:45:16 +10:00
Andrew Murray
0a99d63028 Use field size in AppendingTiffWriter 2024-09-25 18:39:39 +10:00
Andrew Murray
3f24276bf2
Merge pull request #8317 from Yay295/tiff_exif_multistrip
Fixed writing multiple StripOffsets to TIFF
2024-09-25 18:38:19 +10:00
Hugo van Kemenade
c1ba2d9eac
Merge pull request #8414 from radarhere/pypy 2024-09-24 18:07:11 -07:00
Hugo van Kemenade
9e48c271c7
Merge pull request #8415 from radarhere/harfbuzz 2024-09-24 18:06:43 -07:00
Andrew Murray
72144ec530 Updated harfbuzz to 10.0.1 2024-09-25 08:33:18 +10:00
Hugo van Kemenade
55a25aa4b1
Merge pull request #8411 from radarhere/harfbuzz 2024-09-24 14:27:33 -07:00
Andrew Murray
61c83a882c Updated macOS version to 10.15 for PyPy x86-64 2024-09-25 00:00:22 +10:00
Andrew Murray
3f8b496431 Updated harfbuzz to 10.0.0 2024-09-24 09:54:26 +10:00
Hugo van Kemenade
8d0a6d0bbf
Merge pull request #8407 from radarhere/libimagequant_lib64 2024-09-23 16:37:20 -07:00
Andrew Murray
9fe014876a Shared libraries may be located within usr/lib64 2024-09-23 16:56:49 +10:00
Hugo van Kemenade
731bcda904
Merge pull request #8396 from Yay295/common_test_script 2024-09-22 22:58:06 -07:00
Andrew Murray
fcae2f4bdf
Merge branch 'main' into common_test_script 2024-09-23 12:40:52 +10:00
Andrew Murray
e179d04a99
Merge pull request #8403 from nulano/freetype-fix
winbuild: Build freetype.vcxproj to fix passing in custom parameters
2024-09-23 12:39:53 +10:00
Hugo van Kemenade
efd6b84271
Merge pull request #8404 from radarhere/raqm
Updated raqm to 0.10.2
2024-09-22 17:44:00 -07:00
Andrew Murray
8adf15a6ee Updated raqm to 0.10.2 2024-09-23 09:29:16 +10:00
Nulano
6081640aa5 winbuild: Build freetype.vcxproj to fix passing in custom parameters. 2024-09-22 22:46:35 +02:00
Yay295
be3192ecd4 use .ci/test.sh in test-mingw.yml 2024-09-22 11:52:14 -05:00
Yay295
8fa5ba8443 add common windows ci test script 2024-09-22 11:52:11 -05:00
Aleksandr Karpinskii
11bcd5aaa9 Fix hasattr for ImageTk.PhotoImage.__del__ 2024-09-22 13:39:22 +04:00
Alexander Karpinsky
e86e5d7274
Merge pull request #146 from radarhere/webp-capsule
Added WebP saving test
2024-09-22 13:22:30 +04:00
Alexander Karpinsky
87414b3f59
Merge pull request #147 from radarhere/use-ptr
Use getim()
2024-09-22 13:18:59 +04:00
Andrew Murray
9f409e823b Use getim() 2024-09-21 17:09:23 +10:00
Andrew Murray
5d430eab25 Added release notes 2024-09-21 16:24:54 +10:00
Andrew Murray
aa22b24169 Load before trying to catch exceptions 2024-09-21 16:22:50 +10:00
Andrew Murray
75cb1c1b87 Test unsupported image mode 2024-09-21 16:02:23 +10:00
Andrew Murray
83c7043471 Rename variable, since alpha channel is not dropped 2024-09-21 15:54:27 +10:00
Yay295
8b6fa92cc8
rewrite some comments
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-20 08:39:11 -05:00
Andrew Murray
e57da68190 Check image value before use 2024-09-20 19:20:53 +10:00
Hugo van Kemenade
b557876ec3
Merge pull request #8398 from PavlNekrasov/fix/null-check-before-dereference-imIn 2024-09-20 12:19:36 +03:00
Hugo van Kemenade
59a155b12e
Merge pull request #8399 from radarhere/oss_fuzz 2024-09-20 12:19:10 +03:00
Andrew Murray
693a68b2bb Updated link to OSS Fuzz issues 2024-09-20 18:46:47 +10:00
pre-commit-ci[bot]
9424b1a892 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-09-19 19:59:15 +00:00
PavlNekrasov
46f2fa17be
fix dereference before checking for NULL in the ImagingTransformAffine function
The `imIn` pointer is checked for `NULL`, but it seems to be dereferenced before this check. You must first make sure that the pointer is not `NULL` before using it.
2024-09-19 22:53:45 +03:00
Andrew Murray
0f47ecd432 Update CHANGES.rst [ci skip] 2024-09-19 15:07:06 +10:00
Hugo van Kemenade
7ecb5bd8bb
Merge pull request #8395 from radarhere/ghostscript
Updated Ghostscript to 10.4.0
2024-09-19 07:14:38 +03:00
Andrew Murray
1392eab89b Updated Ghostscript to 10.4.0 2024-09-19 09:21:23 +10:00
Alexander Karpinsky
af521a1ce1
Merge branch 'main' into use-ptr 2024-09-18 22:24:46 +02:00
Yay295
362ffaf9b7 implement tiff exif multistrip support 2024-09-18 14:50:11 -05:00
Hugo van Kemenade
1ee3bd1d9e
Merge pull request #8390 from radarhere/tiff_exif_transpose
Use transposed size after opening for TIFF images
2024-09-18 22:35:01 +03:00
Hugo van Kemenade
743ddc7a58
Merge pull request #8338 from yngvem/improve-error-messages 2024-09-18 18:22:04 +03:00
Hugo van Kemenade
e33d8bb32b Generate and upload attestations to PyPI 2024-09-18 18:19:53 +03:00
Andrew Murray
9adb476f37
Rearranged text 2024-09-18 23:58:23 +10:00
Andrew Murray
629f5be52e In seek(), create core image at size needed for loading 2024-09-18 22:56:29 +10:00
Hugo van Kemenade
e80cada0f6
Merge pull request #8391 from radarhere/png_decompress 2024-09-18 15:31:18 +03:00
Andrew Murray
a92dca66bd Use raw size for striped tiles 2024-09-18 21:22:59 +10:00
Andrew Murray
a859695d9a
Rearranged code
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
2024-09-18 21:17:49 +10:00
Andrew Murray
9135fd0fb2 Mention limit in error message 2024-09-18 20:56:55 +10:00
Andrew Murray
84e275d906 Loading does not change mode 2024-09-18 20:27:35 +10:00
Andrew Murray
f1e86965f6 Use transposed size after opening for TIFF images 2024-09-18 20:26:06 +10:00
Andrew Murray
08d9c89d8a
Merge pull request #8388 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.21.1
2024-09-17 18:49:59 +10:00
renovate[bot]
75e4d5a10d
Update dependency cibuildwheel to v2.21.1 2024-09-17 06:12:03 +00:00
Hugo van Kemenade
f85c8dc345
Merge pull request #8385 from radarhere/dib_hwnd
Cast Dib handle to int
2024-09-16 19:29:12 +03:00
Aleksandr Karpinskii
a988750595 Try fix bigendian 2024-09-16 16:37:39 +02:00
Aleksandr Karpinskii
1d5b330758 Move common conversion in _convert_frame 2024-09-16 15:57:35 +02:00
Aleksandr Karpinskii
bc97369039 Increase reference to the image while capsule is alive 2024-09-16 15:45:34 +02:00
Aleksandr Karpinskii
31d36e6b70 Use current frame for transparency detection 2024-09-16 11:04:00 +02:00
Aleksandr Karpinskii
d1f40a94ff Use Image.getim() instead of ImagingCore.ptr 2024-09-16 10:52:06 +02:00
Aleksandr Karpinskii
d8ef314205 Remove extra load() calls 2024-09-16 10:39:14 +02:00
Alexander Karpinsky
3b09f436bd
Merge pull request #145 from radarhere/use-ptr
Use getim()
2024-09-16 10:26:49 +02:00
Andrew Murray
1f3fe6f733 Use getim() 2024-09-16 10:21:17 +10:00
Andrew Murray
8a086edbe9 Cast handle to int 2024-09-16 08:23:26 +10:00
Andrew Murray
a60736381e
Merge pull request #8384 from radarhere/libjpeg_turbo
Updated libjpeg-turbo to 3.0.4
2024-09-16 07:32:26 +10:00
Andrew Murray
c01d2d0577 Updated libjpeg-turbo to 3.0.4 2024-09-15 21:57:45 +10:00
Hugo van Kemenade
b67f018c00
Merge pull request #8382 from radarhere/lint 2024-09-14 15:05:38 +03:00
Hugo van Kemenade
dacfbbdc3e
Merge pull request #8381 from radarhere/macos_python 2024-09-14 13:59:40 +03:00
Andrew Murray
88b3265a9c Lint: Run PT016 2024-09-14 20:59:02 +10:00
Andrew Murray
ad0091096f
Describe supported OS versions instead of unsupported
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-14 20:52:49 +10:00
Andrew Murray
10c118bb5c Added release notes for #8379 2024-09-14 19:58:57 +10:00
Hugo van Kemenade
586e6f86d7
Merge pull request #8379 from radarhere/macos_python 2024-09-14 11:01:05 +03:00
Andrew Murray
38e05731f5
Merge pull request #8378 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.21.0
2024-09-14 13:37:53 +10:00
Andrew Murray
a3d9529f04 Updated macOS deployment target for Python >= 3.12 on Intel to 10.13 2024-09-14 11:23:09 +10:00
renovate[bot]
5713159968
Update dependency cibuildwheel to v2.21.0 2024-09-13 23:52:11 +00:00
Alexander Karpinsky
6921f83629
Update docs/deprecations.rst
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-13 22:54:16 +02:00
mergify[bot]
8d2bffee11
Merge pull request #8377 from radarhere/path_unused
Removed unused ImagePath variable
2024-09-13 14:33:05 +00:00
Andrew Murray
1557f7e36f Removed unused variable 2024-09-13 23:41:47 +10:00
Hugo van Kemenade
c9eb14e104
Merge pull request #7916 from radarhere/xz 2024-09-13 16:40:41 +03:00
Hugo van Kemenade
d6199a3352
Merge pull request #8376 from radarhere/macos 2024-09-13 11:10:56 +03:00
Andrew Murray
0f67dfc380 Change macos-14 to macos-latest 2024-09-13 15:31:37 +10:00
Hugo van Kemenade
e6cf27c5a8
Merge pull request #8375 from radarhere/libpng
Updated libpng to 1.6.44
2024-09-13 07:23:07 +03:00
Hugo van Kemenade
cb2b56f337
Merge pull request #8374 from radarhere/numpy
Test NumPy with musllinux wheels
2024-09-13 07:22:32 +03:00
Andrew Murray
5d8e891387 Updated libpng to 1.6.44 2024-09-13 10:52:36 +10:00
Andrew Murray
fea929bf10 Test NumPy with musllinux wheels 2024-09-13 07:34:56 +10:00
Andrew Murray
f6d5b48662
Merge pull request #8373 from lysnikolaou/install-numpy-pypi-wheels-test
Install numpy from PyPI when testing wheels
2024-09-13 06:23:29 +10:00
Lysandros Nikolaou
1ead7791c6
Remove comment 2024-09-12 16:34:29 +03:00
Lysandros Nikolaou
c9f88890a5
Install numpy from PyPI when testing wheels 2024-09-12 14:52:24 +03:00
Hugo van Kemenade
3fd6b7c072
Merge pull request #8372 from radarhere/numpy 2024-09-12 14:47:49 +03:00
Hugo van Kemenade
b19a51b63e
Merge pull request #8371 from radarhere/wheels 2024-09-12 12:59:55 +03:00
Andrew Murray
8336852b61 Install NumPy from PyPI for free threaded job 2024-09-12 18:52:07 +10:00
Andrew Murray
fab19b0af8 Windows wheels are now grouped with the others 2024-09-12 16:57:28 +10:00
Andrew Murray
aa7dfe3a56 Update CHANGES.rst [ci skip] 2024-09-12 16:16:21 +10:00
Hugo van Kemenade
575f574f5c
Merge pull request #8369 from radarhere/stroke_width_float 2024-09-12 08:53:41 +03:00
Hugo van Kemenade
3023cf968d
Merge pull request #8370 from radarhere/comments 2024-09-11 22:54:41 +03:00
Alexander Karpinsky
a2988da0d2
ImageCore → ImagingCore
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-11 19:55:07 +04:00
Yngve Mardal Moe
9ba4e10a16
Merge branch 'main' into improve-error-messages 2024-09-11 17:11:52 +02:00
Yngve Mardal Moe
32c514d24c
Update src/PIL/ImageFont.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-11 14:54:53 +02:00
Yngve Mardal Moe
77503156b1
Update src/PIL/ImageFont.py
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-11 14:22:45 +02:00
Aleksandr Karpinskii
4a284a78c5 Remove weird comments 2024-09-11 20:40:46 +10:00
Andrew Murray
01ba1e2252 Accept float stroke widths 2024-09-11 19:53:52 +10:00
pre-commit-ci[bot]
e4f13020e1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-09-11 08:33:12 +00:00
Yngve Mardal Moe
d2efd7dd5f
Update src/PIL/ImageFont.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-11 10:32:42 +02:00
Hugo van Kemenade
cb2a0c40f3
Merge pull request #8368 from radarhere/libffi
Removed libffi-dev
2024-09-11 08:00:18 +03:00
Andrew Murray
6ade6873de Removed libffi-dev 2024-09-11 08:13:41 +10:00
Yngve Mardal Moe
7d223fbcaa
Merge pull request #2 from radarhere/improve-error-messages
Sort extensions alphabetically in error message
2024-09-10 20:45:53 +02:00
Andrew Murray
bc4c57e9ea Update CHANGES.rst [ci skip] 2024-09-10 22:39:47 +10:00
Hugo van Kemenade
44b2f5ef32
Merge pull request #8367 from radarhere/releasenotes 2024-09-10 15:31:07 +03:00
Hugo van Kemenade
e91aedb65d
Merge pull request #8352 from radarhere/scale 2024-09-10 14:38:33 +03:00
Hugo van Kemenade
302b63f1c3
Merge pull request #8366 from radarhere/gif_rgba 2024-09-10 14:37:03 +03:00
Andrew Murray
5c67178c95 Added release notes for #8199 2024-09-10 21:32:35 +10:00
Andrew Murray
fea3e0dd5f Added release notes for #8213 2024-09-10 21:32:35 +10:00
Andrew Murray
54c5b532c5 Added release notes for #8286 2024-09-10 21:32:20 +10:00
Andrew Murray
8d508406ad Update CHANGES.rst [ci skip] 2024-09-10 20:55:34 +10:00
Andrew Murray
5cb736d953
Merge branch 'main' into scale 2024-09-10 20:39:04 +10:00
Hugo van Kemenade
4e5fd27dbe
Merge pull request #8364 from radarhere/isimagetype 2024-09-10 13:35:20 +03:00
Andrew Murray
d522e0a5c0 Improved handling of RGBA palettes when saving GIF images 2024-09-10 18:50:06 +10:00
Andrew Murray
adb6918214 Use isinstance to detect Image instances 2024-09-10 16:20:58 +10:00
Andrew Murray
e0845f06d8 Deprecate isImageType 2024-09-10 16:20:52 +10:00
Andrew Murray
9a42099dc3
Merge branch 'main' into openjpeg 2024-09-10 16:01:54 +10:00
Hugo van Kemenade
22c333289e
Merge pull request #8361 from radarhere/harfbuzz 2024-09-10 09:00:18 +03:00
Andrew Murray
d25d12f792 Removed custom build_openjpeg 2024-09-10 11:29:52 +10:00
Andrew Murray
be01d536c6 Update CHANGES.rst [ci skip] 2024-09-09 15:22:27 +10:00
Hugo van Kemenade
452b445d4f
Merge pull request #8358 from radarhere/lab 2024-09-09 08:20:29 +03:00
Andrew Murray
63f398bc12
Merge pull request #8194 from uploadcare/optimize-getbbox
Optimize getbbox() and getextrema() routines
2024-09-09 15:08:11 +10:00
Andrew Murray
a3c7912b98
Merge branch 'main' into scale 2024-09-09 13:22:10 +10:00
Andrew Murray
c9dc34ae8d Update CHANGES.rst [ci skip] 2024-09-09 13:19:37 +10:00
Andrew Murray
906f93275e
Merge pull request #8356 from hugovk/deprecate-freetype-2.9.0
Deprecate support for FreeType 2.9.0
2024-09-09 13:18:13 +10:00
Andrew Murray
608a5e83c0 Updated harfbuzz to 9.0.0, except on manylinux2014 2024-09-09 12:56:28 +10:00
Hugo van Kemenade
012270d1c9
Merge pull request #8360 from python-pillow/renovate/github-actions 2024-09-08 22:53:58 +03:00
Aleksandr Karpinskii
4d271c8ec8 import_frame for anim_encoder_add 2024-09-08 18:29:38 +04:00
Aleksandr Karpinskii
0962b468b7 ImagingSectionEnter for WebPAnimEncoder 2024-09-08 18:29:38 +04:00
Aleksandr Karpinskii
8bb3134b1d call _webp.WebPEncode with ptr 2024-09-08 18:29:38 +04:00
Aleksandr Karpinskii
0a8e6dbedb Use im.has_transparency_data for webp._save_all
Also:
remove _VALID_WEBP_MODES and _VALID_WEBP_LEGACY_MODES consts
RGBX is not faster RGB since demands more bandwidth
Do not convert to str paths in tests
2024-09-08 18:29:38 +04:00
Alexander Karpinsky
bd14915364
Merge pull request #144 from radarhere/use-ptr
Use CapsuleType hint in Python >= 3.13
2024-09-08 18:03:26 +04:00
Alexander Karpinsky
4318834775
Merge branch 'use-ptr' into use-ptr 2024-09-08 17:59:35 +04:00
Aleksandr Karpinskii
d29fa73ea6 Move new_block to module 2024-09-08 17:30:24 +04:00
Aleksandr Karpinskii
934ae12ed5 rename PyCapsule -> Capsule 2024-09-08 17:30:24 +04:00
Aleksandr Karpinskii
882ac783eb Use PyCapsule in _imagingft 2024-09-08 17:30:24 +04:00
Aleksandr Karpinskii
ee65b305b1 Use PyCapsule in _imagingtk 2024-09-08 17:30:24 +04:00
Aleksandr Karpinskii
cb3a4e6a00 Remove legacy 1-bit api, fix AttributeError
PytestUnraisableExceptionWarning: Exception ignored in: <function PhotoImage.__del__>
AttributeError: 'PhotoImage' object has no attribute '_PhotoImage__photo'
2024-09-08 17:30:24 +04:00
Aleksandr Karpinskii
5428e3568e Deprecate ImageCore.id and ImageCore.unsafe_ptrs 2024-09-08 17:30:23 +04:00
Aleksandr Karpinskii
7f48567002 Use s# in PyArg_ParseTuple 2024-09-08 17:30:23 +04:00
Aleksandr Karpinskii
f916b5dc87 Use PyCapsule in _imagingmorph 2024-09-08 17:30:23 +04:00
Aleksandr Karpinskii
56bc6a1a71 Use PyCapsule in _imagingcms 2024-09-08 17:30:23 +04:00
Aleksandr Karpinskii
fe002a7260 Use PyCapsule in _imagingmath 2024-09-08 17:30:23 +04:00
Andrew Murray
72bc56b319
Merge branch 'main' into imagecms_core 2024-09-08 23:21:25 +10:00
Hugo van Kemenade
f30eefaae2
Merge pull request #8354 from radarhere/type_hint 2024-09-08 16:19:08 +03:00
Hugo van Kemenade
2f13c4588d
Fix underline
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-08 16:17:13 +03:00
renovate[bot]
8c738f6427
Update deadsnakes/action action to v3.2.0 2024-09-08 13:00:15 +00:00
Hugo van Kemenade
1f2de52a6c
Group 11.0.0 deprecations (#127) 2024-09-08 15:07:22 +03:00
Andrew Murray
6231453895 Group 11.0.0 deprecations 2024-09-08 21:53:08 +10:00
Andrew Murray
89c790f2b0 Update CHANGES.rst [ci skip] 2024-09-08 21:38:21 +10:00
Andrew Murray
579a5a2ed1
Merge pull request #8355 from radarhere/unused_tiff
Removed unused TiffImagePlugin IFD_LEGACY_API
2024-09-08 21:36:44 +10:00
Andrew Murray
8b3ef3784b Moved Buffer into _typing 2024-09-08 08:30:30 +10:00
Andrew Murray
547832fd59 Use tempfile.NamedTemporaryFile 2024-09-07 19:49:21 +10:00
Andrew Murray
a3d23165b9 Update CHANGES.rst [ci skip] 2024-09-07 19:40:29 +10:00
Hugo van Kemenade
2c02146cf4
Use type hints and fix CVE role
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-09-07 12:32:30 +03:00
Hugo van Kemenade
f06b851616
Merge pull request #8350 from zakajd/jamil/doubleexif 2024-09-07 12:31:19 +03:00
Andrew Murray
dbe979d032 Sort extensions alphabetically in error message 2024-09-07 19:09:01 +10:00
Andrew Murray
e14072e973 Added further detail 2024-09-07 19:08:07 +10:00
Andrew Murray
1105256f2b Added type hints to setup.py 2024-09-07 18:25:44 +10:00
Hugo van Kemenade
a838da7406
Merge pull request #8002 from Yay295/patch-1
Use (void) for empty function parameters
2024-09-07 08:37:50 +03:00
Andrew Murray
a6ca45aea6 Use (void) to indicate no parameters 2024-09-07 00:01:25 -05:00
Andrew Murray
6f9128bfaf Updated type hint 2024-09-07 14:32:46 +10:00
Andrew Murray
8dcf229ea1 Merge branch 'main' into use-ptr 2024-09-07 14:24:18 +10:00
Andrew Murray
de3c6fa295 Support converting more modes to LAB by converting to RGBA first 2024-09-07 12:14:30 +10:00
Jamil Zakirov
2f25dbce06
Merge branch 'main' into jamil/doubleexif 2024-09-06 20:12:33 +03:00
Hugo van Kemenade
d3c1d99d00 Deprecate support for FreeType 2.9.0 2024-09-06 14:51:30 +03:00
Andrew Murray
93a0bf0276 Added type hints to TiffImagePlugin _save 2024-09-06 21:33:30 +10:00
Andrew Murray
94315f87c3 Removed unused IFD_LEGACY_API 2024-09-06 19:13:35 +10:00
Andrew Murray
06c331af5d Added type hints to frombuffer 2024-09-06 15:16:59 +10:00
Andrew Murray
23c461e431 Handle duplicate exif header
Co-authored-by: Jamil Zakirov <djamilzak@gmail.com>
2024-09-06 11:56:06 +10:00
Andrew Murray
a6f5f4dd43 Deprecate setting size to (width, height, scale) 2024-09-06 11:42:56 +10:00
Andrew Murray
e625f73119 Added scale argument to IcnsImageFile load() 2024-09-06 11:40:45 +10:00
Hugo van Kemenade
6377321625
Merge pull request #8351 from radarhere/type_hint 2024-09-05 17:35:55 +03:00
Hugo van Kemenade
a2be72d8dd
Merge pull request #8349 from AryazE/type_comparison 2024-09-05 17:34:49 +03:00
Andrew Murray
31638ee29a Added type hints 2024-09-05 23:14:17 +10:00
Andrew Murray
f7f3af799b Update CHANGES.rst [ci skip] 2024-09-05 22:53:48 +10:00
Aryaz Eghbali
282f740141
Merge branch 'python-pillow:main' into type_comparison 2024-09-05 13:31:36 +02:00
Aryaz Eghbali
a56ac4faa8 Canonical type checking 2024-09-05 13:29:19 +02:00
Hugo van Kemenade
965cb518a2
Merge pull request #8347 from radarhere/boxblur 2024-09-05 11:23:26 +03:00
Andrew Murray
1270043682 Return early if either width or height is zero 2024-09-05 15:46:54 +10:00
Aleksandr Karpinskii
8833548e55 Move new_block to module 2024-09-05 01:04:35 +04:00
Hugo van Kemenade
eaeda4a6be
Merge pull request #8339 from radarhere/type_hint 2024-09-04 14:57:01 +03:00
Hugo van Kemenade
8aa1e9209b
Merge pull request #8336 from radarhere/type_hint_imagefile 2024-09-04 14:56:23 +03:00
Hugo van Kemenade
06a9fcbff4
Merge pull request #8308 from radarhere/bytes 2024-09-04 14:52:57 +03:00
Hugo van Kemenade
a6cf6333a7
Merge pull request #8297 from radarhere/fuzz 2024-09-04 14:52:07 +03:00
Hugo van Kemenade
95c867dabf
Merge pull request #8286 from radarhere/xmp 2024-09-04 14:50:15 +03:00
Hugo van Kemenade
1dffc09c28
Merge pull request #8261 from radarhere/imagefont 2024-09-04 14:49:23 +03:00
Hugo van Kemenade
7e838bf409
Merge pull request #8256 from radarhere/jpeg2000_rgba 2024-09-04 14:48:01 +03:00
Hugo van Kemenade
64d96614a9
Merge pull request #8237 from radarhere/gif_expand 2024-09-04 14:47:25 +03:00
Hugo van Kemenade
9308f11ebe
Merge pull request #8231 from radarhere/ppm_i16 2024-09-04 14:46:31 +03:00
Hugo van Kemenade
e2c13571c3
Merge pull request #8230 from radarhere/exif_get_ifd 2024-09-04 14:46:18 +03:00
Hugo van Kemenade
eb1dbbf787
Merge pull request #8180 from radarhere/skip_truncated_mask 2024-09-04 14:36:46 +03:00
Hugo van Kemenade
a4c4b11a44
Merge pull request #8344 from radarhere/harfbuzz 2024-09-04 12:22:58 +03:00
Andrew Murray
be34a7da4b Save xmp from info 2024-09-04 19:20:56 +10:00
Hugo van Kemenade
7afa789c5d
Merge pull request #8284 from radarhere/libimagequant 2024-09-04 10:48:13 +03:00
Hugo van Kemenade
9e2ed5886b
Merge pull request #8302 from radarhere/freetype 2024-09-04 10:47:43 +03:00
Andrew Murray
63b1196622 Updated harfbuzz to 9.0.0 2024-09-04 16:13:19 +10:00
Aleksandr Karpinskii
bf11639626 rename PyCapsule -> Capsule 2024-09-03 11:55:18 +04:00
Andrew Murray
61dade88e8 Update CHANGES.rst [ci skip] 2024-09-03 17:00:59 +10:00
Hugo van Kemenade
d636b804d7
Merge pull request #8343 from radarhere/jpeg2000_colorspace 2024-09-03 09:49:13 +03:00
Andrew Murray
55f49393af Treat unknown colorspace as unspecified 2024-09-03 09:55:06 +10:00
Yngve Mardal Moe
822f525e82
Merge branch 'main' into improve-error-messages 2024-09-02 21:04:41 +02:00
Hugo van Kemenade
59f37db65f
Merge pull request #8342 from python-pillow/pre-commit-ci-update-config 2024-09-02 21:25:54 +03:00
pre-commit-ci[bot]
6b59e3822f
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.0 → v0.6.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.0...v0.6.3)
- [github.com/python-jsonschema/check-jsonschema: 0.29.1 → 0.29.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.1...0.29.2)
2024-09-02 17:26:20 +00:00
Aleksandr Karpinskii
147f75ee93 Use PyCapsule in _imagingft 2024-09-02 15:09:25 +04:00
Aleksandr Karpinskii
920c4ac447 Use PyCapsule in _imagingtk 2024-09-02 15:09:25 +04:00
Aleksandr Karpinskii
c69ad03af0 Remove legacy 1-bit api, fix AttributeError
PytestUnraisableExceptionWarning: Exception ignored in: <function PhotoImage.__del__>
AttributeError: 'PhotoImage' object has no attribute '_PhotoImage__photo'
2024-09-02 05:14:03 +04:00
Aleksandr Karpinskii
7435a06cbb Deprecate ImageCore.id and ImageCore.unsafe_ptrs 2024-09-02 05:14:03 +04:00
Aleksandr Karpinskii
f246be7b13 Use s# in PyArg_ParseTuple 2024-09-02 02:00:07 +04:00
Aleksandr Karpinskii
2fcab263d3 Use PyCapsule in _imagingmorph 2024-09-02 01:43:38 +04:00
Aleksandr Karpinskii
a9798e78af Use PyCapsule in _imagingcms 2024-09-02 01:36:38 +04:00
Aleksandr Karpinskii
2303c063cb Use PyCapsule in _imagingmath 2024-09-02 01:24:51 +04:00
Yngve Mardal Moe
ef51e7a1c7 Fix wrong indentation for assert 2024-09-01 19:49:44 +00:00
Yngve Mardal Moe
3bb180a254
Merge pull request #1 from radarhere/improve-error-messages
Renamed variable for first part of splitext to root
2024-09-01 21:47:08 +02:00
Andrew Murray
dbe78a0d21
Merge branch 'improve-error-messages' into improve-error-messages 2024-09-01 16:19:11 +10:00
Yngve Mardal Moe
fcca8a3059 Fix accidental indent 2024-08-31 19:03:11 +00:00
Andrew Murray
e0a75b6d69 Renamed variable for first part of splitext to root 2024-08-31 20:51:37 +10:00
Andrew Murray
95194a2050 Use tempfile.NamedTemporaryFile 2024-08-31 20:51:26 +10:00
Andrew Murray
e47b181084 Added type hints 2024-08-31 18:48:16 +10:00
Yngve Mardal Moe
cdadf931e3 Improve error messages 2024-08-30 20:50:56 +00:00
Andrew Murray
8699f13a74 Require fp parameter 2024-08-30 22:28:13 +10:00
Andrew Murray
d00f3656a6 Changed im.tile to never be None 2024-08-30 22:28:03 +10:00
Hugo van Kemenade
44c2ff3f0b
Merge pull request #8335 from hugovk/rm-pypy3.9 2024-08-29 14:44:26 +03:00
Hugo van Kemenade
d92603a0c6 Drop support for EOL PyPy3.9 2024-08-29 10:58:53 +03:00
Yay295
0c335d239b use (void) for empty function parameters 2024-08-28 08:08:08 -05:00
Andrew Murray
bdc53f6c4d Expand C image to match GIF frame image size 2024-08-28 18:33:43 +10:00
Hugo van Kemenade
1bf9fb4e40
Merge pull request #8279 from radarhere/type_hint_init 2024-08-28 10:07:27 +03:00
Andrew Murray
3c3b6ea28a
Merge pull request #8334 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.11.2
2024-08-28 11:41:20 +10:00
renovate[bot]
ae59ea4899
Update dependency mypy to v1.11.2 2024-08-28 00:52:05 +00:00
Andrew Murray
eae107ceb2
Merge branch 'main' into type_hint_init 2024-08-28 08:31:09 +10:00
Hugo van Kemenade
56e3147403
Merge pull request #8331 from radarhere/imageqt 2024-08-27 22:25:39 +03:00
Andrew Murray
7171e1c21e
Merge pull request #8332 from radarhere/ghostscript
Corrected GitHub Actions Windows Ghostscript path
2024-08-27 19:36:56 +10:00
Andrew Murray
65172db28d Corrected Ghostscript path 2024-08-27 19:04:46 +10:00
Andrew Murray
53bbfea763 Added type hints 2024-08-26 23:49:03 +10:00
Andrew Murray
e3ffa380ab
Merge branch 'main' into exif_get_ifd 2024-08-25 00:05:02 +10:00
Andrew Murray
4721c31b19
Merge pull request #8319 from radarhere/type_hint
Added type hints
2024-08-24 23:54:19 +10:00
Andrew Murray
cfb093af39 Update CHANGES.rst [ci skip] 2024-08-24 23:15:35 +10:00
Andrew Murray
dcd77b57d8
Merge pull request #8322 from radarhere/webp
Updated error message when saving WebP with invalid width or height
2024-08-24 23:12:07 +10:00
pre-commit-ci[bot]
a3e3639a59 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-24 11:27:43 +00:00
Andrew Murray
658b60e3a3
Include units
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-24 21:26:56 +10:00
Hugo van Kemenade
f15034c3b1
Merge pull request #8326 from radarhere/numpy 2024-08-24 14:26:52 +03:00
Andrew Murray
8aa58e320f Rename _E to ImagePointTransform 2024-08-24 21:25:41 +10:00
Andrew Murray
6e9518b88d Added type hint to example code 2024-08-24 19:18:25 +10:00
Hugo van Kemenade
b6f90c4732
Merge pull request #8325 from radarhere/defusedxml
Catch defusedxml warnings
2024-08-24 08:35:38 +03:00
Andrew Murray
e382ebed3a Remove warning if NumPy failed to raise an error during conversion 2024-08-23 19:38:07 +10:00
Andrew Murray
fed9168252 Catch defusedxml warnings 2024-08-23 18:48:28 +10:00
Andrew Murray
f9f7ba4ce9 Do not raise error if bitmap buffer is empty 2024-08-23 18:24:04 +10:00
Andrew Murray
d49ea37811 Include limit in error message 2024-08-22 17:50:42 +10:00
Andrew Murray
f368ccc06e
Merge branch 'main' into webp 2024-08-22 12:36:17 +10:00
Jeffrey 'Alex' Clark
d6cfebd016 Revert "Add/update project-makefile files"
This reverts commit 388fc78e36.

Sorry for the noise (4/4)!
2024-08-21 21:17:29 -04:00
Jeffrey 'Alex' Clark
1143bffe1a Revert "Add/update project-makefile files"
This reverts commit 776eb9e9b7.

Sorry for the noise (3/4)!
2024-08-21 21:17:06 -04:00
Jeffrey 'Alex' Clark
e19841afa4 Revert "Add/update project-makefile files"
This reverts commit 837af6420d.

Sorry for the noise (2/4)!
2024-08-21 21:16:35 -04:00
Jeffrey 'Alex' Clark
0f64d08e64 Revert "Add/update project-makefile files"
This reverts commit 575fad2472.

Sorry for the noise (1/4)!
2024-08-21 21:16:02 -04:00
Andrew Murray
132663a881 Updated error message for invalid width or height 2024-08-22 07:36:52 +10:00
Jeffrey 'Alex' Clark
575fad2472 Add/update project-makefile files 2024-08-21 17:02:53 -04:00
Jeffrey 'Alex' Clark
837af6420d Add/update project-makefile files 2024-08-21 16:43:28 -04:00
Jeffrey 'Alex' Clark
776eb9e9b7 Add/update project-makefile files 2024-08-21 16:08:26 -04:00
Jeffrey 'Alex' Clark
388fc78e36 Add/update project-makefile files 2024-08-21 15:32:06 -04:00
Andrew Murray
f0d8fd3059
Merge pull request #8310 from Yay295/tiff_cleanup
Move repeated code to private helper function
2024-08-21 13:48:18 +10:00
Andrew Murray
e6e5ef5c5f Added type hints 2024-08-21 08:05:02 +10:00
Andrew Murray
2ed8502d12 Use ipython PrettyPrinter, rather than custom class 2024-08-20 22:13:52 +10:00
Andrew Murray
d1d567bb59 Do not use sys.stdout in PSDraw 2024-08-20 22:13:52 +10:00
Hugo van Kemenade
f8d3e36176
Merge pull request #8315 from radarhere/iptc
Get IPTC info from tag_v2
2024-08-20 13:52:55 +03:00
Hugo van Kemenade
0ec1153a62
Merge pull request #8318 from radarhere/brew
Uninstall gradle and maven on macOS 13
2024-08-19 14:41:21 +03:00
Andrew Murray
27ca30d50e
Merge pull request #8309 from hugovk/flake8-pytest-style
Lint: run more flake8-pytest-style
2024-08-19 21:16:21 +10:00
Andrew Murray
2467369c13 Uninstall gradle and maven on macOS 13 2024-08-19 20:50:45 +10:00
Yay295
cd76b48533 move repeated code to private helper function 2024-08-18 17:02:45 -05:00
Andrew Murray
f26b47595b Get IPTC info from tag_v2 2024-08-19 06:56:31 +10:00
Hugo van Kemenade
5747267eb3 Fix PT018: Assert only one thing 2024-08-17 11:46:15 +03:00
Hugo van Kemenade
5c282d0299 Fix PT014: duplicate test cases in pytest.mark.parametrize 2024-08-17 11:46:15 +03:00
Hugo van Kemenade
6f506d2ae3 Run all flake8-pytest-style except rules some that fail 2024-08-17 11:46:15 +03:00
Hugo van Kemenade
eeb3d04843
Merge pull request #8306 from radarhere/tag_v2 2024-08-16 12:56:16 +03:00
Andrew Murray
5cb79c6a69 Check object is bytes 2024-08-16 18:31:07 +10:00
Andrew Murray
617699ffc7 Log value from tag_v2 2024-08-16 12:03:02 +10:00
Andrew Murray
0a03b77daf Update CHANGES.rst [ci skip] 2024-08-16 06:36:31 +10:00
Hugo van Kemenade
0633257be3
Merge pull request #8285 from radarhere/type_hint 2024-08-15 23:25:50 +03:00
Hugo van Kemenade
394e850db8
Merge pull request #8304 from radarhere/rounded_rectangle 2024-08-15 16:06:42 +03:00
Andrew Murray
d5e3f6b516 If left and right sides meet, do not draw rectangle to fill gap 2024-08-15 14:46:23 +10:00
Andrew Murray
d4c72da6b2 Added type hints to example code 2024-08-15 14:10:31 +10:00
Andrew Murray
8afb7ddb4e Added type hints 2024-08-15 08:08:43 +10:00
Andrew Murray
497080f63b Added type hint to ImageFile._save tile parameter 2024-08-15 07:30:01 +10:00
Andrew Murray
8737709781 Added return type to ImageFile.load() 2024-08-15 07:30:00 +10:00
Andrew Murray
b14142462e Update CHANGES.rst [ci skip] 2024-08-15 05:11:00 +10:00
Andrew Murray
e4e2cd6564 Updated comments 2024-08-14 15:28:34 +04:00
Andrew Murray
2b6c5a27a1 Added braces 2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
8256b9bb7f Correct left boundary on the second stage 2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
5fb44ab694 This check is useless, since moved after the first stage 2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
6a87df2c1f clang-format 2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
4cf5688cfd Optimize getbbox() and getextrema() 2024-08-14 15:28:34 +04:00
Alexander Karpinsky
35a70e4b97
Merge pull request #8213 from uploadcare/webp-require-anim
Remove WebP support without anim, mux/demux, and with buggy alpha
2024-08-14 15:27:23 +04:00
Alexander Karpinsky
4d544da5c6
Merge pull request #142 from radarhere/webp-require-anim
Suggestions for deprecating older WebP versions
2024-08-14 12:47:17 +04:00
Andrew Murray
359d7592c7 Test deprecation warnings 2024-08-14 18:41:39 +10:00
Andrew Murray
45552b5b4f Updated documentation 2024-08-14 18:36:06 +10:00
Andrew Murray
66319fcce7 Animation support is no longer conditionally enabled 2024-08-14 18:35:59 +10:00
Andrew Murray
ba82dff7bc Updated test name 2024-08-14 18:35:53 +10:00
Andrew Murray
c7e6289b36 Use relative import 2024-08-13 19:07:01 +10:00
Andrew Murray
f3aec6dd38 Simplified code 2024-08-13 19:05:32 +10:00
Andrew Murray
5546994828 Removed unnecessary variable 2024-08-13 19:03:14 +10:00
Alexander Karpinsky
93ce9ce004
Update features type
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-08-13 09:52:07 +04:00
Andrew Murray
924df9e60b Moved line after early return
Improve compiler advice

Update src/PIL/features.py
2024-08-13 09:34:49 +04:00
Aleksandr Karpinskii
6180abc75c Remove WebP versions notes from docs 2024-08-13 09:34:49 +04:00
Aleksandr Karpinskii
56ca359c65 Bring back removed features, add deprecations and Release notes 2024-08-13 09:34:49 +04:00
Aleksandr Karpinskii
a3468996c0 Remove webp animations flags and conditions
Removed:
_webp.WebPDecode
_webp.HAVE_WEBPANIM
features.webp_anim
2024-08-13 09:33:20 +04:00
Aleksandr Karpinskii
9bed5b4264 Remove _webp.WebPDecoderBuggyAlpha and _webp.HAVE_TRANSPARENCY 2024-08-13 09:26:04 +04:00
Aleksandr Karpinskii
c1e8375af8 Require webpmux and webpdemux 2024-08-13 09:24:52 +04:00
Andrew Murray
f801649513 Updated freetype to 2.13.3 2024-08-13 06:11:32 +10:00
Alexander Karpinsky
a5b415bef5
Merge pull request #8298 from uploadcare/missing-CMYK;16B
Add missing TIFF CMYK;16B reader
2024-08-11 16:09:14 +04:00
Aleksandr Karpinskii
0d79a38e77 Add missing TIFF CMYK;16B reader 2024-08-11 15:14:29 +04:00
Andrew Murray
de441ee091 Updated to Python 3.10 2024-08-10 21:05:14 +10:00
Andrew Murray
4d0e8e74b4 Use im property 2024-08-10 10:20:08 +10:00
Hugo van Kemenade
c8b5f0b9ea
Merge pull request #8293 from radarhere/quant
Fix undefined variable
2024-08-10 01:05:05 +03:00
Andrew Murray
e938283eb9 Allow docs to build without lcms2 2024-08-09 20:56:14 +10:00
Andrew Murray
8da4883234 Merge branch 'main' into type_hint_init 2024-08-09 14:21:46 +10:00
Hugo van Kemenade
082e3234a1
Merge pull request #8295 from akx/ruff-enforce-parametrize-style 2024-08-08 15:12:43 +03:00
Aarni Koskela
1c998d7f7c
Update pyproject.toml
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-08-08 14:10:18 +03:00
Hugo van Kemenade
c6867187bd
Merge pull request #8290 from akx/parametrize-lut-tests 2024-08-07 15:12:56 +03:00
Hugo van Kemenade
2e23dc5c03
Merge pull request #8294 from radarhere/warning 2024-08-07 14:19:09 +03:00
Aarni Koskela
8ca53b312d Enforce CSV parametrize names style 2024-08-07 12:27:20 +03:00
Andrew Murray
a06529a3a8 Added channels parameter 2024-08-07 12:13:05 +03:00
Andrew Murray
5c4aeaa329 Concatenate parameters into single string 2024-08-07 12:13:05 +03:00
Andrew Murray
4fddc625f1 Corrected lut mode 2024-08-07 12:13:05 +03:00
Andrew Murray
7581b48706 Fixed sign comparison warning 2024-08-07 18:44:43 +10:00
Andrew Murray
11b4df3ff9
Merge pull request #8289 from akx/mypy-fixes
Move auxiliary mypy requirements to a requirements file
2024-08-07 18:05:06 +10:00
Aarni Koskela
59c69f8d71 Move auxiliary mypy requirements to a requirements file
For easier installation outside tox
2024-08-07 09:37:21 +03:00
Andrew Murray
70298d3be9 Fix undefined variable 2024-08-07 06:38:46 +10:00
Aarni Koskela
9d6d16d5cc Parametrize some color_lut tests for DRYness 2024-08-06 15:25:23 +03:00
Hugo van Kemenade
f2469cb1bf
Merge pull request #8288 from radarhere/quant
Removed unused variable
2024-08-06 08:21:00 +03:00
Andrew Murray
5e8dbbbf9e Removed unused variable 2024-08-06 13:32:46 +10:00
Andrew Murray
13c00bab86 Updated libimagequant to 4.3.3 2024-08-06 11:16:57 +10:00
Andrew Murray
1fd4d14782 Update CHANGES.rst [ci skip] 2024-08-06 06:31:47 +10:00
Andrew Murray
c056406f21 Added comments to explain overhead_len 2024-08-06 06:19:15 +10:00
Hugo van Kemenade
8696974cef
Merge pull request #8287 from python-pillow/pre-commit-ci-update-config 2024-08-05 21:43:02 +03:00
pre-commit-ci[bot]
554f8bb23a
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.5.6)
- [github.com/python-jsonschema/check-jsonschema: 0.28.6 → 0.29.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.6...0.29.1)
- [github.com/tox-dev/pyproject-fmt: 2.1.3 → 2.2.1](https://github.com/tox-dev/pyproject-fmt/compare/2.1.3...2.2.1)
2024-08-05 17:37:42 +00:00
Andrew Murray
d49884e40c Raise ValueError is XMP data is too long 2024-08-05 21:48:36 +10:00
Andrew Murray
2722cfd72b Added writing XMP bytes to JPEG 2024-08-05 20:20:24 +10:00
Andrew Murray
71876cfd2a
Merge pull request #8282 from python-pillow/renovate/cibuildwheel-2.x
Update dependency cibuildwheel to v2.20.0
2024-08-04 19:51:10 +10:00
renovate[bot]
69076fa3d9
Update dependency cibuildwheel to v2.20.0 2024-08-04 06:21:13 +00:00
Andrew Murray
6897566701
Merge pull request #8280 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.11.1
2024-08-03 13:40:35 +10:00
renovate[bot]
3e93b806cc
Update dependency mypy to v1.11.1 2024-08-03 02:29:19 +00:00
Andrew Murray
8f1157a61d Added type hints to Image.__init__() 2024-08-02 23:30:27 +10:00
Alexander Karpinsky
d8447de24d
Merge pull request #8211 from uploadcare/remove-c-flags
Remove all WITH_* flags from _imaging.c and other flags
2024-08-02 16:10:10 +04:00
Hugo van Kemenade
126af363af
Merge pull request #8265 from radarhere/imagedraw2 2024-08-01 14:50:43 +03:00
Hugo van Kemenade
5517232205
Merge pull request #8238 from lysnikolaou/arena-thread-safe 2024-08-01 12:31:56 +03:00
Andrew Murray
95cc0b1109
Merge pull request #8274 from radarhere/unused_jpeg
Deprecate JpegImageFile huffman_ac and huffman_dc
2024-08-01 17:43:01 +10:00
Andrew Murray
488e1982bd Added removal version and date 2024-08-01 16:29:46 +10:00
Andrew Murray
e6fd8359d3 Deprecate huffman_ac and huffman_dc 2024-08-01 12:27:45 +10:00
Hugo van Kemenade
4df4df2a18
Merge pull request #8270 from radarhere/type_hint 2024-07-30 14:42:41 +03:00
Andrew Murray
accfaf1c09 Added type hints 2024-07-30 20:20:09 +10:00
Andrew Murray
955854728a Pass start and end to arc, chord and pieslice 2024-07-30 09:10:11 +10:00
Andrew Murray
b84e2a9935 Do not pass outline to arc 2024-07-30 09:10:11 +10:00
Andrew Murray
db5c4fbb2c Include required arguments 2024-07-30 09:10:09 +10:00
Hugo van Kemenade
5833a8b18e
Merge pull request #8268 from radarhere/type_hint 2024-07-29 18:44:47 +03:00
Andrew Murray
6420f73613 Added type hints 2024-07-29 23:46:07 +10:00
Aleksandr Karpinskii
302962dae1 Updated comments
by @radarhere, lost during rebase
2024-07-28 17:20:14 +04:00
Aleksandr Karpinskii
a6d83ec9cc Add relesenotes 2024-07-28 17:09:31 +04:00
Aleksandr Karpinskii
d00fb87fa3 Rename Not NO_OUTPUT to DEBUG, remove TEST_MERGESORT and TEST_SPLIT* flags 2024-07-28 16:46:28 +04:00
Aleksandr Karpinskii
dc53356c1a Not needed since memcpy is used here 2024-07-28 16:24:51 +04:00
Aleksandr Karpinskii
cfce566d17 codestyle 2024-07-28 16:24:51 +04:00
Aleksandr Karpinskii
a03033e7f3 Remove all WITH_* flags from _imaging.c 2024-07-28 16:24:51 +04:00
Hugo van Kemenade
7b8a031ec1
Merge pull request #8267 from radarhere/type_hint 2024-07-28 11:22:14 +03:00
Andrew Murray
c85eb0cae5 Added type hints 2024-07-28 12:53:02 +10:00
Hugo van Kemenade
8f62fbdf44
Merge pull request #8263 from radarhere/type_hint 2024-07-26 11:06:38 +03:00
Andrew Murray
046285ac5d Added type hints 2024-07-26 16:42:28 +10:00
Hugo van Kemenade
7bd28952f1
Merge pull request #8262 from radarhere/type_hint 2024-07-25 22:10:38 +03:00
Andrew Murray
726cdf5eed Added type hints 2024-07-25 22:55:49 +10:00
Andrew Murray
68328ccc6a Require font parameter for truetype() 2024-07-25 18:52:04 +10:00
Andrew Murray
d0d4227515 Require font parameter in FreeTypeFont 2024-07-25 18:45:38 +10:00
Andrew Murray
6dd4b3c826
Merge pull request #8259 from hugovk/rm-is_directory
Remove unused _util.is_directory
2024-07-25 09:47:30 +10:00
Andrew Murray
61001dab14
Merge pull request #8260 from python-pillow/revert-7856-docs
Restore exiv2.org links
2024-07-25 08:41:59 +10:00
Hugo van Kemenade
72a243c498
Revert "Corrected exiv2.org links" 2024-07-24 11:44:44 -06:00
Hugo van Kemenade
7a570d67bf Remove unused _util.is_directory 2024-07-24 20:32:20 +03:00
Hugo van Kemenade
a103c4a044
Merge pull request #8257 from radarhere/imagedraw_unused 2024-07-24 20:24:14 +03:00
Andrew Murray
ab635be11b Removed unused argument 2024-07-24 22:08:15 +10:00
Andrew Murray
77df988d06 Support RGBA palettes 2024-07-24 19:51:19 +10:00
Hugo van Kemenade
fddc902c35
Merge pull request #8246 from python-pillow/tutorial-images 2024-07-24 10:48:25 +03:00
Andrew Murray
8f4dbfe6a6 Simplified code 2024-07-24 06:56:59 +10:00
Andrew Murray
888b2f716e Improved consistency of example paths 2024-07-24 06:56:42 +10:00
Andrew Murray
cf6ec5e065 Converted images to WebP 2024-07-24 06:44:06 +10:00
Jeffrey A. Clark (Alex)
96fa1f5dbf multiply each pixel by 20 2024-07-23 14:55:04 -04:00
Yay295
22ef8df59a
Do not run scheduled wheel jobs on forks 2024-07-22 08:29:55 +03:00
mergify[bot]
8405412b76
Merge pull request #8250 from radarhere/type_hint
Added type hints
2024-07-20 19:48:05 +00:00
Andrew Murray
1cf887dbec Rearranged code 2024-07-21 05:22:13 +10:00
Jeffrey A. Clark (Alex)
ddc02bb78c Update and add image to PostScript printing example 2024-07-20 14:41:47 -04:00
Andrew Murray
906b8afe85
Merge pull request #8252 from python-pillow/renovate/mypy-1.x
Update dependency mypy to v1.11.0
2024-07-20 19:57:16 +10:00
Andrew Murray
38458a204c Corrected type hints 2024-07-20 19:07:42 +10:00
Andrew Murray
882a196a8f Removed unused ignores 2024-07-20 18:59:27 +10:00
renovate[bot]
b976a8496d
Update dependency mypy to v1.11.0 2024-07-20 08:07:12 +00:00
Andrew Murray
f624460321 Added type hints 2024-07-20 13:14:18 +10:00
Andrew Murray
f8a9a18e7d
Merge pull request #8248 from Yay295/patch-2
Use local variable instead of casting every line
2024-07-20 10:49:37 +10:00
Yay295
204ec11f64 use local variable instead of casting every line 2024-07-19 08:46:25 -05:00
Jeffrey A. Clark
eff22bc34e
Update docs/handbook/tutorial.rst
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-19 09:00:26 -04:00
pre-commit-ci[bot]
aa8d87696b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-19 12:14:54 +00:00
Lysandros Nikolaou
8a54f58ac6
Merge branch 'main' into arena-thread-safe 2024-07-19 14:14:23 +02:00
Andrew Murray
011da4b646
Merge pull request #8067 from Yay295/patch-2
Change AlignAfterOpenBracket in .clang-format to BlockIndent
2024-07-19 20:26:36 +10:00
Andrew Murray
4db8140426 Removed unused image 2024-07-19 18:49:04 +10:00
Andrew Murray
54055c76c4 Converted images to WebP 2024-07-19 18:45:00 +10:00
Andrew Murray
1daaef02cd Updated code to match image 2024-07-19 18:27:00 +10:00
Andrew Murray
c337dfe98a Correct reference 2024-07-19 14:41:51 +10:00
Jeffrey A. Clark (Alex)
96a1af9fa8 Add tutorial images
Animated gif example
2024-07-18 18:33:14 -04:00
Jeffrey A. Clark (Alex)
18d8020cab Add tutorial images 2024-07-18 15:17:32 -04:00
Andrew Murray
73dfe67736 Update CHANGES.rst [ci skip] 2024-07-18 22:46:02 +10:00
Hugo van Kemenade
97e5381dbb
Merge pull request #8242 from radarhere/imagemath_options 2024-07-18 14:49:29 +03:00
Hugo van Kemenade
205695dedf
Merge pull request #8244 from lysnikolaou/upload-nightly-wheels-different-job 2024-07-18 14:06:20 +03:00
Lysandros Nikolaou
a6e9393956
Update .github/workflows/wheels.yml
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-18 10:35:09 +02:00
Andrew Murray
7248cde50b Documented keyword arguments 2024-07-18 11:00:27 +10:00
Lysandros Nikolaou
09c817a2ec
Move uploading nightly wheels to different job
This is needed cause the job does not support running on OS's other
than Ubuntu.
2024-07-17 23:05:48 +02:00
Hugo van Kemenade
b6868f3095
Merge pull request #8243 from lysnikolaou/skip-qemu-wheels-workflow-dispatch 2024-07-17 20:44:08 +03:00
Lysandros Nikolaou
f39ca5db5a
Skip QEMU-emulated wheels on workflow dispatch event 2024-07-17 16:21:16 +02:00
Hugo van Kemenade
024fa51294
Merge pull request #8236 from lysnikolaou/upload-nightly-wheels 2024-07-17 17:17:54 +03:00
Andrew Murray
47fc36a323 Update CHANGES.rst [ci skip] 2024-07-17 22:28:56 +10:00
Andrew Murray
10faa5df39 Deprecate lambda_eval and unsafe_eval options argument 2024-07-17 22:08:53 +10:00
Hugo van Kemenade
d05262105a
Merge pull request #8240 from radarhere/containerio
Changed ContainerIO to subclass IO
2024-07-17 14:23:55 +03:00
Andrew Murray
a3f93b3f68 Changed ContainerIO to subclass IO 2024-07-17 16:23:29 +10:00
Hugo van Kemenade
86f4cfbbf1
Merge pull request #8239 from radarhere/cifuzz
Temporarily disable cifuzz
2024-07-17 07:33:38 +03:00
Andrew Murray
3146940716 Temporarily disable cifuzz 2024-07-17 08:26:05 +10:00
pre-commit-ci[bot]
e144707520 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-16 19:32:02 +00:00
Lysandros Nikolaou
98b173928a
Address more feedback; don't unlock around sizeof 2024-07-16 21:31:29 +02:00
Lysandros Nikolaou
06767fc325
Address feedback; do not lock in a loop 2024-07-16 17:00:14 +02:00
Lysandros Nikolaou
5999b9b0cc
Initialize PyMutex only under the free-threaded build 2024-07-16 16:56:15 +02:00
pre-commit-ci[bot]
9f110aa702 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-16 14:47:15 +00:00
Lysandros Nikolaou
ea7b5c5b66
Lock around usages of imaging memory arenas 2024-07-16 16:43:49 +02: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
Yay295
87b23d0207 change AlignAfterOpenBracket in .clang-format to BlockIndent
to match the Python code
2024-07-16 07:57:24 -05:00
Andrew Murray
d83c7b38c4
Skip other jobs on schedule (#1)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-16 12:18:25 +02:00
Lysandros Nikolaou
68c3542d09
Rename secret 2024-07-16 10:42:18 +02:00
Andrew Murray
784a874490 Trim whitespace 2024-07-16 18:38:50 +10:00
Lysandros Nikolaou
e89be77145
Upload wheels to scientific-python-nightly-wheels index 2024-07-16 10:21:24 +02:00
Andrew Murray
f19e07b58c
Merge pull request #8234 from radarhere/type_hint
Added type hints
2024-07-16 18:05:02 +10:00
Andrew Murray
3eeef83517
Updated condition
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-16 16:40:17 +10:00
Hugo van Kemenade
2152a1736c
Merge pull request #8235 from radarhere/axis_name
Simplified code
2024-07-15 15:42:10 +03:00
Andrew Murray
76e5e12f98 Simplified code 2024-07-15 20:48:39 +10:00
Andrew Murray
01529d8b09 Added type hints 2024-07-15 19:23:36 +10:00
Hugo van Kemenade
6944e9e183
Merge pull request #8216 from hugovk/free-threading 2024-07-13 16:09:34 +02:00
Hugo van Kemenade
851868c775
Fix refcounts after porting to GetItemRef & better error checking (#126) 2024-07-13 12:41:39 +02:00
Lysandros Nikolaou
8854e4677e
Add include 2024-07-13 12:34:17 +02:00
Lysandros Nikolaou
9c576d63c3
Fix refcounts after porting to GetItemRef & better error checking 2024-07-13 12:24:02 +02:00
Hugo van Kemenade
c21a403879
Add necessary PyMem_Free and fix PyDict_GetItemRef call (#125) 2024-07-13 11:18:47 +02:00
Hugo van Kemenade
8c9eea9d07
Merge pull request #8228 from radarhere/type_hint 2024-07-13 11:09:48 +02:00
Lysandros Nikolaou
f5313db9ce
Add necessary PyMem_Free and fix PyDict_GetItemRef call 2024-07-13 11:00:57 +02:00
Hugo van Kemenade
8d88619bde
Merge pull request #8219 from radarhere/free_threaded 2024-07-13 10:59:28 +02:00
Andrew Murray
8e730e17ae Allow saving I;16 images as PPM 2024-07-13 13:00:58 +10:00
Andrew Murray
42bfcaa2d4 When IFD is missing, connect get_ifd() dictionary to Exif 2024-07-13 12:46:15 +10:00
Andrew Murray
5bae934317 Added type hints 2024-07-12 21:16:56 +10:00
Andrew Murray
c416f0ea1d Build wheels with free threading 2024-07-10 06:11:11 +10:00
Hugo van Kemenade
6a9acfa5ca
Merge pull request #8214 from radarhere/type_hint 2024-07-08 09:01:47 -06: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
7c64ae0c73 encode: Replace PyDict_GetItem with PyDict_GetItemRef 2024-07-08 15:42:26 +03:00
Hugo van Kemenade
377bdc0db1 encode: Replace PyList_GetItem with PyList_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
613fced92c
Merge pull request #8200 from hugovk/ci-free-threading
Test 3.13 free-threaded build on CI
2024-07-08 21:24:07 +10:00
Andrew Murray
8a05e32336 Added type hints 2024-07-08 20:09:45 +10:00
Hugo van Kemenade
77e752f35f
Check GIL, rather than Python version (#124) 2024-07-07 07:09:26 -06:00
Andrew Murray
41eb218a68 Check GIL, rather than Python version 2024-07-07 22:04:50 +10:00
mergify[bot]
94a8fccfa7
Merge pull request #8210 from radarhere/type_hint
Added type hint
2024-07-06 13:08:17 +00:00
Andrew Murray
6883018725 Added type hint 2024-07-06 22:06:47 +10:00
Hugo van Kemenade
ae25d23c34
Merge pull request #8207 from radarhere/type_hints_pdfparser
Added type hints to PdfParser
2024-07-06 05:54:16 -06:00
Hugo van Kemenade
d2c3365b40
Merge pull request #8208 from radarhere/type_hint_tests
Check test type hints
2024-07-06 05:28:42 -06:00
Andrew Murray
486dac7efc Added type hints 2024-07-06 19:17:23 +10:00
Andrew Murray
69cca2a103 Added type hints 2024-07-06 15:08:35 +10:00
Hugo van Kemenade
a528cd8bd3
Merge pull request #8206 from radarhere/aarch64_wheels 2024-07-05 13:10:10 -06:00
Hugo van Kemenade
6cef133554
Merge pull request #8201 from radarhere/resize 2024-07-05 12:15:03 -06:00
Andrew Murray
4aa24f88d9
Added type hints to tests (#8203)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-05 11:56:24 -06:00
Andrew Murray
f3c3e52797
Added type hints (#8204)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-05 11:55:23 -06:00
Hugo van Kemenade
dcd8332805 Include 'free-threading' in job name 2024-07-05 19:40:43 +03:00
Andrew Murray
bcecaf6add Group aarch64 jobs 2024-07-06 02:08:37 +10:00
Andrew Murray
7e1a6be767
Updated macOS tested Pillow versions (#8202)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-05 13:05:59 +03:00
Hugo van Kemenade
2d2889e617 Install nightly NumPy for free-threaded 2024-07-05 01:52:06 +03:00
Hugo van Kemenade
701539d017 Add PYTHON_GIL=0 env var to keep GIL disabled 2024-07-05 00:38:50 +03:00
Hugo van Kemenade
e76c31b67d Refactor to single line for readability 2024-07-04 15:54:21 +03:00
Hugo van Kemenade
d4f1d252ef Test 3.13 free-threaded build on CI 2024-07-04 15:54:21 +03:00
Andrew Murray
6990fc4a09 Allow size argument to resize() to be a NumPy array 2024-07-04 15:25:35 +10:00
Andrew Murray
936012e861 Allow size argument to resize() to be a list 2024-07-04 15:13:03 +10:00
Andrew Murray
776dd63f33 Update CHANGES.rst [ci skip] 2024-07-04 11:20:00 +10:00
Andrew Murray
a34ac045c3 Conditionally define type hint to avoid requiring core 2024-07-03 21:05:48 +10:00
Hugo van Kemenade
51bd7d2ea8
Drop support for Python 3.8 (#8183)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-03 00:44:45 -06:00
Andrew Murray
7537ce8a60
Merge pull request #8181 from hugovk/add-3.13
Add support for Python 3.13
2024-07-03 13:22:47 +10:00
Andrew Murray
674e8e0b1b
Merge pull request #8189 from hugovk/numpy-3.13
Test NumPy on Python 3.13
2024-07-03 13:18:08 +10:00
Hugo van Kemenade
c8df36f650
Merge pull request #8191 from radarhere/type_hint 2024-07-02 14:31:04 -06:00
Hugo van Kemenade
ececa9df4e
Merge pull request #8187 from neutrinoceros/bug/compat/numpy1.20 2024-07-02 14:28:14 -06:00
Hugo van Kemenade
534d82119b Test NumPy on Python 3.13
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-02 21:57:13 +03:00
Hugo van Kemenade
40d3b2ce0c Fix version range
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-02 21:53:23 +03:00
Hugo van Kemenade
4eec24a380 Increment Python version check on Windows
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-02 21:52:43 +03:00
Hugo van Kemenade
e50df021e8 Add support for Python 3.13 2024-07-02 21:48:48 +03:00
Hugo van Kemenade
f3719a9bec
Merge pull request #8192 from python-pillow/renovate/cibuildwheel-2.x 2024-07-02 12:45:56 -06:00
renovate[bot]
0a19410ee2
Update dependency cibuildwheel to v2.19.2 2024-07-02 12:15:04 +00:00
Andrew Murray
267c0b37b1 Added type hints 2024-07-02 20:10:47 +10:00
Clément Robert
ce6fb1279f
Merge pull request #1 from radarhere/bug/compat/numpy1.20
Do not import numpy.typing unless TYPE_CHECKING
2024-07-02 12:00:01 +02:00
Andrew Murray
8b8fc18998 Do not import numpy.typing unless TYPE_CHECKING 2024-07-02 19:05:59 +10:00
Andrew Murray
8c2a823e77
Merge pull request #8188 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-07-02 18:41:47 +10:00
Andrew Murray
06cad14767
Merge pull request #8185 from radarhere/debian
Removed Debian 11
2024-07-02 07:58:16 +10:00
pre-commit-ci[bot]
c359bd290b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-01 17:33:19 +00:00
Clément Robert
b4ee967372 BUG: fix an incompatibility with numpy 1.20 2024-07-01 19:33:14 +02:00
pre-commit-ci[bot]
d6d0a4d981
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.7 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.7...v0.5.0)
- [github.com/PyCQA/bandit: 1.7.8 → 1.7.9](https://github.com/PyCQA/bandit/compare/1.7.8...1.7.9)
- [github.com/pre-commit/mirrors-clang-format: v18.1.5 → v18.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.5...v18.1.8)
- [github.com/python-jsonschema/check-jsonschema: 0.28.4 → 0.28.6](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.4...0.28.6)
- [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.1.3](https://github.com/tox-dev/pyproject-fmt/compare/1.8.0...2.1.3)
2024-07-01 17:32:51 +00:00
Andrew Murray
8c26622ee7
Merge pull request #8186 from radarhere/cve
Updated CVE URL
2024-07-01 23:46:05 +10:00
Andrew Murray
31e64a0da8 Updated CVE URL 2024-07-01 23:06:57 +10:00
Andrew Murray
381c604b07 Removed Debian 11 2024-07-01 23:06:39 +10:00
Andrew Murray
d3f343bb9b Skip truncated mask if LOAD_TRUNCATED_IMAGES is enabled 2024-07-01 23:04:47 +10:00
Andrew Murray
585bd6ad48
Merge pull request #8182 from hugovk/rm-deprecated-psfile
Remove PSFile, PyAccess and USE_CFFI_ACCESS
2024-07-01 23:04:04 +10:00
Hugo van Kemenade
4ab4fa4cd7
Merge pull request #120 from radarhere/rm-deprecated-psfile 2024-07-01 06:33:19 -06:00
Andrew Murray
9bc1365ea0 Removed reference 2024-07-01 21:41:08 +10:00
Andrew Murray
5e163c0fed Updated deprecation timeline 2024-07-01 20:31:25 +10:00
Andrew Murray
43cc1e3659 Removed PyAccess and Image.USE_CFFI_ACCESS 2024-07-01 20:31:17 +10:00
Hugo van Kemenade
eb5bf18192 Bump deprecation tests to Pillow 12 2024-07-01 13:25:43 +03:00
Andrew Murray
a3a6198286 11.0.0.dev0 version bump 2024-07-01 19:53:27 +10:00
Hugo van Kemenade
2a660bbe9f Remove PSFile class, deprecated in Pillow 9.5.0 2024-07-01 10:58:27 +03:00
Andrew Murray
142cb11dcc Use GitHub URL for xz 2024-06-13 10:58:51 +10:00
Andrew Murray
7f977f6522 Updated xz to 5.6.2 2024-05-30 09:10:28 +10:00
665 changed files with 40339 additions and 14018 deletions

View File

@ -1,100 +0,0 @@
skip_commits:
files:
- ".github/**/*"
- ".gitmodules"
- "docs/**/*"
- "wheels/**/*"
version: '{build}'
clone_folder: c:\pillow
init:
- ECHO %PYTHON%
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Uncomment previous line to get RDP access during the build.
environment:
COVERAGE_CORE: sysmon
EXECUTABLE: python.exe
TEST_OPTIONS:
DEPLOY: YES
matrix:
- PYTHON: C:/Python312
ARCHITECTURE: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- PYTHON: C:/Python38-x64
ARCHITECTURE: AMD64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
install:
- '%PYTHON%\%EXECUTABLE% --version'
- '%PYTHON%\%EXECUTABLE% -m pip install --upgrade pip'
- curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip
- 7z x pillow-test-images.zip -oc:\
- xcopy /S /Y c:\test-images-main\* c:\pillow\tests\images
- curl -fsSL -o nasm-win64.zip https://raw.githubusercontent.com/python-pillow/pillow-depends/main/nasm-2.16.03-win64.zip
- 7z x nasm-win64.zip -oc:\
- choco install ghostscript --version=10.3.1
- path c:\nasm-2.16.03;C:\Program Files\gs\gs10.03.1\bin;%PATH%
- cd c:\pillow\winbuild\
- ps: |
c:\python38\python.exe c:\pillow\winbuild\build_prepare.py -v --depends=C:\pillow-depends\
c:\pillow\winbuild\build\build_dep_all.cmd
$host.SetShouldExit(0)
- path C:\pillow\winbuild\build\bin;%PATH%
build_script:
- cd c:\pillow
- winbuild\build\build_env.cmd
- '%PYTHON%\%EXECUTABLE% -m pip install -v -C raqm=vendor -C fribidi=vendor .'
- '%PYTHON%\%EXECUTABLE% selftest.py --installed'
test_script:
- cd c:\pillow
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout defusedxml numpy olefile pyroma'
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE%
- '%PYTHON%\%EXECUTABLE% -c "from PIL import Image"'
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests'
#- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest?
after_test:
- curl -Os https://uploader.codecov.io/latest/windows/codecov.exe
- .\codecov.exe --file coverage.xml --name %PYTHON% --flags AppVeyor
matrix:
fast_finish: true
cache:
- '%LOCALAPPDATA%\pip\Cache'
artifacts:
- path: pillow\*.egg
name: egg
- path: pillow\*.whl
name: wheel
before_deploy:
- cd c:\pillow
- '%PYTHON%\%EXECUTABLE% -m pip wheel -v -C raqm=vendor -C fribidi=vendor .'
- ps: Get-ChildItem .\*.whl | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
deploy:
provider: S3
region: us-west-2
access_key_id: AKIAIRAXC62ZNTVQJMOQ
secret_access_key:
secure: Hwb6klTqtBeMgxAjRoDltiiqpuH8xbwD4UooDzBSiCWXjuFj1lyl4kHgHwTCCGqi
bucket: pillow-nightly
folder: win/$(APPVEYOR_BUILD_NUMBER)/
artifact: /.*egg|wheel/
on:
APPVEYOR_REPO_NAME: python-pillow/Pillow
branch: main
deploy: YES
# Uncomment the following lines to get RDP access after the build/test and block for
# up to the timeout limit (~1hr)
#
#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

View File

@ -2,8 +2,4 @@
# gather the coverage data
python3 -m pip install coverage
if [[ $MATRIX_DOCKER ]]; then
python3 -m coverage xml --ignore-errors
else
python3 -m coverage xml
fi
python3 -m coverage xml

View File

@ -3,8 +3,5 @@
set -e
python3 -m coverage erase
if [ $(uname) == "Darwin" ]; then
export CPPFLAGS="-I/usr/local/miniconda/include";
fi
make clean
make install-coverage

View File

@ -2,73 +2,58 @@
aptget_update()
{
if [ ! -z $1 ]; then
if [ -n "$1" ]; then
echo ""
echo "Retrying apt-get update..."
echo ""
fi
output=`sudo apt-get update 2>&1`
output=$(sudo apt-get update 2>&1)
echo "$output"
if [[ $output == *[WE]:\ * ]]; then
return 1
fi
}
if [[ $(uname) != CYGWIN* ]]; then
aptget_update || aptget_update retry || aptget_update retry
fi
aptget_update || aptget_update retry || aptget_update retry
set -e
if [[ $(uname) != CYGWIN* ]]; then
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
cmake meson imagemagick libharfbuzz-dev libfribidi-dev\
sway wl-clipboard libopenblas-dev
fi
sudo apt-get -qq install libfreetype6-dev liblcms2-dev libtiff-dev python3-tk\
ghostscript libjpeg-turbo8-dev libopenjp2-7-dev\
cmake meson imagemagick libharfbuzz-dev libfribidi-dev\
sway wl-clipboard libopenblas-dev nasm
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
# TODO Update condition when cffi supports 3.13
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then PYTHONOPTIMIZE=0 python3 -m pip install cffi ; fi
python3 -m pip install coverage
python3 -m pip install defusedxml
python3 -m pip install ipython
python3 -m pip install olefile
python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install -U pytest-timeout
python3 -m pip install pyroma
# optional test dependencies, only install if there's a binary package.
python3 -m pip install --only-binary=:all: numpy || true
python3 -m pip install --only-binary=:all: pyarrow || true
if [[ $(uname) != CYGWIN* ]]; then
# TODO Update condition when NumPy supports 3.13
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then python3 -m pip install numpy ; fi
# PyQt6 doesn't support PyPy3
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
sudo apt-get -qq install libegl1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxkbcommon-x11-0
python3 -m pip install pyqt6
fi
# Pyroma uses non-isolated build and fails with old setuptools
if [[
$GHA_PYTHON_VERSION == pypy3.9
|| $GHA_PYTHON_VERSION == 3.8
|| $GHA_PYTHON_VERSION == 3.9
]]; then
# To match pyproject.toml
python3 -m pip install "setuptools>=67.8"
fi
# webp
pushd depends && ./install_webp.sh && popd
# libimagequant
pushd depends && ./install_imagequant.sh && popd
# raqm
pushd depends && ./install_raqm.sh && popd
# extra test images
pushd depends && ./install_extra_test_images.sh && popd
else
cd depends && ./install_extra_test_images.sh && cd ..
# PyQt6 doesn't support PyPy3
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
sudo apt-get -qq install libegl1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxkbcommon-x11-0
# pyqt6 doesn't yet support free-threading; only install if a wheel is available
python3 -m pip install --only-binary=:all: pyqt6 || true
fi
# webp
pushd depends && ./install_webp.sh && popd
# libimagequant
pushd depends && ./install_imagequant.sh && popd
# raqm
pushd depends && sudo ./install_raqm.sh && popd
# libavif
pushd depends && ./install_libavif.sh && popd
# extra test images
pushd depends && ./install_extra_test_images.sh && popd

View File

@ -1 +1 @@
cibuildwheel==2.19.1
cibuildwheel==3.4.1

View File

@ -1 +1,15 @@
mypy==1.10.1
mypy==1.20.2
arro3-compute
arro3-core
IceSpringPySideStubs-PyQt6
IceSpringPySideStubs-PySide6
ipython
numpy
packaging
pyarrow-stubs
pybind11
pytest
types-atheris
types-defusedxml
types-olefile
types-setuptools

View File

@ -0,0 +1 @@
check-jsonschema==0.37.1

3
.ci/test.cmd Normal file
View File

@ -0,0 +1,3 @@
python.exe -c "from PIL import Image"
IF ERRORLEVEL 1 EXIT /B
python.exe -bb -m pytest -vv -x -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests

View File

@ -4,4 +4,4 @@ set -e
python3 -c "from PIL import Image"
python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE
python3 -bb -m pytest -vv -x -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests $REVERSE

View File

@ -1,9 +1,30 @@
# A clang-format style that approximates Python's PEP 7
# Useful for IDE integration
Language: C
BasedOnStyle: Google
AlwaysBreakAfterReturnType: All
AllowShortIfStatementsOnASingleLine: false
AlignAfterOpenBracket: AlwaysBreak
AlignAfterOpenBracket: BlockIndent
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Attach
ColumnLimit: 88
DerivePointerAlignment: false
IndentGotoLabels: false
IndentWidth: 4
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
TabWidth: 4
UseTab: Never
---
Language: Cpp
BasedOnStyle: Google
AlwaysBreakAfterReturnType: All
AllowShortIfStatementsOnASingleLine: false
AlignAfterOpenBracket: BlockIndent
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Attach
@ -11,7 +32,6 @@ ColumnLimit: 88
DerivePointerAlignment: false
IndentGotoLabels: false
IndentWidth: 4
Language: Cpp
PointerAlignment: Right
ReflowComments: true
SortIncludes: false

View File

@ -18,7 +18,5 @@ exclude_also =
[run]
omit =
Tests/32bit_segfault_check.py
Tests/bench_cffi_access.py
Tests/check_*.py
checks/*.py
Tests/createfontdatachunk.py

View File

@ -9,7 +9,7 @@ Please send a pull request to the `main` branch. Please include [documentation](
- Fork the Pillow repository.
- Create a branch from `main`.
- Develop bug fixes, features, tests, etc.
- Run the test suite. You can enable GitHub Actions (https://github.com/MY-USERNAME/Pillow/actions) and [AppVeyor](https://ci.appveyor.com/projects/new) on your repo to catch test failures prior to the pull request, and [Codecov](https://codecov.io/gh) to see if the changed code is covered by tests.
- Run the test suite. You can enable GitHub Actions (https://github.com/MY-USERNAME/Pillow/actions) on your repo to catch test failures prior to the pull request, and [Codecov](https://codecov.io/gh) to see if the changed code is covered by tests.
- Create a pull request to pull the changes from your branch to the Pillow `main`.
### Guidelines
@ -17,9 +17,8 @@ Please send a pull request to the `main` branch. Please include [documentation](
- Separate code commits from reformatting commits.
- Provide tests for any newly added code.
- Follow PEP 8.
- When committing only documentation changes please include `[ci skip]` in the commit message to avoid running tests on AppVeyor.
- When committing only documentation changes please include `[ci skip]` in the commit message to avoid running extra tests.
- Include [release notes](https://github.com/python-pillow/Pillow/tree/main/docs/releasenotes) as needed or appropriate with your bug fixes, feature additions and tests.
- Do not add to the [changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) for proposed changes, as that is updated after changes are merged.
## Reporting Issues

3
.github/FUNDING.yml vendored
View File

@ -1 +1,2 @@
tidelift: "pypi/pillow"
github: python-pillow
tidelift: pypi/pillow

424
.github/INCIDENT_RESPONSE.md vendored Normal file
View File

@ -0,0 +1,424 @@
# Incident Response Plan — Pillow
This document describes how the Pillow maintainers detect, triage, fix, communicate, and
learn from security incidents. It supplements the existing [Security Policy](SECURITY.md)
and [Release Checklist](../RELEASING.md).
---
## 1. Preparation
Maintaining readiness before an incident occurs reduces response time and errors under pressure.
### 1.1 Version Support Matrix
Security fixes are applied to the **latest stable release only**. Users on older versions
are expected to upgrade. Reporters should assume only the latest release will receive a patch.
| Branch | Status |
|---|---|
| `main` / latest stable | ✅ Security fixes applied |
| All older releases | ❌ No security support — please upgrade |
### 1.2 Team Readiness
The four members of the Pillow core team are in regular contact and share collective
responsibility for incident response. Any core team member may act as Incident Lead.
Contact details are known to all team members.
### 1.3 Readiness Review
At each quarterly release, maintainers should re-read this document and update any stale content.
---
## 2. Scope
This plan covers:
| Incident type | Examples |
|---|---|
| Vulnerability in Pillow's own Python or C code | Buffer overflow in an image decoder, integer overflow in `ImagingNew` |
| Vulnerability in a bundled or wheel-shipped C library | libjpeg, libwebp, libtiff, libpng, openjpeg, libavif |
| Supply-chain compromise | Malicious commit, stolen maintainer credentials, tampered PyPI wheel |
| CI/CD or infrastructure compromise | GitHub Actions secret leak, Codecov breach, PyPI token exposure |
| Critical non-security regression | Data-loss bug shipped in a release, crash on all supported platforms |
---
## 3. Definitions
| Term | Meaning |
|---|---|
| **Incident** | Any event that compromises or threatens the confidentiality, integrity, or availability of Pillow's code, release artifacts, or infrastructure. |
| **Vulnerability** | A security flaw in Pillow or a bundled library that can be exploited by a crafted image or API call. |
| **Incident Lead** | The maintainer who owns coordination of the response from triage to closure. |
| **Embargo** | A period during which fix details are kept private to allow coordinated patching before public disclosure. |
| **Yank** | A PyPI action that keeps a release downloadable by pinned users but removes it from default `pip install` resolution. |
| **CVE** | Common Vulnerabilities and Exposures — a public identifier assigned to a specific vulnerability. |
| **CNA** | CVE Numbering Authority — GitHub is a CNA and can assign CVEs directly through the advisory workflow. |
---
## 4. Roles
| Role | Responsibility |
|---|---|
| **Incident Lead** | First maintainer to triage the report. Owns the incident until resolution. |
| **Patch Owner** | Writes and tests the fix (may be the same person as Incident Lead). |
| **Release Manager** | Cuts the point release following [RELEASING.md](../RELEASING.md). |
| **Communications Owner** | Drafts the GitHub Security Advisory, announces on Mastodon, notifies distros. |
| **Tidelift Contact** | For reports that arrive via Tidelift, coordinate through the Tidelift security portal. |
One person may fill multiple roles.
---
## 5. Severity Classification
Use the [CVSS 4.0](https://www.first.org/cvss/v4.0/specification-document) base score as
a guide, mapped to the following levels:
| Severity | CVSS | Definition | Target Response SLA |
|---|---|---|---|
| **Critical** | 9.0 10.0 | Remote code execution, arbitrary write, or complete integrity/confidentiality loss achievable by opening a crafted image | Best effort; embargoed release where possible |
| **High** | 7.0 8.9 | Heap/stack buffer overflow, use-after-free, or significant information disclosure | Best effort |
| **Medium** | 4.0 6.9 | Denial of service via crafted image, out-of-bounds read, limited info disclosure | Next scheduled quarterly release, or earlier point release if needed |
| **Low** | 0.1 3.9 | Minor information disclosure, unlikely to be exploitable in practice | Next quarterly release |
Supply-chain and CI/CD incidents are always treated as **Critical** regardless of CVSS.
> **Note:** These are good-faith targets for a small volunteer maintainer team, not contractual SLAs. Public safety and transparency will always be prioritised, even when timing varies.
---
## 6. Detection Sources
Vulnerabilities and incidents may be reported or discovered through:
1. **GitHub private security advisory** — preferred channel; see [SECURITY.md](SECURITY.md)
2. **Tidelift security contact**<https://tidelift.com/docs/security>
3. **External researcher / coordinated disclosure** — e.g. Google Project Zero, vendor PSIRT
4. **Automated scanning** — Dependabot, GitHub code-scanning (CodeQL), CI fuzzing
5. **Distro security teams** — Debian, Red Hat, Ubuntu, Alpine may report upstream
6. **User bug report** — public issue (reassess if it has security implications and convert to a private advisory if needed)
---
## 7. Response Process
### 7.1 Triage (all severities)
1. **Acknowledge receipt** to the reporter within **72 hours** using the template in
[Appendix A](#appendix-a-communication-templates). Ask the reporter:
- How they would like to be credited (name, handle, or anonymous)
- Whether they intend to publish their own advisory, and if so, their preferred timeline
- Thank them explicitly — reporters do the project a favour by disclosing privately.
2. Reproduce the issue. If the report is invalid, close it and notify the reporter.
3. Assign a severity level ([Section 5: Severity Classification](#5-severity-classification)).
4. If the GitHub Security Advisory was not created by the reporter, create one now and keep
it **private** until the fix is released. Add the reporter as a collaborator if they wish
to be involved.
5. **Request a CVE** through the GitHub Security Advisory workflow (GitHub is a CVE
Numbering Authority — no separate MITRE form required). The CVE is reserved privately
and published automatically when the advisory goes public.
6. **Escalation** — Escalate beyond the core maintainer team if any of the following apply:
- The fix requires changes to CPython or a dependency outside Pillow's control → contact the relevant upstream immediately
- A legal concern arises (e.g. GDPR-reportable data exposure) → contact the project's legal/fiscal sponsor
- The Incident Lead is unreachable for > 24 hours on a Critical issue → any other maintainer may assume the role
### 7.2 Fix Development
1. Develop the fix in a **private fork** or directly in the private security advisory
workspace on GitHub. Do **not** push to a public branch before the embargo lifts.
2. Write a regression test that fails before the fix and passes after.
3. Review the patch with at least one other maintainer.
### 7.3 Standard (Non-Embargoed) Release
For Medium and Low severity, or when no distro pre-notification is needed:
1. Merge the fix to `main`, then cherry-pick to all affected release branches
(see [RELEASING.md — Point release](../RELEASING.md)).
2. Amend commit messages to include the CVE identifier.
3. Follow the [Point release](../RELEASING.md#point-release) process in RELEASING.md to
tag, push, and confirm wheels are live on PyPI.
4. Publish the GitHub Security Advisory (this simultaneously publishes the CVE).
### 7.4 Embargoed Release
For Critical and High severity where distro pre-notification improves user safety:
1. Prepare patches against all affected release branches and test locally.
2. Agree on an **embargo date** with the reporter (typically 714 days out, up to 90 days for
complex issues).
3. Privately send the patch to distros via the
[linux-distros](https://oss-security.openwall.org/wiki/mailing-lists/distros) mailing list
or directly to individual distro security teams.
4. On the embargo date:
- Amend commit messages with the CVE identifier.
- Follow the [Embargoed release](../RELEASING.md#embargoed-release) process in
RELEASING.md to tag, push, and confirm wheels are live on PyPI.
- Publish the GitHub Security Advisory.
### 7.5 Supply-Chain / Infrastructure Compromise
1. **Immediately** revoke any potentially compromised credentials:
- PyPI API tokens
- GitHub personal access tokens and OAuth apps
- Codecov or other CI service tokens
2. Audit recent commits and releases for tampering:
- Verify release tags against known-good SHAs
- Re-inspect any wheel published since the potential compromise window
3. If a PyPI release is suspected to be tampered: yank it immediately via the
[PyPI release management page](https://pypi.org/manage/project/Pillow/releases/)
(login required); see [https://pypi.org/security/](https://pypi.org/security/) for
reporting to the PyPI security team.
4. Issue a public advisory describing the scope and any user action required.
### 7.6 Recovery
After the fix is released and the advisory is public:
1. Verify that the patched wheels are live on PyPI and passing CI across all supported platforms.
2. Confirm any yanked releases are handled correctly .
3. Resume normal development operations on `main`.
4. Monitor the GitHub issue tracker and Mastodon for user reports of residual problems for at least **72 hours** post-release.
5. Close the private GitHub Security Advisory once recovery is confirmed.
---
## 8. Communication
### Internal (during embargo)
- Use the **private GitHub Security Advisory** thread for coordination with the reporter.
- Use private communication channels for all other coordination.
- Do not discuss details in public issues, PRs, or Gitter/IRC channels.
### External (at or after disclosure)
| Audience | Channel | Timing |
|---|---|---|
| General users | [GitHub Security Advisory](https://github.com/python-pillow/Pillow/security/advisories) | At release |
| PyPI ecosystem | CVE published via advisory | At release |
| Downstream distros | Direct email or linux-distros list | Before embargo date (embargoed) |
| Tidelift subscribers | Tidelift security portal | At release (or coordinated) |
| Community | [Mastodon @pillow](https://fosstodon.org/@pillow) | At release |
**Advisory content should include:**
- CVE identifier and CVSS score
- Affected Pillow versions
- Fixed version(s)
- Nature of the vulnerability (without full exploit details if still fresh)
- Credit to the reporter (with their consent)
- Upgrade instructions (`python3 -m pip install --upgrade Pillow`)
---
## 9. Dependency Map
Understanding what Pillow depends on (upstream) and what depends on Pillow (downstream)
is essential for scoping impact and coordinating notifications during an incident.
### 9.1 Upstream Dependencies
#### Bundled C libraries (shipped in official wheels)
These libraries are compiled into Pillow's binary wheels. A CVE in any of them may
require a Pillow point release even if Pillow's own code is unchanged.
| Library | Purpose | Security advisory tracker |
|---|---|---|
| [libjpeg-turbo](https://libjpeg-turbo.org/) | JPEG encode/decode | [GitHub](https://github.com/libjpeg-turbo/libjpeg-turbo/security) |
| [libpng](http://www.libpng.org/pub/png/libpng.html) | PNG encode/decode within FreeType 2, OpenJPEG and WebP | [SourceForge](https://sourceforge.net/p/libpng/bugs/) |
| [libtiff](https://libtiff.gitlab.io/libtiff/) | TIFF encode/decode | [GitLab](https://gitlab.com/libtiff/libtiff/-/work_items) |
| [libwebp](https://chromium.googlesource.com/webm/libwebp) | WebP encode/decode | [Chromium tracker](https://issues.webmproject.org/issues) |
| [libavif](https://github.com/AOMediaCodec/libavif) | AVIF encode/decode | [GitHub](https://github.com/AOMediaCodec/libavif/security) |
| [aom](https://aomedia.googlesource.com/aom/) | AV1 codec (AVIF) | [Chromium tracker](https://aomedia.issues.chromium.org/issues) |
| [dav1d](https://code.videolan.org/videolan/dav1d) | AV1 decode (AVIF) | [VideoLAN Security](https://www.videolan.org/security/) |
| [openjpeg](https://www.openjpeg.org/) | JPEG 2000 encode/decode | [GitHub](https://github.com/uclouvain/openjpeg/security) |
| [freetype2](https://freetype.org/) | Font rendering | [GitLab](https://gitlab.freedesktop.org/freetype/freetype/-/work_items) |
| [lcms2](https://www.littlecms.com/) | ICC color management | [GitHub](https://github.com/mm2/Little-CMS/security) |
| [harfbuzz](https://harfbuzz.github.io/) | Text shaping (via raqm) | [GitHub](https://github.com/harfbuzz/harfbuzz/security) |
| [raqm](https://github.com/HOST-Oman/libraqm) | Complex text layout | [GitHub](https://github.com/HOST-Oman/libraqm) |
| [fribidi](https://github.com/fribidi/fribidi) | Unicode bidi (via raqm) | [GitHub](https://github.com/fribidi/fribidi) |
| [zlib](https://zlib.net/) | Deflate compression | [zlib.net](https://zlib.net/) |
| [liblzma / xz-utils](https://tukaani.org/xz/) | XZ/LZMA compression | [GitHub](https://github.com/tukaani-project/xz/security) |
| [bzip2](https://gitlab.com/bzip2/bzip2) | BZ2 compression | [GitLab](https://gitlab.com/bzip2/bzip2/-/work_items) |
| [zstd](https://github.com/facebook/zstd) | Zstandard compression | [GitHub](https://github.com/facebook/zstd/security) |
| [brotli](https://github.com/google/brotli) | Brotli compression | [GitHub](https://github.com/google/brotli/security) |
| [libyuv](https://chromium.googlesource.com/libyuv/libyuv/) | YUV conversion | [Chromium tracker](https://libyuv.issues.chromium.org/issues) |
#### Python-level dependencies
| Package | Required? | Purpose |
|---|---|---|
| `setuptools` | Build-time only | Package build backend |
| `pybind11` | Build-time only | Compile C files in parallel |
| `olefile` | Optional (`fpx`, `mic` extras) | OLE2 container parsing (FPX, MIC formats) |
| `defusedxml` | Optional (`xmp` extra) | Safe XML parsing for XMP metadata |
See [`pyproject.toml`](../pyproject.toml) for the complete and authoritative list of
optional dependencies.
### 9.2 Responding to an Upstream Vulnerability
When a CVE is published for a bundled C library:
1. Assess whether the vulnerable code path is reachable through Pillow's API.
2. If reachable, treat as a Pillow vulnerability and follow [Section 5: Severity Classification](#5-severity-classification).
3. Update the bundled library version in the wheel build scripts and rebuild wheels.
4. Reference the upstream CVE in Pillow's release notes and GitHub Security Advisory.
5. If not reachable, document the rationale in a public issue so downstream distributors
can make informed decisions about patching their system packages.
### 9.3 Downstream Dependencies
A vulnerability in Pillow can have wide impact. Notify or consider the blast radius of
these downstream consumers when assessing severity and planning communications.
#### Linux distribution packages
| Distribution | Package name | Security contact |
|---|---|---|
| Debian / Ubuntu | `python3-pil` | [Debian Security](https://www.debian.org/security/) / [Ubuntu Security](https://ubuntu.com/security) |
| Fedora / RHEL / CentOS | `python3-pillow` | [Red Hat Security](https://access.redhat.com/security/) |
| Alpine Linux | `py3-pillow` | [Alpine security](https://security.alpinelinux.org/) |
| Arch Linux | `python-pillow` | [Arch security tracker](https://security.archlinux.org/) |
| Homebrew | `pillow` | [Homebrew maintainers](https://github.com/Homebrew/homebrew-core/security) |
| conda-forge | `pillow` | [conda-forge](https://github.com/conda-forge/pillow-feedstock) |
#### Major Python ecosystem consumers
These are high-profile projects known to depend on Pillow; a critical vulnerability may
warrant proactive notification.
| Project | Usage |
|---|---|
| [matplotlib](https://matplotlib.org/) | Image I/O for plots |
| [scikit-image](https://scikit-image.org/) | Image processing |
| [torchvision](https://github.com/pytorch/vision) (PyTorch) | Dataset loading, transforms |
| [Keras / TensorFlow](https://keras.io/) | Image preprocessing utilities |
| [Django](https://www.djangoproject.com/) | `ImageField` validation and thumbnail generation |
| [Wagtail](https://wagtail.org/) | CMS image renditions |
| [Plone](https://plone.org/) | CMS image handling |
| [Jupyter / IPython](https://jupyter.org/) | Inline image display |
| [ReportLab](https://www.reportlab.com/) | PDF image embedding |
| [Tidelift subscribers](https://tidelift.com/) | Enterprise consumers (coordinated via Tidelift) |
#### Pillow ecosystem plugins
Third-party plugins extend Pillow and are distributed separately on PyPI. Their
maintainers should be notified for Critical/High issues that affect the plugin API
or the formats they decode. See the
[full plugin list](https://pillow.readthedocs.io/en/stable/handbook/third-party-plugins.html#plugin-list).
---
## 11. Plan Maintenance
This document is a living record. It should be kept current so it is useful when an incident actually occurs. Revisit it during the [Section 1.3 readiness review](#13-readiness-review) at each quarterly release.
---
## 12. References
- [Security Policy](SECURITY.md)
- [Release Checklist](../RELEASING.md)
- [Contributing Guide](CONTRIBUTING.md)
- [Tidelift Security Contact](https://tidelift.com/docs/security)
- [GitHub: Privately reporting a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)
- [GitHub as a CVE Numbering Authority (CNA)](https://docs.github.com/en/code-security/security-advisories/working-with-repository-security-advisories/about-repository-security-advisories)
- [FIRST CVSS 4.0 Calculator](https://www.first.org/cvss/calculator/4.0)
- [linux-distros mailing list](https://oss-security.openwall.org/wiki/mailing-lists/distros)
- [OpenSSF CVD Guide](https://github.com/ossf/oss-vulnerability-guide) *(basis for this plan)*
---
## Appendix A: Communication Templates
### A.1 Reporter Acknowledgment
> Subject: Re: [Security] \<brief issue description\>
>
> Hi \<name\>,
>
> Thank you for taking the time to report this issue. We appreciate it.
>
> We have received your report and will review it as soon as possible. We will
> keep you updated on our progress.
>
> Questions:
>
> - How would you like to be credited in the advisory? (name, handle,
> organisation, or anonymous)
> - Do you plan to publish your own write-up or advisory? If so, do you have a
> disclosure date in mind?
>
> We apply coordinated disclosure principles to all vulnerability reports. If
> you have any questions or concerns at any point, please reply to this thread.
>
> Thank you again,
> The Pillow team
### A.2 Embargoed Distro Notification
> Subject: [EMBARGOED] Pillow security issue — \<CVE-XXXX-XXXXX\> — disclosure \<DATE\>
>
> This is an embargoed notification of a vulnerability in Pillow. Please keep this
> information confidential until the disclosure date listed below.
>
> **CVE:** \<CVE-XXXX-XXXXX\>
>
> **Affected versions:** \<e.g. Pillow < 11.x.x\>
>
> **Fixed version:** \<version\>
>
> **Severity:** \<Critical / High / Medium / Low\> (CVSS \<score\>: \<vector\>)
>
> **Reporter:** \<name / affiliation, or "reported privately"\>
>
> **Public disclosure date:** \<DATE TIME UTC\>
>
> **Summary:**
> \<One paragraph describing the vulnerability class and impact without a full exploit.\>
>
> **Proof of concept:**
> \<Minimal reproducer or attached patch.\>
>
> **Remediation:**
> Upgrade to Pillow \<fixed version\>. No known workaround.
>
> Please do not share this information, issue public patches, or make user communications
> before the disclosure date. We will notify this list immediately if the date changes.
>
> — The Pillow maintainers
### A.3 Public Disclosure Advisory
*(Published as a GitHub Security Advisory; the CVE and date are included automatically.)*
> **Summary:** \<One-paragraph technical summary.\>
>
> **CVE:** \<CVE-XXXX-XXXXX\>
>
> **Affected versions:** Pillow \< \<fixed version\>
>
> **Fixed version:** \<version\>
>
> **Severity:** \<rating\> (CVSS \<score\>)
>
> **Reporter:** \<credited name / "reported privately"\>
>
> **Details:**
> \<Fuller technical description. Include attack scenario where helpful.\>
>
> **Remediation:**
> ```
> python3 -m pip install --upgrade Pillow
> ```
>
> **Timeline:**
> - Reported: \<date\>
> - Fixed: \<date\>
> - Disclosed: \<date\>

46
.github/ISSUE_TEMPLATE/RELEASE.md vendored Normal file
View File

@ -0,0 +1,46 @@
---
name: "Maintainers only: Release"
about: For maintainers to schedule a quarterly release
labels: Release
---
## Main release
Released quarterly on January 2nd, April 1st, July 1st and October 15th.
* [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154
* [ ] Develop and prepare release in `main` branch.
* [ ] Add release notes e.g. https://github.com/python-pillow/Pillow/pull/8885
* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) to confirm passing tests in `main` branch.
* [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them.
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py`
* [ ] Run pre-release check via `make release-test` in a freshly cloned repo.
* [ ] Create branch and tag for release e.g.:
```bash
git branch [[MAJOR.MINOR]].x
git tag [[MAJOR.MINOR]].0
git push --tags
```
* [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) has passed, including the "Upload release to PyPI" job. This will have been triggered by the new tag.
* [ ] Publish the [release on GitHub](https://github.com/python-pillow/Pillow/releases).
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), increment and append `.dev0` to version identifier in `src/PIL/_version.py` and then:
```bash
git push --all
```
## Publicize release
* [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321
## Documentation
* [ ] Make sure the [default version for Read the Docs](https://pillow.readthedocs.io/en/stable/) is up-to-date with the release changes
## Docker images
* [ ] Update Pillow in the Docker Images repository
```bash
git clone https://github.com/python-pillow/docker-images
cd docker-images
./update-pillow-tag.sh [[release tag]]
```

20
.github/SECURITY.md vendored
View File

@ -1,5 +1,21 @@
# Security policy
To report sensitive vulnerability information, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
## Reporting a vulnerability
If your organisation/employer is a distributor of Pillow and would like advance notification of security-related bugs, please let us know your preferred contact method.
To report sensitive vulnerability information, report it [privately on GitHub](https://github.com/python-pillow/Pillow/security/advisories/new).
If you cannot use GitHub, use the [Tidelift security contact](https://tidelift.com/docs/security). Tidelift will coordinate the fix and disclosure.
**DO NOT report sensitive vulnerability information in public.**
## Threat model
Pillow's primary attack surface is parsing untrusted image data. A full STRIDE threat model covering spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege is maintained in the [Security handbook page](https://pillow.readthedocs.io/en/latest/handbook/security.html).
Key risks to be aware of when using Pillow to process untrusted images:
- **Decompression bombs** — do not set `Image.MAX_IMAGE_PIXELS = None` in production.
- **EPS files invoke Ghostscript** — block EPS input at the application layer unless strictly required.
- **`ImageMath.unsafe_eval()`** — never pass user-controlled strings to this function; use `lambda_eval` instead.
- **C extension memory safety** — keep Pillow and its bundled C libraries (libjpeg, libpng, libtiff, libwebp, etc.) up to date.
- **Sandboxing** — for high-risk deployments, run image processing in a sandboxed subprocess.

271
.github/compare-dist-sizes.py vendored Normal file
View File

@ -0,0 +1,271 @@
"""Compare sizes of newly-built dists against the latest release on PyPI.
Fetches file sizes for the latest Pillow release from the PyPI JSON API
(no download required) and compares them to a directory of freshly-built
wheels and sdist. Outputs a table to stdout (and to
`$GITHUB_STEP_SUMMARY` if set).
Usage:
`uv run .github/compare-dist-sizes.py <dist-dir>`
"""
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "humanize",
# "prettytable",
# "termcolor",
# ]
# ///
from __future__ import annotations
import argparse
import json
import os
import re
import sys
import urllib.request
from pathlib import Path
import humanize
from prettytable import PrettyTable, TableStyle
from termcolor import colored
PYPI_JSON_URL = "https://pypi.org/pypi/pillow/json"
# Wheel filename: {distribution}-{version}(-{build})?-{python}-{abi}-{platform}.whl
# sdist filename: {distribution}-{version}.tar.gz
WHEEL_RE = re.compile(
r"^[^-]+-[^-]+(?:-(?P<build>\d[^-]*))?"
r"-(?P<python>[^-]+)-(?P<abi>[^-]+)-(?P<platform>[^-]+)\.whl$",
re.IGNORECASE,
)
SDIST_RE = re.compile(
r"^(?P<dist>[^-]+)-(?P<version>.+)\.tar\.gz$",
re.IGNORECASE,
)
def key_for(filename: str) -> str:
"""Return a version-independent identifier for a dist file."""
if m := WHEEL_RE.match(filename):
build = f"{m['build']}-" if m["build"] else ""
return f"wheel:{build}{m['python']}-{m['abi']}-{m['platform']}"
if SDIST_RE.match(filename):
return "sdist"
msg = f"Unexpected dist name: {filename}"
raise ValueError(msg)
def display_for(filename: str) -> str:
"""Strip the `pillow-{version}-` prefix for compact table display."""
if m := WHEEL_RE.match(filename):
build = f"{m['build']}-" if m["build"] else ""
return f"{build}{m['python']}-{m['abi']}-{m['platform']}.whl"
if SDIST_RE.match(filename):
return "sdist (.tar.gz)"
return filename
def fetch_pypi_sizes() -> tuple[str, dict[str, tuple[str, int]]]:
"""Return (version, {key: (filename, size)}) for the latest PyPI release."""
with urllib.request.urlopen(PYPI_JSON_URL) as response:
data = json.load(response)
version = data["info"]["version"]
sizes: dict[str, tuple[str, int]] = {}
for entry in data.get("urls", []):
filename = entry["filename"]
key = key_for(filename)
sizes[key] = (filename, entry["size"])
return version, sizes
def collect_local_sizes(dist_dir: Path) -> dict[str, tuple[str, int]]:
sizes: dict[str, tuple[str, int]] = {}
for path in sorted(dist_dir.iterdir()):
if not path.is_file():
continue
key = key_for(path.name)
sizes[key] = (path.name, path.stat().st_size)
return sizes
def human(n: int | None) -> str:
if n is None:
return "n/a"
return humanize.naturalsize(n)
def pct_change(before: int | None, after: int | None) -> str:
if before is None or after is None:
return "n/a"
delta = 0 if before == 0 else (after - before) / before * 100
return f"{delta:+.2f}%"
def pct_severity(text: str) -> dict[str, str] | None:
"""Return status indicators based on the change percent."""
if text == "n/a":
return None
pct = float(text.rstrip("%"))
if pct >= 5:
return {"color": "red", "emoji": "🔴"}
if pct > 0:
return {"color": "yellow", "emoji": "🟡"}
else:
return {"color": "green", "emoji": "🟢"}
def render_table(
baseline_label: str,
baseline_sizes: dict[str, tuple[str, int]],
local_sizes: dict[str, tuple[str, int]],
*,
markdown: bool,
) -> str:
table = PrettyTable()
table.set_style(TableStyle.MARKDOWN if markdown else TableStyle.SINGLE_BORDER)
table.field_names = ["File", "Size before", "Size now", "Change"]
table.align = "r"
table.align["File"] = "l"
def style(cells: list[str], role: str) -> list[str]:
severity = pct_severity(cells[3])
if markdown:
if severity:
cells[3] = f"{severity['emoji']} {cells[3]}"
if role == "orphan":
return [f"*{c}*" for c in cells]
if role == "summary":
return [f"**{c}**" for c in cells]
return cells
if role == "orphan":
return [colored(c, "dark_grey") for c in cells]
bold_attrs = ["bold"] if role == "summary" else []
if bold_attrs:
cells[:3] = [colored(c, attrs=bold_attrs) for c in cells[:3]]
if severity:
cells[3] = colored(cells[3], severity["color"], attrs=bold_attrs)
elif bold_attrs:
cells[3] = colored(cells[3], attrs=bold_attrs)
return cells
keys = list(set(baseline_sizes) | set(local_sizes))
# Put sdist first for readability
keys.sort(key=lambda k: (k != "sdist", k))
wheel_before = []
wheel_after = []
total_before = []
total_after = []
for key in keys:
baseline_entry = baseline_sizes.get(key)
local_entry = local_sizes.get(key)
display_name = display_for((local_entry or baseline_entry)[0])
before = baseline_entry[1] if baseline_entry else None
after = local_entry[1] if local_entry else None
if after is None:
# Removed since baseline: ignore in totals
role = "orphan"
else:
# Present locally (in both, or newly added): count in totals
total_after.append(after)
if before is not None:
total_before.append(before)
if key != "sdist":
wheel_after.append(after)
if before is not None:
wheel_before.append(before)
role = "data"
cells = [
display_name,
human(before),
human(after),
pct_change(before, after),
]
table.add_row(style(cells, role))
if not markdown:
table.add_divider()
if wheel_after:
avg_before = sum(wheel_before) // len(wheel_before) if wheel_before else None
table.add_row(
style(
[
f"wheel average ({len(wheel_after)} wheels)",
human(avg_before),
human(sum(wheel_after) // len(wheel_after)),
pct_change(avg_before, sum(wheel_after) // len(wheel_after)),
],
"summary",
)
)
table.add_row(
style(
[
f"wheel total ({len(wheel_after)} wheels)",
human(sum(wheel_before)),
human(sum(wheel_after)),
pct_change(sum(wheel_before), sum(wheel_after)),
],
"summary",
),
divider=not markdown,
)
if total_after:
table.add_row(
style(
[
f"artifacts total ({len(total_after)} artifacts)",
human(sum(total_before)),
human(sum(total_after)),
pct_change(sum(total_before), sum(total_after)),
],
"summary",
)
)
title = f"## Dist size comparison vs {baseline_label}"
if not markdown:
title = colored(title, attrs=["bold"])
return f"{title}\n\n{table.get_string()}\n"
def main() -> int:
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument(
"dist_dir",
type=Path,
help="Directory containing newly-built wheels and sdist",
)
args = parser.parse_args()
if not args.dist_dir.is_dir():
print(f"error: {args.dist_dir} is not a directory", file=sys.stderr)
return 1
baseline_version, baseline_sizes = fetch_pypi_sizes()
baseline_label = f"Pillow {baseline_version} on PyPI"
local_sizes = collect_local_sizes(args.dist_dir)
print(render_table(baseline_label, baseline_sizes, local_sizes, markdown=False))
if summary_path := os.environ.get("GITHUB_STEP_SUMMARY"):
with open(summary_path, "a", encoding="utf-8") as f:
f.write(
render_table(baseline_label, baseline_sizes, local_sizes, markdown=True)
)
return 0
if __name__ == "__main__":
sys.exit(main())

19
.github/dependencies.json vendored Normal file
View File

@ -0,0 +1,19 @@
{
"brotli": "1.2.0",
"bzip2": "1.0.8",
"freetype": "2.14.3",
"fribidi": "1.0.16",
"harfbuzz": "14.2.0",
"jpegturbo": "3.1.4.1",
"lcms2": "2.19",
"libavif": "1.4.1",
"libimagequant": "4.4.1",
"libpng": "1.6.58",
"libwebp": "1.6.0",
"libxcb": "1.17.0",
"openjpeg": "2.5.4",
"tiff": "4.7.1",
"xz": "5.8.3",
"zlib-ng": "2.3.3",
"zstd": "1.5.7"
}

560
.github/generate-sbom.py vendored Executable file
View File

@ -0,0 +1,560 @@
#!/usr/bin/env python3
"""Generate a CycloneDX 1.7 SBOM for Pillow's C extensions and their
vendored/optional native library dependencies.
Usage:
python3 .github/generate-sbom.py [output-file]
Output defaults to pillow-{version}.cdx.json in the current directory.
"""
from __future__ import annotations
import argparse
import base64
import datetime as dt
import difflib
import hashlib
import json
import urllib.request
import uuid
from pathlib import Path
def get_version() -> str:
version_file = Path(__file__).parent.parent / "src" / "PIL" / "_version.py"
return version_file.read_text(encoding="utf-8").split('"')[1]
def load_dep_versions() -> dict[str, str]:
deps_file = Path(__file__).parent / "dependencies.json"
return json.loads(deps_file.read_text(encoding="utf-8"))
def sha256_file(path: Path) -> str:
return hashlib.sha256(path.read_bytes()).hexdigest()
def upstream_diff_b64(
upstream_url: str,
upstream_display: bytes,
local_path: Path,
local_display: bytes,
) -> str:
"""
Fetch an upstream file and return a base64-encoded unified diff vs the local copy.
"""
with urllib.request.urlopen(upstream_url) as resp:
upstream_text = resp.read()
local_text = local_path.read_bytes()
diff_lines = difflib.diff_bytes(
difflib.unified_diff,
upstream_text.splitlines(keepends=True),
local_text.splitlines(keepends=True),
fromfile=b"a/" + upstream_display,
tofile=b"b/" + local_display,
)
return base64.b64encode(b"".join(diff_lines)).decode()
def generate(version: str) -> dict:
serial = str(uuid.uuid4())
now = dt.datetime.now(dt.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
purl = f"pkg:pypi/pillow@{version}"
root = Path(__file__).parent.parent
thirdparty = root / "src" / "thirdparty"
versions = load_dep_versions()
metadata_component = {
"bom-ref": purl,
"type": "library",
"name": "Pillow",
"version": version,
"description": "Python Imaging Library (fork)",
"licenses": [{"license": {"id": "MIT-CMU"}}],
"purl": purl,
"externalReferences": [
{"type": "website", "url": "https://python-pillow.github.io"},
{"type": "vcs", "url": "https://github.com/python-pillow/Pillow"},
{"type": "documentation", "url": "https://pillow.readthedocs.io"},
{
"type": "security-contact",
"url": "https://github.com/python-pillow/Pillow/security/policy",
},
],
}
c_extensions = [
("PIL._avif", "AVIF image format extension"),
(
"PIL._imaging",
"Core image processing extension "
"(decode, encode, map, display, outline, path, libImaging)",
),
("PIL._imagingcms", "LittleCMS2 colour management extension"),
("PIL._imagingft", "FreeType font rendering extension"),
("PIL._imagingmath", "Image math operations extension"),
("PIL._imagingmorph", "Image morphology extension"),
("PIL._imagingtk", "Tk/Tcl display extension"),
("PIL._webp", "WebP image format extension"),
]
ext_components = [
{
"bom-ref": f"{purl}#c-ext/{name}",
"type": "library",
"name": name,
"version": version,
"description": desc,
"licenses": [{"license": {"id": "MIT-CMU"}}],
"purl": f"{purl}#c-ext/{name}",
}
for name, desc in c_extensions
]
vendored_components = [
{
"bom-ref": f"{purl}#thirdparty/fribidi-shim",
"type": "library",
"name": "fribidi-shim",
"version": "1.x",
"description": "FriBiDi runtime-loading shim "
"(vendored in src/thirdparty/fribidi-shim/); "
"loads libfribidi dynamically",
"licenses": [{"license": {"id": "LGPL-2.1-or-later"}}],
"hashes": [
{
"alg": "SHA-256",
"content": sha256_file(thirdparty / "fribidi-shim" / "fribidi.c"),
}
],
"pedigree": {
"notes": "Pillow-authored shim; not taken from an upstream project."
},
"externalReferences": [
{"type": "website", "url": "https://github.com/fribidi/fribidi"},
],
},
{
"bom-ref": "pkg:github/python/pythoncapi-compat",
"type": "library",
"name": "pythoncapi_compat",
"description": "Backport header for new CPython C-API functions "
"(vendored in src/thirdparty/pythoncapi_compat.h)",
"licenses": [{"license": {"id": "0BSD"}}],
"hashes": [
{
"alg": "SHA-256",
"content": sha256_file(thirdparty / "pythoncapi_compat.h"),
}
],
"pedigree": {
"notes": "Vendored unmodified from upstream python/pythoncapi-compat."
},
"externalReferences": [
{
"type": "vcs",
"url": "https://github.com/python/pythoncapi-compat",
},
],
},
{
"bom-ref": f"{purl}#thirdparty/raqm",
"type": "library",
"name": "raqm",
"version": "0.10.5",
"description": "Complex text layout library "
"(vendored in src/thirdparty/raqm/)",
"licenses": [{"license": {"id": "MIT"}}],
"hashes": [
{
"alg": "SHA-256",
"content": sha256_file(thirdparty / "raqm" / "raqm.c"),
}
],
"pedigree": {
"ancestors": [
{
"bom-ref": "pkg:github/HOST-Oman/libraqm@0.10.5#upstream",
"type": "library",
"name": "raqm",
"version": "0.10.5",
"purl": "pkg:github/HOST-Oman/libraqm@0.10.5",
"externalReferences": [
{
"type": "distribution",
"url": "https://github.com/HOST-Oman/libraqm/releases/tag/v0.10.5",
}
],
}
],
"patches": [
{
"type": "unofficial",
"diff": {
"text": {
# raqm-version.h.in → raqm-version.h:
# template @RAQM_VERSION_*@ placeholders replaced
# with literal 0.10.5 values; filename changed to
# drop the .in suffix; minor indentation fix.
"content": upstream_diff_b64(
"https://raw.githubusercontent.com/HOST-Oman/libraqm/v0.10.5/src/raqm-version.h.in",
b"src/raqm-version.h.in",
thirdparty / "raqm" / "raqm-version.h",
b"src/raqm-version.h",
),
"encoding": "base64",
}
},
},
{
"type": "unofficial",
"diff": {
"text": {
# raqm.c: wrap the <fribidi.h> include in an
# #ifdef HAVE_FRIBIDI_SYSTEM guard so that when
# building without a system FriBiDi Pillow's own
# fribidi-shim is used instead.
"content": upstream_diff_b64(
"https://raw.githubusercontent.com/HOST-Oman/libraqm/v0.10.5/src/raqm.c",
b"src/raqm.c",
thirdparty / "raqm" / "raqm.c",
b"src/raqm.c",
),
"encoding": "base64",
}
},
},
],
"notes": (
"Vendored from upstream HOST-Oman/libraqm v0.10.5 with two "
"Pillow-specific modifications: (1) raqm-version.h.in was "
"pre-processed into raqm-version.h with version placeholders "
"replaced by literal values; (2) raqm.c wraps the <fribidi.h> "
"include in an #ifdef HAVE_FRIBIDI_SYSTEM guard so Pillow's "
"bundled fribidi-shim is used when a system FriBiDi is absent."
),
},
"externalReferences": [
{
"type": "vcs",
"url": "https://github.com/python-pillow/Pillow/tree/main/src/thirdparty/raqm",
},
],
},
]
native_deps = [
{
"bom-ref": "pkg:generic/freetype2",
"type": "library",
"name": "FreeType",
"version": versions["freetype"],
"scope": "optional",
"description": "Font rendering (optional, used by PIL._imagingft). "
"Required for text/font support.",
"licenses": [{"license": {"id": "FTL"}}],
"externalReferences": [
{"type": "website", "url": "https://freetype.org"},
{
"type": "distribution",
"url": "https://download.savannah.gnu.org/releases/freetype/",
},
],
},
{
"bom-ref": "pkg:generic/fribidi",
"type": "library",
"name": "FriBiDi",
"version": versions["fribidi"],
"scope": "optional",
"description": "Unicode bidi algorithm library (optional, "
"loaded at runtime by fribidi-shim).",
"licenses": [{"license": {"id": "LGPL-2.1-or-later"}}],
"externalReferences": [
{"type": "website", "url": "https://github.com/fribidi/fribidi"},
{
"type": "distribution",
"url": "https://github.com/fribidi/fribidi/releases",
},
],
},
{
"bom-ref": "pkg:generic/harfbuzz",
"type": "library",
"name": "HarfBuzz",
"version": versions["harfbuzz"],
"scope": "optional",
"description": "Text shaping (optional, required by libraqm "
"for complex text layout).",
"licenses": [{"license": {"id": "MIT"}}],
"externalReferences": [
{"type": "website", "url": "https://harfbuzz.github.io"},
{
"type": "distribution",
"url": "https://github.com/harfbuzz/harfbuzz/releases",
},
],
},
{
"bom-ref": "pkg:generic/libavif",
"type": "library",
"name": "libavif",
"version": versions["libavif"],
"scope": "optional",
"description": "AVIF codec (optional, used by PIL._avif).",
"licenses": [{"license": {"id": "BSD-2-Clause"}}],
"externalReferences": [
{"type": "website", "url": "https://github.com/AOMediaCodec/libavif"},
{
"type": "distribution",
"url": "https://github.com/AOMediaCodec/libavif/releases",
},
],
},
{
"bom-ref": "pkg:generic/libimagequant",
"type": "library",
"name": "libimagequant",
"version": versions["libimagequant"],
"scope": "optional",
"description": "Improved colour quantization (optional).",
"licenses": [{"license": {"id": "GPL-3.0-or-later"}}],
"externalReferences": [
{"type": "website", "url": "https://pngquant.org/lib/"},
{
"type": "distribution",
"url": "https://github.com/ImageOptim/libimagequant/tags",
},
],
},
{
"bom-ref": "pkg:generic/libjpeg",
"type": "library",
"name": "libjpeg / libjpeg-turbo",
"version": versions["jpegturbo"],
"description": "JPEG codec (required by default; disable with "
"-C jpeg=disable).",
"licenses": [
{"license": {"id": "IJG"}},
{"license": {"id": "BSD-3-Clause"}},
],
"externalReferences": [
{"type": "website", "url": "https://ijg.org"},
{"type": "website", "url": "https://libjpeg-turbo.org"},
{
"type": "distribution",
"url": "https://github.com/libjpeg-turbo/libjpeg-turbo/releases",
},
],
},
{
"bom-ref": "pkg:generic/libtiff",
"type": "library",
"name": "libtiff",
"version": versions["tiff"],
"scope": "optional",
"description": "TIFF codec (optional).",
"licenses": [{"license": {"id": "libtiff"}}],
"externalReferences": [
{"type": "website", "url": "https://libtiff.gitlab.io/libtiff/"},
{
"type": "distribution",
"url": "https://download.osgeo.org/libtiff/",
},
],
},
{
"bom-ref": "pkg:generic/libwebp",
"type": "library",
"name": "libwebp",
"version": versions["libwebp"],
"scope": "optional",
"description": "WebP codec (optional, used by PIL._webp).",
"licenses": [{"license": {"id": "BSD-3-Clause"}}],
"externalReferences": [
{
"type": "website",
"url": "https://chromium.googlesource.com/webm/libwebp",
},
{
"type": "distribution",
"url": "https://chromium.googlesource.com/webm/libwebp",
},
],
},
{
"bom-ref": "pkg:generic/libxcb",
"type": "library",
"name": "libxcb",
"version": versions["libxcb"],
"scope": "optional",
"description": "X11 screen-grab support (optional, "
"used by PIL._imaging on macOS and Linux).",
"licenses": [{"license": {"id": "X11"}}],
"externalReferences": [
{"type": "website", "url": "https://xcb.freedesktop.org"},
{
"type": "distribution",
"url": "https://xcb.freedesktop.org/dist/",
},
],
},
{
"bom-ref": "pkg:generic/littlecms2",
"type": "library",
"name": "Little CMS 2",
"version": versions["lcms2"],
"scope": "optional",
"description": "Colour management (optional, used by PIL._imagingcms).",
"licenses": [{"license": {"id": "MIT"}}],
"externalReferences": [
{"type": "website", "url": "https://www.littlecms.com"},
{
"type": "distribution",
"url": "https://github.com/mm2/Little-CMS/releases",
},
],
},
{
"bom-ref": "pkg:generic/openjpeg",
"type": "library",
"name": "OpenJPEG",
"version": versions["openjpeg"],
"scope": "optional",
"description": "JPEG 2000 codec (optional).",
"licenses": [{"license": {"id": "BSD-2-Clause"}}],
"externalReferences": [
{"type": "website", "url": "https://www.openjpeg.org"},
{
"type": "distribution",
"url": "https://github.com/uclouvain/openjpeg/releases",
},
],
},
{
"bom-ref": "pkg:pypi/pybind11",
"type": "library",
"name": "pybind11",
"scope": "excluded",
"description": "Parallel C compilation library (build-time dependency).",
"licenses": [{"license": {"id": "BSD-3-Clause"}}],
"externalReferences": [
{"type": "website", "url": "https://pybind11.readthedocs.io"},
{
"type": "distribution",
"url": "https://github.com/pybind/pybind11/releases",
},
],
},
{
"bom-ref": "pkg:generic/zlib",
"type": "library",
"name": "zlib",
"version": versions["zlib-ng"],
"description": "Deflate/PNG compression (required by default; "
"disable with -C zlib=disable).",
"licenses": [{"license": {"id": "Zlib"}}],
"externalReferences": [
{"type": "website", "url": "https://zlib.net"},
{"type": "distribution", "url": "https://zlib.net"},
],
},
]
dependencies = [
{
"ref": purl,
"dependsOn": [e["bom-ref"] for e in ext_components],
},
{
"ref": f"{purl}#c-ext/PIL._avif",
"dependsOn": ["pkg:generic/libavif"],
},
{
"ref": f"{purl}#c-ext/PIL._imaging",
"dependsOn": [
"pkg:generic/libimagequant",
"pkg:generic/libjpeg",
"pkg:generic/libtiff",
"pkg:generic/libxcb",
"pkg:generic/openjpeg",
"pkg:generic/zlib",
],
},
{
"ref": f"{purl}#c-ext/PIL._imagingcms",
"dependsOn": ["pkg:generic/littlecms2"],
},
{
"ref": f"{purl}#c-ext/PIL._imagingft",
"dependsOn": [
"pkg:generic/freetype2",
"pkg:generic/fribidi",
"pkg:generic/harfbuzz",
f"{purl}#thirdparty/fribidi-shim",
f"{purl}#thirdparty/raqm",
],
},
{
"ref": f"{purl}#c-ext/PIL._webp",
"dependsOn": ["pkg:generic/libwebp"],
},
{
"ref": f"{purl}#thirdparty/raqm",
"dependsOn": [
"pkg:generic/harfbuzz",
f"{purl}#thirdparty/fribidi-shim",
],
},
]
return {
"$schema": "http://cyclonedx.org/schema/bom-1.7.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.7",
"serialNumber": f"urn:uuid:{serial}",
"version": 1,
"metadata": {
"timestamp": now,
"lifecycles": [{"phase": "build"}],
"tools": {
"components": [
{
"type": "application",
"name": "generate-sbom.py",
"group": "pillow",
}
]
},
"component": metadata_component,
},
"components": ext_components + vendored_components + native_deps,
"dependencies": dependencies,
}
def main() -> None:
version = get_version()
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument(
"output",
nargs="?",
type=Path,
default=Path(f"pillow-{version}.cdx.json"),
help="output file",
)
args = parser.parse_args()
sbom = generate(version)
args.output.write_text(json.dumps(sbom, indent=2) + "\n", encoding="utf-8")
print(
f"Wrote {args.output} (Pillow {version}, {len(sbom['components'])} components)"
)
if __name__ == "__main__":
main()

2
.github/mergify.yml vendored
View File

@ -8,8 +8,6 @@ pull_request_rules:
- status-success=Docker Test Successful
- status-success=Windows Test Successful
- status-success=MinGW
- status-success=Cygwin Test Successful
- status-success=continuous-integration/appveyor/pr
actions:
merge:
method: merge

View File

@ -3,18 +3,19 @@ tag-template: "$NEXT_MINOR_VERSION"
change-template: '- $TITLE #$NUMBER [@$AUTHOR]'
categories:
- title: "Dependencies"
label: "Dependency"
- title: "Removals"
label: "Removal"
- title: "Deprecations"
label: "Deprecation"
- title: "Documentation"
label: "Documentation"
- title: "Removals"
label: "Removal"
- title: "Dependencies"
label: "Dependency"
- title: "Testing"
label: "Testing"
- title: "Type hints"
label: "Type hints"
- title: "Other changes"
exclude-labels:
- "changelog: skip"
@ -23,6 +24,4 @@ template: |
https://pillow.readthedocs.io/en/stable/releasenotes/$NEXT_MINOR_VERSION.html
## Changes
$CHANGES

166
.github/renovate.json vendored
View File

@ -1,17 +1,175 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:recommended"
],
"labels": [
"Dependency"
],
"minimumReleaseAge": "7 days",
"prCreation": "not-pending",
"schedule": [
"* * 3 * *"
],
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"brotli\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "brotli",
"packageNameTemplate": "google/brotli",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"bzip2\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "bzip2",
"packageNameTemplate": "bzip2/bzip2",
"datasourceTemplate": "gitlab-tags",
"extractVersionTemplate": "^bzip2-(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"freetype\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "freetype",
"packageNameTemplate": "freetype/freetype",
"datasourceTemplate": "gitlab-tags",
"registryUrlTemplate": "https://gitlab.freedesktop.org",
"extractVersionTemplate": "^VER-(?<version>[\\d-]+)$",
"versioningTemplate": "regex:^(?<major>\\d+)[.-](?<minor>\\d+)[.-](?<patch>\\d+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"fribidi\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "fribidi",
"packageNameTemplate": "fribidi/fribidi",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"harfbuzz\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "harfbuzz",
"packageNameTemplate": "harfbuzz/harfbuzz",
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"jpegturbo\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "jpegturbo",
"packageNameTemplate": "libjpeg-turbo/libjpeg-turbo",
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"lcms2\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "lcms2",
"packageNameTemplate": "mm2/Little-CMS",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^lcms(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"libavif\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "libavif",
"packageNameTemplate": "AOMediaCodec/libavif",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"libimagequant\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "libimagequant",
"packageNameTemplate": "ImageOptim/libimagequant",
"datasourceTemplate": "github-tags"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"libpng\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "libpng",
"packageNameTemplate": "pnggroup/libpng",
"datasourceTemplate": "github-tags",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"libwebp\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "libwebp",
"packageNameTemplate": "webmproject/libwebp",
"datasourceTemplate": "github-tags",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"libxcb\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "libxcb",
"packageNameTemplate": "xorg/lib/libxcb",
"datasourceTemplate": "gitlab-tags",
"registryUrlTemplate": "https://gitlab.freedesktop.org",
"extractVersionTemplate": "^libxcb-(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"openjpeg\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "openjpeg",
"packageNameTemplate": "uclouvain/openjpeg",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"tiff\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "tiff",
"packageNameTemplate": "libtiff/libtiff",
"datasourceTemplate": "gitlab-tags",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"xz\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "xz",
"packageNameTemplate": "tukaani-project/xz",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.+)$"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"zlib-ng\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "zlib-ng",
"packageNameTemplate": "zlib-ng/zlib-ng",
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"zstd\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "zstd",
"packageNameTemplate": "facebook/zstd",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>.+)$"
}
],
"packageRules": [
{
"groupName": "github-actions",
"matchManagers": ["github-actions"],
"separateMajorMinor": "false"
"separateMajorMinor": false
}
],
"schedule": ["on the 3rd day of the month"]
]
}

13
.github/workflows/Brewfile vendored Normal file
View File

@ -0,0 +1,13 @@
brew "aom"
brew "dav1d"
brew "freetype"
brew "ghostscript"
brew "jpeg-turbo"
brew "libimagequant"
brew "libraqm"
brew "libtiff"
brew "little-cms2"
brew "openjpeg"
brew "rav1e"
brew "svt-av1"
brew "webp"

View File

@ -4,15 +4,14 @@ on:
push:
branches:
- "**"
paths:
paths: &paths
- ".github/dependencies.json"
- ".github/workflows/cifuzz.yml"
- ".github/workflows/wheels-dependencies.sh"
- "**.c"
- "**.h"
pull_request:
paths:
- ".github/workflows/cifuzz.yml"
- "**.c"
- "**.h"
paths: *paths
workflow_dispatch:
permissions:
@ -22,33 +21,36 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@d87225267726cf7ce1a3e17cf103c5ac943c4f05 # master
with:
oss-fuzz-project-name: 'pillow'
language: python
dry-run: false
- name: Run Fuzzers
id: run
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@d87225267726cf7ce1a3e17cf103c5ac943c4f05 # master
with:
oss-fuzz-project-name: 'pillow'
fuzz-seconds: 600
language: python
dry-run: false
- name: Upload New Crash
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Upload Legacy Crash
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: steps.run.outcome == 'success'
with:
name: crash

View File

@ -4,15 +4,12 @@ on:
push:
branches:
- "**"
paths:
paths: &paths
- ".github/workflows/docs.yml"
- "docs/**"
- "src/PIL/**"
pull_request:
paths:
- ".github/workflows/docs.yml"
- "docs/**"
- "src/PIL/**"
paths: *paths
workflow_dispatch:
permissions:
@ -32,10 +29,12 @@ jobs:
name: Docs
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"
cache: pip
@ -46,19 +45,35 @@ jobs:
- name: Build system information
run: python3 .github/workflows/system-info.py
- name: Cache libavif
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-libavif
with:
path: ~/cache-libavif
key: ${{ runner.os }}-libavif-${{ hashFiles('depends/install_libavif.sh', 'depends/libavif-svt4.patch') }}
- name: Cache libimagequant
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-libimagequant
with:
path: ~/cache-libimagequant
key: ${{ runner.os }}-libimagequant-${{ hashFiles('depends/install_imagequant.sh') }}
- name: Cache libwebp
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-libwebp
with:
path: ~/cache-libwebp
key: ${{ runner.os }}-libwebp-${{ hashFiles('depends/install_webp.sh') }}
- name: Install Linux dependencies
run: |
.ci/install.sh
env:
GHA_PYTHON_VERSION: "3.x"
GHA_LIBAVIF_CACHE_HIT: ${{ steps.cache-libavif.outputs.cache-hit }}
GHA_LIBIMAGEQUANT_CACHE_HIT: ${{ steps.cache-libimagequant.outputs.cache-hit }}
GHA_LIBWEBP_CACHE_HIT: ${{ steps.cache-libwebp.outputs.cache-hit }}
- name: Build
run: |

View File

@ -2,53 +2,31 @@ name: Lint
on: [push, pull_request, workflow_dispatch]
permissions: {}
env:
FORCE_COLOR: 1
permissions:
contents: read
PREK_COLOR: always
RUFF_OUTPUT_FORMAT: github
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- name: pre-commit cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-pre-commit-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
cache-dependency-path: "setup.py"
- name: Build system information
run: python3 .github/workflows/system-info.py
- name: Install dependencies
run: |
python3 -m pip install -U pip
python3 -m pip install -U tox
- name: Lint
run: tox -e lint
env:
PRE_COMMIT_COLOR: always
- name: Mypy
run: tox -e mypy
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Lint
run: uvx --with tox-uv tox -e lint
- name: Mypy
run: uvx --with tox-uv tox -e mypy

View File

@ -2,35 +2,23 @@
set -e
brew install \
freetype \
ghostscript \
libimagequant \
libjpeg \
libtiff \
little-cms2 \
openjpeg \
webp
if [[ "$ImageOS" == "macos13" ]]; then
brew install --ignore-dependencies libraqm
else
brew install libraqm
fi
brew bundle --file=.github/workflows/Brewfile
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
# TODO Update condition when cffi supports 3.13
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then PYTHONOPTIMIZE=0 python3 -m pip install cffi ; fi
python3 -m pip install coverage
python3 -m pip install defusedxml
python3 -m pip install ipython
python3 -m pip install olefile
python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install -U pytest-timeout
python3 -m pip install pyroma
# optional test dependencies, only install if there's a binary package.
python3 -m pip install --only-binary=:all: numpy || true
python3 -m pip install --only-binary=:all: pyarrow || true
# TODO Update condition when NumPy supports 3.13
if ! [[ "$GHA_PYTHON_VERSION" == "3.13" ]]; then python3 -m pip install numpy ; fi
# libavif
pushd depends && ./install_libavif.sh && popd
# extra test images
pushd depends && ./install_extra_test_images.sh && popd

View File

@ -14,6 +14,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
update_release_draft:
permissions:
@ -23,6 +26,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next release notes as pull requests are merged into "main"
- uses: release-drafter/release-drafter@v6
- uses: release-drafter/release-drafter@5de93583980a40bd78603b6dfdcda5b4df377b32 # v7.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -6,21 +6,26 @@ on:
workflow_dispatch:
permissions:
issues: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
stale:
if: github.repository_owner == 'python-pillow'
if: github.event.repository.fork == false
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: "Check issues"
uses: actions/stale@v9
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
only-labels: "Awaiting OP Action"

View File

@ -1,151 +0,0 @@
name: Test Cygwin
on:
push:
branches:
- "**"
paths-ignore:
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
pull_request:
paths-ignore:
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
COVERAGE_CORE: sysmon
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-minor-version: [8, 9]
timeout-minutes: 40
name: Python 3.${{ matrix.python-minor-version }}
steps:
- name: Fix line endings
run: |
git config --global core.autocrlf input
- name: Checkout Pillow
uses: actions/checkout@v4
- name: Install Cygwin
uses: cygwin/cygwin-install-action@v4
with:
packages: >
gcc-g++
ghostscript
git
ImageMagick
jpeg
libfreetype-devel
libimagequant-devel
libjpeg-devel
liblapack-devel
liblcms2-devel
libopenjp2-devel
libraqm-devel
libtiff-devel
libwebp-devel
libxcb-devel
libxcb-xinerama0
make
netpbm
perl
python3${{ matrix.python-minor-version }}-cffi
python3${{ matrix.python-minor-version }}-cython
python3${{ matrix.python-minor-version }}-devel
python3${{ matrix.python-minor-version }}-numpy
python3${{ matrix.python-minor-version }}-sip
python3${{ matrix.python-minor-version }}-tkinter
wget
xorg-server-extra
zlib-devel
- name: Add Lapack to PATH
uses: egor-tensin/cleanup-path@v4
with:
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'
- name: Select Python version
run: |
ln -sf c:/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/cygwin/bin/python3
- name: pip cache
uses: actions/cache@v4
with:
path: 'C:\cygwin\home\runneradmin\.cache\pip'
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
restore-keys: |
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-
- name: Build system information
run: |
dash.exe -c "python3 .github/workflows/system-info.py"
- name: Install dependencies
run: |
bash.exe .ci/install.sh
- name: Build
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
.ci/build.sh
- name: Test
run: |
bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh
- name: Prepare to upload errors
if: failure()
run: |
dash.exe -c "mkdir -p Tests/errors"
- name: Upload errors
uses: actions/upload-artifact@v4
if: failure()
with:
name: errors
path: Tests/errors
- name: After success
run: |
bash.exe .ci/after_success.sh
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: GHA_Cygwin
name: Cygwin Python 3.${{ matrix.python-minor-version }}
token: ${{ secrets.CODECOV_ORG_TOKEN }}
success:
permissions:
contents: none
needs: build
runs-on: ubuntu-latest
name: Cygwin Test Successful
steps:
- name: Success
run: echo Cygwin Test Successful

View File

@ -4,19 +4,14 @@ on:
push:
branches:
- "**"
paths-ignore:
paths-ignore: &paths-ignore
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
pull_request:
paths-ignore:
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
paths-ignore: *paths-ignore
workflow_dispatch:
permissions:
@ -26,59 +21,65 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
docker: [
# Run slower jobs first to give them a headstart and reduce waiting time
ubuntu-22.04-jammy-arm64v8,
ubuntu-24.04-noble-ppc64le,
ubuntu-24.04-noble-s390x,
ubuntu-26.04-resolute-ppc64le,
ubuntu-26.04-resolute-s390x,
# Then run the remainder
alpine,
amazon-2-amd64,
amazon-2023-amd64,
arch,
centos-stream-9-amd64,
debian-11-bullseye-amd64,
debian-12-bookworm-x86,
debian-12-bookworm-amd64,
fedora-39-amd64,
fedora-40-amd64,
centos-stream-10-amd64,
debian-13-trixie-x86,
debian-13-trixie-amd64,
fedora-43-amd64,
fedora-44-amd64,
gentoo,
ubuntu-20.04-focal-amd64,
ubuntu-22.04-jammy-amd64,
ubuntu-24.04-noble-amd64,
ubuntu-26.04-resolute-amd64,
]
dockerTag: [main]
include:
- docker: "ubuntu-22.04-jammy-arm64v8"
qemu-arch: "aarch64"
- docker: "ubuntu-24.04-noble-ppc64le"
- docker: "ubuntu-26.04-resolute-ppc64le"
qemu-arch: "ppc64le"
- docker: "ubuntu-24.04-noble-s390x"
- docker: "ubuntu-26.04-resolute-s390x"
qemu-arch: "s390x"
- docker: "ubuntu-26.04-resolute-arm64v8"
os: "ubuntu-24.04-arm"
dockerTag: main
name: ${{ matrix.docker }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Build system information
run: python3 .github/workflows/system-info.py
- name: Set up QEMU
if: "matrix.qemu-arch"
run: |
docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }}
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: ${{ matrix.qemu-arch }}
- name: Docker pull
run: |
docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
docker pull ${{ matrix.qemu-arch && format('--platform=linux/{0}', matrix.qemu-arch)}} pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
- name: Docker build
run: |
@ -89,23 +90,21 @@ jobs:
- name: After success
run: |
PATH="$PATH:~/.local/bin"
docker start pillow_container
sudo docker cp pillow_container:/Pillow /Pillow
sudo chown -R runner /Pillow
pil_path=`docker exec pillow_container /vpy3/bin/python -c 'import os, PIL;print(os.path.realpath(os.path.dirname(PIL.__file__)))'`
docker stop pillow_container
sudo mkdir -p $pil_path
sudo cp src/PIL/*.py $pil_path
cd /Pillow
.ci/after_success.sh
env:
MATRIX_DOCKER: ${{ matrix.docker }}
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
flags: GHA_Docker
name: ${{ matrix.docker }}
gcov: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}
success:
permissions:

View File

@ -4,19 +4,14 @@ on:
push:
branches:
- "**"
paths-ignore:
paths-ignore: &paths-ignore
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
pull_request:
paths-ignore:
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
paths-ignore: *paths-ignore
workflow_dispatch:
permissions:
@ -28,6 +23,7 @@ concurrency:
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
jobs:
build:
@ -45,7 +41,9 @@ jobs:
steps:
- name: Checkout Pillow
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up shell
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
@ -58,36 +56,34 @@ jobs:
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-ghostscript \
mingw-w64-x86_64-lcms2 \
mingw-w64-x86_64-libavif \
mingw-w64-x86_64-libimagequant \
mingw-w64-x86_64-libjpeg-turbo \
mingw-w64-x86_64-libraqm \
mingw-w64-x86_64-libtiff \
mingw-w64-x86_64-libwebp \
mingw-w64-x86_64-openjpeg2 \
mingw-w64-x86_64-python3-cffi \
mingw-w64-x86_64-python3-numpy \
mingw-w64-x86_64-python3-olefile \
mingw-w64-x86_64-python3-setuptools \
mingw-w64-x86_64-python-numpy \
mingw-w64-x86_64-python-olefile \
mingw-w64-x86_64-python-pip \
mingw-w64-x86_64-python-pytest \
mingw-w64-x86_64-python-pytest-cov \
mingw-w64-x86_64-python-pytest-timeout \
mingw-w64-x86_64-python-pyqt6
python3 -m ensurepip
python3 -m pip install pyroma pytest pytest-cov pytest-timeout
pushd depends && ./install_extra_test_images.sh && popd
- name: Build Pillow
run: SETUPTOOLS_USE_DISTUTILS="stdlib" CFLAGS="-coverage" python3 -m pip install .
run: CFLAGS="-coverage" python3 -m pip install .
- name: Test Pillow
run: |
python3 selftest.py --installed
python3 -c "from PIL import Image"
python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
.ci/test.sh
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
file: ./coverage.xml
files: ./coverage.xml
flags: GHA_Windows
name: "MSYS2 MinGW"
token: ${{ secrets.CODECOV_ORG_TOKEN }}

View File

@ -0,0 +1,64 @@
name: Test Valgrind Memory Leaks
# like the Docker tests, but running valgrind only on *.c/*.h changes.
# this is very expensive. Only run on the pull request.
on:
# push:
# branches:
# - "**"
# paths:
# - ".github/workflows/test-valgrind-memory.yml"
# - "**.c"
# - "**.h"
# - "depends/docker-test-valgrind-memory.sh"
pull_request:
paths:
- ".github/workflows/test-valgrind-memory.yml"
- "**.c"
- "**.h"
- "depends/docker-test-valgrind-memory.sh"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
docker: [
ubuntu-22.04-jammy-amd64-valgrind,
]
dockerTag: [main]
name: ${{ matrix.docker }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Build system information
run: python3 .github/workflows/system-info.py
- name: Docker pull
run: |
docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
- name: Build and Run Valgrind
run: |
# The Pillow user in the docker container is UID 1001
sudo chown -R 1001 $GITHUB_WORKSPACE
docker run --name pillow_container -e "PILLOW_VALGRIND_TEST=true" -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} /Pillow/depends/docker-test-valgrind-memory.sh
sudo chown -R runner $GITHUB_WORKSPACE

View File

@ -6,15 +6,12 @@ on:
push:
branches:
- "**"
paths:
paths: &paths
- ".github/workflows/test-valgrind.yml"
- "**.c"
- "**.h"
pull_request:
paths:
- ".github/workflows/test-valgrind.yml"
- "**.c"
- "**.h"
paths: *paths
workflow_dispatch:
permissions:
@ -24,6 +21,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
build:
@ -39,7 +39,9 @@ jobs:
name: ${{ matrix.docker }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Build system information
run: python3 .github/workflows/system-info.py

View File

@ -4,19 +4,14 @@ on:
push:
branches:
- "**"
paths-ignore:
paths-ignore: &paths-ignore
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
pull_request:
paths-ignore:
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
paths-ignore: *paths-ignore
workflow_dispatch:
permissions:
@ -28,57 +23,70 @@ concurrency:
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
jobs:
build:
runs-on: windows-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["pypy3.10", "pypy3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["pypy3.11", "3.11", "3.12", "3.13", "3.14", "3.15"]
architecture: ["x64"]
os: ["windows-latest"]
include:
# Test the oldest Python on 32-bit
- { python-version: "3.10", architecture: "x86", os: "windows-2022" }
timeout-minutes: 30
timeout-minutes: 45
name: Python ${{ matrix.python-version }}
name: Python ${{ matrix.python-version }} (${{ matrix.architecture }})
steps:
- name: Checkout Pillow
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Checkout cached dependencies
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: python-pillow/pillow-depends
path: winbuild\depends
- name: Checkout extra test images
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: python-pillow/test-images
path: Tests\test-images
# sets env: pythonLocation
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
architecture: ${{ matrix.architecture }}
cache: pip
cache-dependency-path: ".github/workflows/test-windows.yml"
- name: Print build system information
run: python3 .github/workflows/system-info.py
- name: Install Python dependencies
run: >
python3 -m pip install
coverage>=7.4.2
defusedxml
olefile
pyroma
pytest
pytest-cov
pytest-timeout
- name: Upgrade pip
run: |
python3 -m pip install --upgrade pip
- name: Install CPython dependencies
if: "!contains(matrix.python-version, 'pypy') && matrix.architecture != 'x86'"
run: |
python3 -m pip install PyQt6
- name: Install PyArrow dependency
run: |
python3 -m pip install --only-binary=:all: pyarrow || true
- name: Install dependencies
id: install
@ -86,8 +94,8 @@ jobs:
choco install nasm --no-progress
echo "C:\Program Files\NASM" >> $env:GITHUB_PATH
choco install ghostscript --version=10.3.1 --no-progress
echo "C:\Program Files\gs\gs10.00.0\bin" >> $env:GITHUB_PATH
choco install ghostscript --version=10.7.0 --no-progress
echo "C:\Program Files\gs\gs10.07.0\bin" >> $env:GITHUB_PATH
# Install extra test images
xcopy /S /Y Tests\test-images\* Tests\images
@ -100,7 +108,7 @@ jobs:
- name: Cache build
id: build-cache
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: winbuild\build
key:
@ -137,6 +145,10 @@ jobs:
if: steps.build-cache.outputs.cache-hit != 'true'
run: "& winbuild\\build\\build_dep_libpng.cmd"
- name: Build dependencies / libavif
if: steps.build-cache.outputs.cache-hit != 'true' && matrix.architecture == 'x64'
run: "& winbuild\\build\\build_dep_libavif.cmd"
# for FreeType WOFF2 font support
- name: Build dependencies / brotli
if: steps.build-cache.outputs.cache-hit != 'true'
@ -172,13 +184,14 @@ jobs:
# trim ~150MB for each job
- name: Optimize build cache
if: steps.build-cache.outputs.cache-hit != 'true'
run: rmdir /S /Q winbuild\build\src
shell: cmd
run: |
rm -rf winbuild\build\src
shell: bash
- name: Build Pillow
run: |
$FLAGS="-C raqm=vendor -C fribidi=vendor"
cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip install -v $FLAGS ."
cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip install -v $FLAGS .[tests]"
& $env:pythonLocation\python.exe selftest.py --installed
shell: pwsh
@ -190,9 +203,7 @@ jobs:
- name: Test Pillow
run: |
path %GITHUB_WORKSPACE%\\winbuild\\build\\bin;%PATH%
python.exe -m pytest -vx -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests
shell: cmd
.ci\test.cmd
- name: Prepare to upload errors
if: failure()
@ -201,7 +212,7 @@ jobs:
shell: bash
- name: Upload errors
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: errors
@ -213,12 +224,11 @@ jobs:
shell: pwsh
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
file: ./coverage.xml
files: ./coverage.xml
flags: GHA_Windows
name: ${{ runner.os }} Python ${{ matrix.python-version }}
token: ${{ secrets.CODECOV_ORG_TOKEN }}
success:
permissions:

View File

@ -4,19 +4,14 @@ on:
push:
branches:
- "**"
paths-ignore:
paths-ignore: &paths-ignore
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
pull_request:
paths-ignore:
- ".github/workflows/docs.yml"
- ".github/workflows/wheels*"
- ".gitmodules"
- "docs/**"
- "wheels/**"
paths-ignore: *paths-ignore
workflow_dispatch:
permissions:
@ -29,6 +24,7 @@ concurrency:
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
build:
@ -37,44 +33,38 @@ jobs:
fail-fast: false
matrix:
os: [
"macos-14",
"macos-latest",
"ubuntu-latest",
]
python-version: [
"pypy3.10",
"pypy3.9",
"pypy3.11",
"3.15t",
"3.15",
"3.14t",
"3.14",
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
]
include:
- python-version: "3.11"
PYTHONOPTIMIZE: 1
REVERSE: "--reverse"
- python-version: "3.10"
PYTHONOPTIMIZE: 2
# M1 only available for 3.10+
- os: "macos-13"
python-version: "3.9"
- os: "macos-13"
python-version: "3.8"
- { python-version: "3.12", PYTHONOPTIMIZE: 1, REVERSE: "--reverse" }
- { python-version: "3.11", PYTHONOPTIMIZE: 2 }
# Intel
- { os: "macos-26-intel", python-version: "3.10" }
exclude:
- os: "macos-14"
python-version: "3.9"
- os: "macos-14"
python-version: "3.8"
- { os: "macos-latest", python-version: "3.10" }
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
@ -86,21 +76,39 @@ jobs:
- name: Build system information
run: python3 .github/workflows/system-info.py
- name: Cache libavif
if: startsWith(matrix.os, 'ubuntu')
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-libavif
with:
path: ~/cache-libavif
key: ${{ runner.os }}-libavif-${{ hashFiles('depends/install_libavif.sh', 'depends/libavif-svt4.patch') }}
- name: Cache libimagequant
if: startsWith(matrix.os, 'ubuntu')
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-libimagequant
with:
path: ~/cache-libimagequant
key: ${{ runner.os }}-libimagequant-${{ hashFiles('depends/install_imagequant.sh') }}
- name: Cache libwebp
if: startsWith(matrix.os, 'ubuntu')
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-libwebp
with:
path: ~/cache-libwebp
key: ${{ runner.os }}-libwebp-${{ hashFiles('depends/install_webp.sh') }}
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
.ci/install.sh
env:
GHA_PYTHON_VERSION: ${{ matrix.python-version }}
GHA_LIBAVIF_CACHE_HIT: ${{ steps.cache-libavif.outputs.cache-hit }}
GHA_LIBIMAGEQUANT_CACHE_HIT: ${{ steps.cache-libimagequant.outputs.cache-hit }}
GHA_LIBWEBP_CACHE_HIT: ${{ steps.cache-libwebp.outputs.cache-hit }}
- name: Install macOS dependencies
if: startsWith(matrix.os, 'macOS')
@ -110,7 +118,7 @@ jobs:
GHA_PYTHON_VERSION: ${{ matrix.python-version }}
- name: Register gcc problem matcher
if: "matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'"
if: "matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'"
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Build
@ -139,7 +147,7 @@ jobs:
mkdir -p Tests/errors
- name: Upload errors
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: errors
@ -150,12 +158,10 @@ jobs:
.ci/after_success.sh
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
flags: ${{ matrix.os == 'ubuntu-latest' && 'GHA_Ubuntu' || 'GHA_macOS' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
gcov: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}
success:
permissions:

View File

@ -1,150 +1,412 @@
#!/bin/bash
# Define custom utilities
# Test for macOS with [ -n "$IS_MACOS" ]
if [ -z "$IS_MACOS" ]; then
export MB_ML_LIBC=${AUDITWHEEL_POLICY::9}
export MB_ML_VER=${AUDITWHEEL_POLICY:9}
# Safety check - Pillow builds require that CIBW_ARCHS is set, and that it only
# contains a single value (even though cibuildwheel allows multiple values in
# CIBW_ARCHS). This check doesn't work on Linux because of how the CIBW_ARCHS
# variable is exposed.
function check_cibw_archs {
if [[ -z "$CIBW_ARCHS" ]]; then
echo "ERROR: Pillow builds require CIBW_ARCHS be defined."
exit 1
fi
if [[ "$CIBW_ARCHS" == *" "* ]]; then
echo "ERROR: Pillow builds only support a single architecture in CIBW_ARCHS."
exit 1
fi
}
# Setup that needs to be done before multibuild utils are invoked. Process
# potential cross-build platforms before native platforms to ensure that we pick
# up the cross environment.
PROJECTDIR=$(pwd)
if [[ "$CIBW_PLATFORM" == "ios" ]]; then
check_cibw_archs
# On iOS, CIBW_ARCHS is actually a multi-arch - arm64_iphoneos,
# arm64_iphonesimulator or x86_64_iphonesimulator. Split into the CPU
# platform, and the iOS SDK.
PLAT=$(echo $CIBW_ARCHS | sed "s/\(.*\)_\(.*\)/\1/")
IOS_SDK=$(echo $CIBW_ARCHS | sed "s/\(.*\)_\(.*\)/\2/")
# Build iOS builds in `build/iphoneos` or `build/iphonesimulator`
# (depending on the build target). Install them into `build/deps/iphoneos`
# or `build/deps/iphonesimulator`
WORKDIR=$(pwd)/build/$IOS_SDK
BUILD_PREFIX=$(pwd)/build/deps/$IOS_SDK
# GNU tooling insists on using aarch64 rather than arm64
if [[ $PLAT == "arm64" ]]; then
GNU_ARCH=aarch64
else
GNU_ARCH=x86_64
fi
IOS_SDK_PATH=$(xcrun --sdk $IOS_SDK --show-sdk-path)
CMAKE_SYSTEM_NAME=iOS
IOS_HOST_TRIPLE=$PLAT-apple-ios$IPHONEOS_DEPLOYMENT_TARGET
if [[ "$IOS_SDK" == "iphonesimulator" ]]; then
IOS_HOST_TRIPLE=$IOS_HOST_TRIPLE-simulator
fi
# GNU Autotools doesn't recognize the existence of arm64-apple-ios-simulator
# as a valid host. However, the only difference between arm64-apple-ios and
# arm64-apple-ios-simulator is the choice of sysroot, and that is
# coordinated by CC, CFLAGS etc. From the perspective of configure, the two
# platforms are identical, so we can use arm64-apple-ios consistently.
# This (mostly) avoids us needing to patch config.sub in dependency sources.
HOST_CONFIGURE_FLAGS="--disable-shared --enable-static --host=$GNU_ARCH-apple-ios --build=$GNU_ARCH-apple-darwin"
# CMake has native support for iOS. However, most of that support is based
# on using the Xcode builder, which isn't very helpful for most of Pillow's
# dependencies. Therefore, we lean on the OSX configurations, plus CC, CFLAGS
# etc. to ensure the right sysroot is selected.
HOST_CMAKE_FLAGS="-DCMAKE_SYSTEM_NAME=$CMAKE_SYSTEM_NAME -DCMAKE_SYSTEM_PROCESSOR=$GNU_ARCH -DCMAKE_OSX_DEPLOYMENT_TARGET=$IPHONEOS_DEPLOYMENT_TARGET -DCMAKE_OSX_SYSROOT=$IOS_SDK_PATH -DBUILD_SHARED_LIBS=NO -DENABLE_SHARED=NO"
# Meson needs to be pointed at a cross-platform configuration file
# This will be generated once CC etc. have been evaluated.
HOST_MESON_FLAGS="--cross-file $WORKDIR/meson-cross.txt -Dprefer_static=true -Ddefault_library=static"
elif [[ "$(uname -s)" == "Darwin" ]]; then
check_cibw_archs
# Build macOS dependencies in `build/darwin`
# Install them into `build/deps/darwin`
PLAT=$CIBW_ARCHS
WORKDIR=$(pwd)/build/darwin
BUILD_PREFIX=$(pwd)/build/deps/darwin
else
# Build prefix will default to /usr/local
PLAT="${CIBW_ARCHS:-$AUDITWHEEL_ARCH}"
WORKDIR=$(pwd)/build
MB_ML_LIBC=${AUDITWHEEL_POLICY::9}
MB_ML_VER=${AUDITWHEEL_POLICY:9}
fi
export PLAT=$CIBW_ARCHS
# Define custom utilities
source wheels/multibuild/common_utils.sh
source wheels/multibuild/library_builders.sh
if [ -z "$IS_MACOS" ]; then
if [[ -z "$IS_MACOS" ]]; then
source wheels/multibuild/manylinux_utils.sh
fi
ARCHIVE_SDIR=pillow-depends-main
# Package versions for fresh source builds
FREETYPE_VERSION=2.13.2
HARFBUZZ_VERSION=8.5.0
LIBPNG_VERSION=1.6.43
JPEGTURBO_VERSION=3.0.3
OPENJPEG_VERSION=2.5.2
XZ_VERSION=5.4.5
TIFF_VERSION=4.6.0
LCMS2_VERSION=2.16
if [[ -n "$IS_MACOS" ]]; then
GIFLIB_VERSION=5.2.2
else
GIFLIB_VERSION=5.2.1
fi
if [[ -n "$IS_MACOS" ]] || [[ "$MB_ML_VER" != 2014 ]]; then
ZLIB_VERSION=1.3.1
else
ZLIB_VERSION=1.2.8
fi
LIBWEBP_VERSION=1.4.0
BZIP2_VERSION=1.0.8
LIBXCB_VERSION=1.17.0
BROTLI_VERSION=1.1.0
VERSIONS_FILE="$PROJECTDIR/.github/dependencies.json"
_get_ver() { python3 -c "import json; print(json.load(open('$VERSIONS_FILE'))['$1'])"; }
FREETYPE_VERSION=$(_get_ver freetype)
HARFBUZZ_VERSION=$(_get_ver harfbuzz)
LIBPNG_VERSION=$(_get_ver libpng)
JPEGTURBO_VERSION=$(_get_ver jpegturbo)
OPENJPEG_VERSION=$(_get_ver openjpeg)
XZ_VERSION=$(_get_ver xz)
ZSTD_VERSION=$(_get_ver zstd)
TIFF_VERSION=$(_get_ver tiff)
LCMS2_VERSION=$(_get_ver lcms2)
ZLIB_NG_VERSION=$(_get_ver zlib-ng)
LIBWEBP_VERSION=$(_get_ver libwebp)
BZIP2_VERSION=$(_get_ver bzip2)
LIBXCB_VERSION=$(_get_ver libxcb)
BROTLI_VERSION=$(_get_ver brotli)
LIBAVIF_VERSION=$(_get_ver libavif)
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "x86_64" ]]; then
function build_openjpeg {
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz openjpeg-${OPENJPEG_VERSION}.tar.gz)
(cd $out_dir \
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
&& make install)
touch openjpeg-stamp
}
fi
function build_pkg_config {
if [ -e pkg-config-stamp ]; then return; fi
# This essentially duplicates the Homebrew recipe.
# On iOS, we need a binary that can be executed on the build machine; but we
# can create a host-specific pc-path to store iOS .pc files. To ensure a
# macOS-compatible build, we temporarily clear environment flags that set
# iOS-specific values.
if [[ -n "$IOS_SDK" ]]; then
ORIGINAL_HOST_CONFIGURE_FLAGS=$HOST_CONFIGURE_FLAGS
ORIGINAL_IPHONEOS_DEPLOYMENT_TARGET=$IPHONEOS_DEPLOYMENT_TARGET
unset HOST_CONFIGURE_FLAGS
unset IPHONEOS_DEPLOYMENT_TARGET
fi
CFLAGS="$CFLAGS -Wno-int-conversion" CPPFLAGS="" build_simple pkg-config 0.29.2 https://pkg-config.freedesktop.org/releases tar.gz \
--disable-debug --disable-host-tool --with-internal-glib \
--with-pc-path=$BUILD_PREFIX/share/pkgconfig:$BUILD_PREFIX/lib/pkgconfig \
--with-system-include-path=$(xcrun --show-sdk-path --sdk macosx)/usr/include
if [[ -n "$IOS_SDK" ]]; then
HOST_CONFIGURE_FLAGS=$ORIGINAL_HOST_CONFIGURE_FLAGS
IPHONEOS_DEPLOYMENT_TARGET=$ORIGINAL_IPHONEOS_DEPLOYMENT_TARGET
fi;
export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config
touch pkg-config-stamp
}
function build_zlib_ng {
if [ -e zlib-stamp ]; then return; fi
# zlib-ng uses a "configure" script, but it's not a GNU autotools script, so
# it doesn't honor the usual flags. Temporarily disable any
# cross-compilation flags.
ORIGINAL_HOST_CONFIGURE_FLAGS=$HOST_CONFIGURE_FLAGS
unset HOST_CONFIGURE_FLAGS
build_github zlib-ng/zlib-ng $ZLIB_NG_VERSION --installnamedir=$BUILD_PREFIX/lib --zlib-compat
HOST_CONFIGURE_FLAGS=$ORIGINAL_HOST_CONFIGURE_FLAGS
touch zlib-stamp
}
function build_brotli {
local cmake=$(get_modern_cmake)
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz brotli-1.1.0.tar.gz)
if [ -e brotli-stamp ]; then return; fi
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz brotli-$BROTLI_VERSION.tar.gz)
(cd $out_dir \
&& $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
&& make install)
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
cp /usr/local/lib64/libbrotli* /usr/local/lib
cp /usr/local/lib64/pkgconfig/libbrotli* /usr/local/lib/pkgconfig
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib -DCMAKE_MACOSX_BUNDLE=OFF $HOST_CMAKE_FLAGS . \
&& make -j4 install)
touch brotli-stamp
}
function build_harfbuzz {
if [ -e harfbuzz-stamp ]; then return; fi
python3 -m pip install meson ninja
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/harfbuzz-$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
(cd $out_dir \
&& meson setup build --prefix=$BUILD_PREFIX --libdir=$BUILD_PREFIX/lib --buildtype=minsize -Dfreetype=enabled -Dglib=disabled -Dtests=disabled $HOST_MESON_FLAGS)
(cd $out_dir/build \
&& meson install)
touch harfbuzz-stamp
}
function build_libavif {
if [ -e libavif-stamp ]; then return; fi
python3 -m pip install meson ninja
if ([[ "$PLAT" == "x86_64" ]] && [[ -z "$IOS_SDK" ]]) || [ -n "$SANITIZER" ]; then
build_simple nasm 2.16.03 https://www.nasm.us/pub/nasm/releasebuilds/2.16.03
fi
local build_shared=ON
local lto=ON
local libavif_cmake_flags
if [[ -n "$IS_MACOS" ]]; then
lto=OFF
libavif_cmake_flags=(
-DCMAKE_C_FLAGS_MINSIZEREL="-Oz -DNDEBUG -flto" \
-DCMAKE_CXX_FLAGS_MINSIZEREL="-Oz -DNDEBUG -flto" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,-S,-x,-dead_strip_dylibs" \
)
if [[ -n "$IOS_SDK" ]]; then
build_shared=OFF
fi
else
libavif_cmake_flags=(-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,--strip-all,-z,relro,-z,now")
fi
if [[ -n "$IOS_SDK" ]] && [[ "$PLAT" == "x86_64" ]]; then
libavif_cmake_flags+=(-DAOM_TARGET_CPU=generic)
else
libavif_cmake_flags+=(
-DAVIF_CODEC_AOM_DECODE=OFF \
-DAVIF_CODEC_DAV1D=LOCAL
)
fi
local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz)
# CONFIG_AV1_HIGHBITDEPTH=0 is a flag for libaom (included as a subproject
# of libavif) that disables support for encoding high bit depth images.
(cd $out_dir \
&& cmake \
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
-DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib \
-DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib \
-DBUILD_SHARED_LIBS=$build_shared \
-DAVIF_LIBSHARPYUV=LOCAL \
-DAVIF_LIBYUV=LOCAL \
-DAVIF_CODEC_AOM=LOCAL \
-DCONFIG_AV1_HIGHBITDEPTH=0 \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$lto \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DCMAKE_BUILD_TYPE=MinSizeRel \
"${libavif_cmake_flags[@]}" \
$HOST_CMAKE_FLAGS . )
if [[ -n "$IOS_SDK" ]]; then
# libavif's CMake configuration generates a meson cross file... but it
# doesn't work for iOS cross-compilation. Copy in Pillow-generated
# meson-cross config to replace the cmake-generated version.
cp $WORKDIR/meson-cross.txt $out_dir/crossfile-apple.meson
fi
(cd $out_dir && make -j4 install)
touch libavif-stamp
}
function build_zstd {
if [ -e zstd-stamp ]; then return; fi
local out_dir=$(fetch_unpack https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz)
(cd $out_dir \
&& make -j4 install)
touch zstd-stamp
}
function build {
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "arm64" ]]; then
sudo chown -R runner /usr/local
fi
build_xz
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
yum remove -y zlib-devel
fi
build_new_zlib
if [[ -n "$IS_MACOS" ]]; then
CFLAGS="$CFLAGS -headerpad_max_install_names" build_zlib_ng
else
build_zlib_ng
fi
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
if [ -n "$IS_MACOS" ]; then
build_simple xorgproto 2024.1 https://www.x.org/pub/individual/proto
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
if [[ -n "$IS_MACOS" ]]; then
build_simple xorgproto 2025.1 https://www.x.org/pub/individual/proto
build_simple libXau 1.0.12 https://www.x.org/pub/individual/lib
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
cp /usr/local/share/pkgconfig/xcb-proto.pc /usr/local/lib/pkgconfig
fi
else
sed s/\${pc_sysrootdir\}// /usr/local/share/pkgconfig/xcb-proto.pc > /usr/local/lib/pkgconfig/xcb-proto.pc
sed "s/\${pc_sysrootdir\}//" $BUILD_PREFIX/share/pkgconfig/xcb-proto.pc > $BUILD_PREFIX/lib/pkgconfig/xcb-proto.pc
fi
build_simple libxcb $LIBXCB_VERSION https://www.x.org/releases/individual/lib
build_libjpeg_turbo
build_tiff
if [[ -n "$IS_MACOS" ]]; then
# Custom tiff build to include jpeg; by default, configure won't include
# headers/libs in the custom macOS/iOS prefix. Explicitly disable webp,
# libdeflate and zstd, because on x86_64 macs, it will pick up the
# Homebrew versions of those libraries from /usr/local.
build_simple tiff $TIFF_VERSION https://download.osgeo.org/libtiff tar.gz \
--with-jpeg-include-dir=$BUILD_PREFIX/include --with-jpeg-lib-dir=$BUILD_PREFIX/lib \
--disable-webp --disable-libdeflate --disable-zstd
else
build_zstd
build_tiff
fi
build_libavif
build_libpng
build_lcms2
build_openjpeg
if [ -f /usr/local/lib64/libopenjp2.so ]; then
cp /usr/local/lib64/libopenjp2.so /usr/local/lib
fi
ORIGINAL_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -O3 -DNDEBUG"
webp_cflags="-O3 -DNDEBUG"
if [[ -n "$IS_MACOS" ]]; then
CFLAGS="$CFLAGS -Wl,-headerpad_max_install_names"
webp_cflags="$webp_cflags -Wl,-headerpad_max_install_names"
fi
build_libwebp
CFLAGS=$ORIGINAL_CFLAGS
webp_ldflags=""
if [[ -n "$IOS_SDK" ]]; then
webp_ldflags="$webp_ldflags -llzma -lz"
fi
CFLAGS="$CFLAGS $webp_cflags" LDFLAGS="$LDFLAGS $webp_ldflags" build_simple libwebp $LIBWEBP_VERSION \
https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
--enable-libwebpmux --enable-libwebpdemux
build_brotli
if [ -n "$IS_MACOS" ]; then
if [[ -n "$IS_MACOS" ]]; then
# Custom freetype build
build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no
else
build_freetype
fi
if [ -z "$IS_MACOS" ]; then
export FREETYPE_LIBS=-lfreetype
export FREETYPE_CFLAGS=-I/usr/local/include/freetype2/
fi
build_simple harfbuzz $HARFBUZZ_VERSION https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION tar.xz --with-freetype=yes --with-glib=no
if [ -z "$IS_MACOS" ]; then
export FREETYPE_LIBS=""
export FREETYPE_CFLAGS=""
if [[ -z "$IOS_SDK" ]]; then
# On iOS, there's no vendor-provided raqm, and we can't ship it due to
# licensing, so there's no point building harfbuzz.
build_harfbuzz
fi
}
function create_meson_cross_config {
cat << EOF > $WORKDIR/meson-cross.txt
[binaries]
pkg-config = '$BUILD_PREFIX/bin/pkg-config'
cmake = '$(which cmake)'
c = '$CC'
cpp = '$CXX'
strip = '$STRIP'
[built-in options]
c_args = '$CFLAGS -I$BUILD_PREFIX/include'
cpp_args = '$CXXFLAGS -I$BUILD_PREFIX/include'
c_link_args = '$CFLAGS -L$BUILD_PREFIX/lib'
cpp_link_args = '$CFLAGS -L$BUILD_PREFIX/lib'
[host_machine]
system = 'darwin'
subsystem = 'ios'
kernel = 'xnu'
cpu_family = '$(uname -m)'
cpu = '$(uname -m)'
endian = 'little'
EOF
}
# Perform all dependency builds in the build subfolder.
mkdir -p $WORKDIR
pushd $WORKDIR > /dev/null
# Any stuff that you need to do before you start building the wheels
# Runs in the root directory of this repository.
curl -fsSL -o pillow-depends-main.zip https://github.com/python-pillow/pillow-depends/archive/main.zip
untar pillow-depends-main.zip
if [[ ! -d $WORKDIR/pillow-depends-main ]]; then
if [[ ! -f $PROJECTDIR/pillow-depends-main.zip ]]; then
echo "Download pillow dependency sources..."
curl -fSL -o $PROJECTDIR/pillow-depends-main.zip https://github.com/python-pillow/pillow-depends/archive/main.zip
fi
echo "Unpacking pillow dependency sources..."
untar $PROJECTDIR/pillow-depends-main.zip
fi
if [[ -n "$IS_MACOS" ]]; then
# libtiff and libxcb cause a conflict with building libtiff and libxcb
# libxau and libxdmcp cause an issue on macOS < 11
# remove cairo to fix building harfbuzz on arm64
# remove lcms2 and libpng to fix building openjpeg on arm64
# remove jpeg-turbo to avoid inclusion on arm64
# remove webp and zstd to avoid inclusion on x86_64
# curl from brew requires zstd, use system curl
brew remove --ignore-dependencies libpng libtiff libxcb libxau libxdmcp curl cairo lcms2 zstd
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
brew remove --ignore-dependencies jpeg-turbo
else
brew remove --ignore-dependencies webp
fi
# Ensure the basic structure of the build prefix directory exists.
mkdir -p "$BUILD_PREFIX/bin"
mkdir -p "$BUILD_PREFIX/lib"
brew install pkg-config
# Ensure pkg-config is available. This is done *before* setting CC, CFLAGS
# etc. to ensure that the build is *always* a macOS build, even when building
# for iOS.
build_pkg_config
# Ensure cmake is available, and that the default prefix used by CMake is
# the build prefix
python3 -m pip install cmake
export CMAKE_PREFIX_PATH=$BUILD_PREFIX
if [[ -n "$IOS_SDK" ]]; then
export AR="$(xcrun --find --sdk $IOS_SDK ar)"
export CPP="$(xcrun --find --sdk $IOS_SDK clang) -E"
export CC=$(xcrun --find --sdk $IOS_SDK clang)
export CXX=$(xcrun --find --sdk $IOS_SDK clang++)
export LD=$(xcrun --find --sdk $IOS_SDK ld)
export STRIP=$(xcrun --find --sdk $IOS_SDK strip)
CPPFLAGS="$CPPFLAGS --sysroot=$IOS_SDK_PATH"
CFLAGS="-target $IOS_HOST_TRIPLE --sysroot=$IOS_SDK_PATH -mios-version-min=$IPHONEOS_DEPLOYMENT_TARGET"
CXXFLAGS="-target $IOS_HOST_TRIPLE --sysroot=$IOS_SDK_PATH -mios-version-min=$IPHONEOS_DEPLOYMENT_TARGET"
# Having IPHONEOS_DEPLOYMENT_TARGET in the environment causes problems
# with some cross-building toolchains, because it introduces implicit
# behavior into clang.
unset IPHONEOS_DEPLOYMENT_TARGET
# Now that we know CC etc., we can create a meson cross-configuration file
create_meson_cross_config
fi
fi
wrap_wheel_builder build
# A safety catch for iOS. iOS can't use dynamic libraries, but clang will prefer
# to link dynamic libraries to static libraries. The only way to reliably
# prevent this is to not have dynamic libraries available in the first place.
# The build process *shouldn't* generate any dylibs... but just in case, purge
# any dylibs that *have* been installed into the build prefix directory.
if [[ -n "$IOS_SDK" ]]; then
find "$BUILD_PREFIX" -name "*.dylib" -exec rm -rf {} \;
fi
# Return to the project root to finish the build
popd > /dev/null
# Append licenses
for filename in wheels/dependency_licenses/*; do
echo -e "\n\n----\n\n$(basename $filename | cut -f 1 -d '.')\n" | cat >> LICENSE

View File

@ -9,14 +9,18 @@ if ("$venv" -like "*\cibw-run-*\pp*-win_amd64\*") {
C:\vc_redist.x64.exe /install /quiet /norestart | Out-Null
}
$env:path += ";$pillow\winbuild\build\bin\"
& "$venv\Scripts\activate.ps1"
if (Test-Path $venv\Scripts\pypy.exe) {
$python = "pypy.exe"
} else {
$python = "python.exe"
}
& reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\python.exe" /v "GlobalFlag" /t REG_SZ /d "0x02000000" /f
cd $pillow
& python -VV
& $venv\Scripts\$python -VV
if (!$?) { exit $LASTEXITCODE }
& python selftest.py
& $venv\Scripts\$python selftest.py
if (!$?) { exit $LASTEXITCODE }
& python -m pytest -vx Tests\check_wheel.py
& $venv\Scripts\$python -m pytest -vv -x checks\check_wheel.py
if (!$?) { exit $LASTEXITCODE }
& python -m pytest -vx Tests
& $venv\Scripts\$python -m pytest -vv -x Tests
if (!$?) { exit $LASTEXITCODE }

View File

@ -1,20 +1,29 @@
#!/bin/bash
set -e
# Ensure fribidi is installed by the system.
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install fribidi
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
if [ -f /opt/homebrew/lib/libfribidi.dylib ]; then
sudo cp /opt/homebrew/lib/libfribidi.dylib /usr/local/lib
# If Homebrew is on the path during the build, it may leak into the wheels.
# However, we *do* need Homebrew to provide a copy of fribidi for
# testing purposes so that we can verify the fribidi shim works as expected.
if [[ "$(uname -m)" == "x86_64" ]]; then
HOMEBREW_PREFIX=/usr/local
else
HOMEBREW_PREFIX=/opt/homebrew
fi
$HOMEBREW_PREFIX/bin/brew install fribidi
# Add the lib folder for fribidi so that the vendored library can be found.
# Don't use $HOMEWBREW_PREFIX/lib directly - use the lib folder where the
# installed copy of fribidi is cellared. This ensures we don't pick up the
# Homebrew version of any other library that we're dependent on (most notably,
# freetype).
export DYLD_LIBRARY_PATH=$(dirname $(realpath $HOMEBREW_PREFIX/lib/libfribidi.dylib))
elif [ "${AUDITWHEEL_POLICY::9}" == "musllinux" ]; then
apk add curl fribidi
else
yum install -y fribidi
fi
if [ "${AUDITWHEEL_POLICY::9}" != "musllinux" ] && !([[ "$OSTYPE" == "darwin"* ]] && [[ $(python3 --version) == *"3.13."* ]]); then
python3 -m pip install numpy
fi
if [ ! -d "test-images-main" ]; then
curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip
@ -24,5 +33,5 @@ fi
# Runs tests
python3 selftest.py
python3 -m pytest Tests/check_wheel.py
python3 -m pytest
python3 -m pytest -vv -x checks/check_wheel.py
python3 -m pytest -vv -x

View File

@ -1,10 +1,23 @@
name: Wheels
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
- cron: "42 1 * * 0,3"
push:
paths:
paths: &paths
- ".ci/requirements-cibw.txt"
- ".github/workflows/wheel*"
- ".ci/requirements-sbom.txt"
- ".github/compare-dist-sizes.py"
- ".github/dependencies.json"
- ".github/generate-sbom.py"
- ".github/workflows/wheels*"
- "pyproject.toml"
- "setup.py"
- "wheels/*"
- "winbuild/build_prepare.py"
@ -12,13 +25,7 @@ on:
tags:
- "*"
pull_request:
paths:
- ".ci/requirements-cibw.txt"
- ".github/workflows/wheel*"
- "setup.py"
- "wheels/*"
- "winbuild/build_prepare.py"
- "winbuild/fribidi.cmake"
paths: *paths
workflow_dispatch:
permissions:
@ -29,97 +36,80 @@ concurrency:
cancel-in-progress: true
env:
EXPECTED_DISTS: 66
FORCE_COLOR: 1
jobs:
build-1-QEMU-emulated-wheels:
name: aarch64 ${{ matrix.python-version }} ${{ matrix.spec }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- pp39
- pp310
- cp38
- cp39
- cp310
- cp311
- cp312
- cp313
spec:
- manylinux2014
- manylinux_2_28
- musllinux
exclude:
- { python-version: pp39, spec: musllinux }
- { python-version: pp310, spec: musllinux }
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.x"
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Install cibuildwheel
run: |
python3 -m pip install -r .ci/requirements-cibw.txt
- name: Build wheels
run: |
python3 -m cibuildwheel --output-dir wheelhouse
env:
# Build only the currently selected Linux architecture (so we can
# parallelise for speed).
CIBW_ARCHS: "aarch64"
# Likewise, select only one Python version per job to speed this up.
CIBW_BUILD: "${{ matrix.python-version }}-${{ matrix.spec == 'musllinux' && 'musllinux' || 'manylinux' }}*"
CIBW_PRERELEASE_PYTHONS: True
# Extra options for manylinux.
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.spec }}
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ${{ matrix.spec }}
- uses: actions/upload-artifact@v4
with:
name: dist-qemu-${{ matrix.python-version }}-${{ matrix.spec }}
path: ./wheelhouse/*.whl
build-2-native-wheels:
build-native-wheels:
if: github.event_name != 'schedule' || github.event.repository.fork == false
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "macOS x86_64"
os: macos-13
- name: "macOS 10.10 x86_64"
platform: macos
os: macos-26-intel
cibw_arch: x86_64
build: "cp3{10,11}*"
macosx_deployment_target: "10.10"
- name: "macOS 10.13 x86_64"
platform: macos
os: macos-26-intel
cibw_arch: x86_64
build: "cp3{12,13}*"
macosx_deployment_target: "10.13"
- name: "macOS 10.15 x86_64"
platform: macos
os: macos-26-intel
cibw_arch: x86_64
build: "{cp314,pp3}*"
macosx_deployment_target: "10.15"
- name: "macOS arm64"
os: macos-14
platform: macos
os: macos-latest
cibw_arch: arm64
macosx_deployment_target: "11.0"
- name: "manylinux2014 and musllinux x86_64"
os: ubuntu-latest
cibw_arch: x86_64
- name: "manylinux_2_28 x86_64"
platform: linux
os: ubuntu-latest
cibw_arch: x86_64
build: "*manylinux*"
manylinux: "manylinux_2_28"
- name: "musllinux x86_64"
platform: linux
os: ubuntu-latest
cibw_arch: x86_64
build: "*musllinux*"
- name: "manylinux_2_28 aarch64"
platform: linux
os: ubuntu-24.04-arm
cibw_arch: aarch64
build: "*manylinux*"
- name: "musllinux aarch64"
platform: linux
os: ubuntu-24.04-arm
cibw_arch: aarch64
build: "*musllinux*"
- name: "iOS arm64 device"
platform: ios
os: macos-latest
cibw_arch: arm64_iphoneos
- name: "iOS arm64 simulator"
platform: ios
os: macos-latest
cibw_arch: arm64_iphonesimulator
- name: "iOS x86_64 simulator"
platform: ios
os: macos-26-intel
cibw_arch: x86_64_iphonesimulator
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: true
- uses: actions/setup-python@v5
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"
@ -131,40 +121,44 @@ jobs:
run: |
python3 -m cibuildwheel --output-dir wheelhouse
env:
CIBW_PLATFORM: ${{ matrix.platform }}
CIBW_ARCHS: ${{ matrix.cibw_arch }}
CIBW_BUILD: ${{ matrix.build }}
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: ${{ matrix.manylinux }}
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
CIBW_PRERELEASE_PYTHONS: True
CIBW_SKIP: pp38-*
CIBW_TEST_SKIP: cp38-macosx_arm64
CIBW_ENABLE: cpython-prerelease pypy
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist-${{ matrix.os }}-${{ matrix.cibw_arch }}${{ matrix.manylinux && format('-{0}', matrix.manylinux) }}
name: dist-${{ matrix.name }}
path: ./wheelhouse/*.whl
windows:
if: github.event_name != 'schedule' || github.event.repository.fork == false
name: Windows ${{ matrix.cibw_arch }}
runs-on: windows-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- cibw_arch: x86
os: windows-latest
- cibw_arch: AMD64
os: windows-latest
- cibw_arch: ARM64
os: windows-11-arm
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Checkout extra test images
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: python-pillow/test-images
path: Tests\test-images
- uses: actions/setup-python@v5
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"
@ -185,30 +179,23 @@ jobs:
- name: Build wheels
run: |
setlocal EnableDelayedExpansion
for %%f in (winbuild\build\license\*) do (
set x=%%~nf
rem Skip FriBiDi license, it is not included in the wheel.
set fribidi=!x:~0,7!
if NOT !fribidi!==fribidi (
rem Skip imagequant license, it is not included in the wheel.
set libimagequant=!x:~0,13!
if NOT !libimagequant!==libimagequant (
echo. >> LICENSE
echo ===== %%~nf ===== >> LICENSE
echo. >> LICENSE
type %%f >> LICENSE
)
)
)
call winbuild\\build\\build_env.cmd
%pythonLocation%\python.exe -m cibuildwheel . --output-dir wheelhouse
for f in winbuild/build/license/*; do
name=$(basename "${f%.*}")
# Skip FriBiDi license, it is not included in the wheel.
[[ $name == fribidi* ]] && continue
# Skip imagequant license, it is not included in the wheel.
[[ $name == libimagequant* ]] && continue
echo "" >> LICENSE
echo "===== $name =====" >> LICENSE
echo "" >> LICENSE
cat "$f" >> LICENSE
done
cmd //c "winbuild\\build\\build_env.cmd && $pythonLocation\\python.exe -m cibuildwheel . --output-dir wheelhouse"
env:
CIBW_ARCHS: ${{ matrix.cibw_arch }}
CIBW_BEFORE_ALL: "{package}\\winbuild\\build\\build_dep_all.cmd"
CIBW_CACHE_PATH: "C:\\cibw"
CIBW_PRERELEASE_PYTHONS: True
CIBW_SKIP: pp38-*
CIBW_ENABLE: cpython-prerelease pypy
CIBW_TEST_SKIP: "*-win_arm64"
CIBW_TEST_COMMAND: 'docker run --rm
-v {project}:C:\pillow
@ -217,42 +204,151 @@ jobs:
-e CI -e GITHUB_ACTIONS
mcr.microsoft.com/windows/servercore:ltsc2022
powershell C:\pillow\.github\workflows\wheels-test.ps1 %CD%\..\venv-test'
shell: cmd
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist-windows-${{ matrix.cibw_arch }}
path: ./wheelhouse/*.whl
- name: Upload fribidi.dll
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: fribidi-windows-${{ matrix.cibw_arch }}
path: winbuild\build\bin\fribidi*
sdist:
if: github.event_name != 'schedule' || github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"
cache: pip
cache-dependency-path: "Makefile"
- run: make sdist
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist-sdist
path: dist/*.tar.gz
count-dists:
needs: [build-native-wheels, windows, sdist]
runs-on: ubuntu-latest
name: Count dists
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: dist-*
path: dist
merge-multiple: true
- name: "What did we get?"
run: |
ls -alR
echo "Number of dists, should be $EXPECTED_DISTS:"
files=$(ls dist 2>/dev/null | wc -l)
echo $files
[ "$files" -eq $EXPECTED_DISTS ] || exit 1
compare-dist-sizes:
needs: [build-native-wheels, windows, sdist]
runs-on: ubuntu-latest
name: Compare dist sizes vs PyPI
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: dist-*
path: dist
merge-multiple: true
- name: Compare dist sizes vs latest PyPI release
run: uv run .github/compare-dist-sizes.py dist
scientific-python-nightly-wheels-publish:
if: github.event.repository.fork == false && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
needs: count-dists
runs-on: ubuntu-latest
name: Upload wheels to scientific-python-nightly-wheels
environment:
name: release-anaconda
url: https://anaconda.org/channels/scientific-python-nightly-wheels/packages/pillow/overview
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: dist-!(sdist)*
path: dist
merge-multiple: true
- name: Upload wheels to scientific-python-nightly-wheels
uses: scientific-python/upload-nightly-action@e76cfec8a4611fd02808a801b0ff5a7d7c1b2d99 # 0.6.4
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
sbom:
if: github.event_name != 'schedule' || github.event.repository.fork == false
runs-on: ubuntu-latest
name: Generate SBOM
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"
- name: Generate CycloneDX SBOM
run: python3 .github/generate-sbom.py
- name: Upload SBOM as workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sbom
path: "pillow-*.cdx.json"
- name: Validate SBOM
run: |
python3 -m pip install -r .ci/requirements-sbom.txt
check-jsonschema --schemafile "https://raw.githubusercontent.com/CycloneDX/specification/1.7/schema/bom-1.7.schema.json" pillow-*.cdx.json
sbom-publish:
if: |
github.event.repository.fork == false
&& github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags')
needs: [count-dists, sbom]
runs-on: ubuntu-latest
name: Publish SBOM to GitHub release
permissions:
contents: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sbom
path: .
- name: Attach SBOM to GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "$GITHUB_REF_NAME" pillow-*.cdx.json
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [build-1-QEMU-emulated-wheels, build-2-native-wheels, windows, sdist]
if: github.event.repository.fork == false && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: count-dists
runs-on: ubuntu-latest
name: Upload release to PyPI
environment:
@ -261,10 +357,12 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: dist-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
attestations: true

8
.gitignore vendored
View File

@ -19,6 +19,7 @@ lib64/
parts/
sdist/
var/
wheelhouse/
*.egg-info/
.installed.cfg
*.egg
@ -90,5 +91,12 @@ Tests/images/msp
Tests/images/picins
Tests/images/sunraster
# Test and dependency downloads
pillow-depends-main.zip
pillow-test-images.zip
# pyinstaller
*.spec
# Generated SBOM
pillow-*.cdx.json

View File

@ -1,30 +1,30 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.15.12
hooks:
- id: ruff
- id: ruff-check
args: [--exit-non-zero-on-fix]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 26.3.1
hooks:
- id: black
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
rev: 1.9.4
hooks:
- id: bandit
args: [--severity-level=high]
files: ^src/
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
rev: v1.5.6
hooks:
- id: remove-tabs
exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.5
rev: v22.1.4
hooks:
- id: clang-format
types: [c]
@ -36,43 +36,53 @@ repos:
- id: rst-backticks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
args: [--allow-multiple-documents]
- id: end-of-file-fixer
exclude: ^Tests/images/
- id: file-contents-sorter
files: .github/workflows/Brewfile
- id: trailing-whitespace
exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/
exclude: ^\.github/.*TEMPLATE|^Tests/(fonts|images)/
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
rev: 0.37.2
hooks:
- id: check-github-workflows
- id: check-readthedocs
- id: check-renovate
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.24.1
hooks:
- id: zizmor
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
rev: v1.0.2
hooks:
- id: sphinx-lint
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.8.0
rev: v2.21.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18
rev: v0.25
hooks:
- id: validate-pyproject
additional_dependencies: [trove-classifiers>=2024.10.12]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
rev: 1.7.1
hooks:
- id: tox-ini-fmt

View File

@ -1,5 +1,8 @@
version: 2
sphinx:
configuration: docs/conf.py
formats: [pdf]
build:

View File

@ -2,6 +2,181 @@
Changelog (Pillow)
==================
11.1.0 and newer
----------------
See GitHub Releases:
- https://github.com/python-pillow/Pillow/releases
11.0.0 (2024-10-15)
-------------------
- Update licence to MIT-CMU #8460
[hugovk]
- Conditionally define ImageCms type hint to avoid requiring core #8197
[radarhere]
- Support writing LONG8 offsets in AppendingTiffWriter #8417
[radarhere]
- Use ImageFile.MAXBLOCK when saving TIFF images #8461
[radarhere]
- Do not close provided file handles with libtiff when saving #8458
[radarhere]
- Support ImageFilter.BuiltinFilter for I;16* images #8438
[radarhere]
- Use ImagingCore.ptr instead of ImagingCore.id #8341
[homm, radarhere, hugovk]
- Updated EPS mode when opening images without transparency #8281
[Yay295, radarhere]
- Use transparency when combining P frames from APNGs #8443
[radarhere]
- Support all resampling filters when resizing I;16* images #8422
[radarhere]
- Free memory on early return #8413
[radarhere]
- Cast int before potentially exceeding INT_MAX #8402
[radarhere]
- Check image value before use #8400
[radarhere]
- Improved copying imagequant libraries #8420
[radarhere]
- Use Capsule for WebP saving #8386
[homm, radarhere]
- Fixed writing multiple StripOffsets to TIFF #8317
[Yay295, radarhere]
- Fix dereference before checking for NULL in ImagingTransformAffine #8398
[PavlNekrasov]
- Use transposed size after opening for TIFF images #8390
[radarhere, homm]
- Improve ImageFont error messages #8338
[yngvem, radarhere, hugovk]
- Mention MAX_TEXT_CHUNK limit in PNG error message #8391
[radarhere]
- Cast Dib handle to int #8385
[radarhere]
- Accept float stroke widths #8369
[radarhere]
- Deprecate ICNS (width, height, scale) sizes in favour of load(scale) #8352
[radarhere]
- Improved handling of RGBA palettes when saving GIF images #8366
[radarhere]
- Deprecate isImageType #8364
[radarhere]
- Support converting more modes to LAB by converting to RGBA first #8358
[radarhere]
- Deprecate support for FreeType 2.9.0 #8356
[hugovk, radarhere]
- Removed unused TiffImagePlugin IFD_LEGACY_API #8355
[radarhere]
- Handle duplicate EXIF header #8350
[zakajd, radarhere]
- Return early from BoxBlur if either width or height is zero #8347
[radarhere]
- Check text is either string or bytes #8308
[radarhere]
- Added writing XMP bytes to JPEG #8286
[radarhere]
- Support JPEG2000 RGBA palettes #8256
[radarhere]
- Expand C image to match GIF frame image size #8237
[radarhere]
- Allow saving I;16 images as PPM #8231
[radarhere]
- When IFD is missing, connect get_ifd() dictionary to Exif #8230
[radarhere]
- Skip truncated ICO mask if LOAD_TRUNCATED_IMAGES is enabled #8180
[radarhere]
- Treat unknown JPEG2000 colorspace as unspecified #8343
[radarhere]
- Updated error message when saving WebP with invalid width or height #8322
[radarhere, hugovk]
- Remove warning if NumPy failed to raise an error during conversion #8326
[radarhere]
- If left and right sides meet in ImageDraw.rounded_rectangle(), do not draw rectangle to fill gap #8304
[radarhere]
- Remove WebP support without anim, mux/demux, and with buggy alpha #8213
[homm, radarhere]
- Add missing TIFF CMYK;16B reader #8298
[homm]
- Remove all WITH_* flags from _imaging.c and other flags #8211
[homm]
- Improve ImageDraw2 shape methods #8265
[radarhere]
- Lock around usages of imaging memory arenas #8238
[lysnikolaou]
- Deprecate JpegImageFile huffman_ac and huffman_dc #8274
[radarhere]
- Deprecate ImageMath lambda_eval and unsafe_eval options argument #8242
[radarhere]
- Changed ContainerIO to subclass IO #8240
[radarhere]
- Move away from APIs that use borrowed references under the free-threaded build #8216
[hugovk, lysnikolaou]
- Allow size argument to resize() to be a NumPy array #8201
[radarhere]
- Drop support for Python 3.8 #8183
[hugovk, radarhere]
- Add support for Python 3.13 #8181
[hugovk, radarhere]
- Fix incompatibility with NumPy 1.20 #8187
[neutrinoceros, radarhere]
- Remove PSFile, PyAccess and USE_CFFI_ACCESS #8182
[hugovk, radarhere]
10.4.0 (2024-07-01)
-------------------

View File

@ -5,9 +5,9 @@ The Python Imaging Library (PIL) is
Pillow is the friendly PIL fork. It is
Copyright © 2010-2024 by Jeffrey A. Clark and contributors
Copyright © 2010 by Jeffrey 'Alex' Clark and contributors
Like PIL, Pillow is licensed under the open source HPND License:
Like PIL, Pillow is licensed under the open source MIT-CMU License:
By obtaining, using, and/or copying this software and/or its associated
documentation, you agree that you have read, understood, and will comply

View File

@ -13,6 +13,8 @@ include LICENSE
include Makefile
include tox.ini
graft Tests
graft Tests/images
graft checks
graft src
graft depends
graft winbuild
@ -20,15 +22,25 @@ graft docs
graft _custom_build
# build/src control detritus
exclude .appveyor.yml
exclude .clang-format
exclude .coveragerc
exclude .editorconfig
exclude .readthedocs.yml
exclude codecov.yml
exclude renovate.json
exclude Tests/images/README.md
exclude Tests/images/crash*.tif
exclude Tests/images/string_dimension.tiff
global-exclude .git*
global-exclude *.pyc
global-exclude *.so
prune .ci
prune wheels
prune winbuild/build
prune winbuild/depends
prune Tests/errors
prune Tests/images/jpeg2000
prune Tests/images/msp
prune Tests/images/picins
prune Tests/images/sunraster
prune Tests/test-images

View File

@ -17,14 +17,16 @@ coverage:
.PHONY: doc
.PHONY: html
doc html:
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
$(MAKE) -C docs html
.PHONY: htmlview
htmlview:
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
$(MAKE) -C docs htmlview
.PHONY: htmllive
htmllive:
$(MAKE) -C docs htmllive
.PHONY: doccheck
doccheck:
$(MAKE) doc
@ -45,6 +47,7 @@ help:
@echo " docserve run an HTTP server on the docs directory"
@echo " html make HTML docs"
@echo " htmlview open the index page built by the html target in your browser"
@echo " htmllive rebuild and reload HTML files in your browser"
@echo " install make and install"
@echo " install-coverage make and install with C coverage"
@echo " lint run the lint checks"
@ -72,7 +75,7 @@ debug:
.PHONY: release-test
release-test:
python3 Tests/check_release_notes.py
python3 checks/check_release_notes.py
python3 -m pip install -e .[tests]
python3 selftest.py
python3 -m pytest Tests
@ -94,13 +97,27 @@ test:
python3 -c "import pytest" > /dev/null 2>&1 || python3 -m pip install pytest
python3 -m pytest -qq
.PHONY: test-p
test-p:
python3 -c "import xdist" > /dev/null 2>&1 || python3 -m pip install pytest-xdist
python3 -m pytest -qq -n auto
.PHONY: valgrind
valgrind:
python3 -c "import pytest_valgrind" > /dev/null 2>&1 || python3 -m pip install pytest-valgrind
PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \
PILLOW_VALGRIND_TEST=true PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \
--log-file=/tmp/valgrind-output \
python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output
.PHONY: valgrind-leak
valgrind-leak:
python3 -c "import pytest_valgrind" > /dev/null 2>&1 || python3 -m pip install pytest-valgrind
PILLOW_VALGRIND_TEST=true PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp \
--leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite \
--log-file=/tmp/valgrind-output \
python3 -m pytest -vv --valgrind --valgrind-log=/tmp/valgrind-output
.PHONY: readme
readme:
python3 -c "import markdown2" > /dev/null 2>&1 || python3 -m pip install markdown2
@ -117,7 +134,7 @@ lint-fix:
python3 -c "import black" > /dev/null 2>&1 || python3 -m pip install black
python3 -m black .
python3 -c "import ruff" > /dev/null 2>&1 || python3 -m pip install ruff
python3 -m ruff --fix .
python3 -m ruff check --fix .
.PHONY: mypy
mypy:

View File

@ -6,11 +6,13 @@
## Python Imaging Library (Fork)
Pillow is the friendly PIL fork by [Jeffrey A. Clark and
Pillow is the friendly PIL fork by [Jeffrey 'Alex' Clark and
contributors](https://github.com/python-pillow/Pillow/graphs/contributors).
PIL is the Python Imaging Library by Fredrik Lundh and contributors.
As of 2019, Pillow development is
[supported by Tidelift](https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=readme&utm_campaign=enterprise).
Development is supported by:
- [Tidelift](https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=readme&utm_campaign=enterprise) (since 2018)
- [Thanks.dev](https://thanks.dev) (since 2023)
- [GitHub Sponsors](https://github.com/sponsors/python-pillow) (since 2026)
<table>
<tr>
@ -36,22 +38,16 @@ As of 2019, Pillow development is
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-mingw.yml"><img
alt="GitHub Actions build status (Test MinGW)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20MinGW/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-cygwin.yml"><img
alt="GitHub Actions build status (Test Cygwin)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Cygwin/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-docker.yml"><img
alt="GitHub Actions build status (Test Docker)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Docker/badge.svg"></a>
<a href="https://ci.appveyor.com/project/python-pillow/Pillow"><img
alt="AppVeyor CI build status (Windows)"
src="https://img.shields.io/appveyor/build/python-pillow/Pillow/main.svg?label=Windows%20build"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml"><img
alt="GitHub Actions build status (Wheels)"
src="https://github.com/python-pillow/Pillow/workflows/Wheels/badge.svg"></a>
<a href="https://app.codecov.io/gh/python-pillow/Pillow"><img
alt="Code coverage"
src="https://codecov.io/gh/python-pillow/Pillow/branch/main/graph/badge.svg"></a>
<a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:pillow"><img
<a href="https://issues.oss-fuzz.com/issues?q=title:pillow"><img
alt="Fuzzing Status"
src="https://oss-fuzz-build-logs.storage.googleapis.com/badges/pillow.svg"></a>
</td>
@ -98,7 +94,7 @@ This library provides extensive file format support, an efficient internal repre
The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.
## More Information
## More information
- [Documentation](https://pillow.readthedocs.io/)
- [Installation](https://pillow.readthedocs.io/en/latest/installation/basic-installation.html)
@ -107,9 +103,13 @@ The core image library is designed for fast access to data stored in a few basic
- [Issues](https://github.com/python-pillow/Pillow/issues)
- [Pull requests](https://github.com/python-pillow/Pillow/pulls)
- [Release notes](https://pillow.readthedocs.io/en/stable/releasenotes/index.html)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Changelog](https://github.com/python-pillow/Pillow/releases)
- [Pre-fork](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst#pre-fork)
## Report a Vulnerability
## Report a vulnerability
To report a security vulnerability, please follow the procedure described in the [Tidelift security policy](https://tidelift.com/docs/security).
To report sensitive vulnerability information, report it [privately on GitHub](https://github.com/python-pillow/Pillow/security/advisories/new).
If you cannot use GitHub, use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
DO NOT report sensitive vulnerability information in public.

View File

@ -1,46 +1,26 @@
# Release Checklist
# Release checklist
See https://pillow.readthedocs.io/en/stable/releasenotes/versioning.html for
information about how the version numbers line up with releases.
## Main Release
## Main release
Released quarterly on January 2nd, April 1st, July 1st and October 15th.
* [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154
* [ ] Develop and prepare release in `main` branch.
* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) and [AppVeyor](https://ci.appveyor.com/project/python-pillow/Pillow) to confirm passing tests in `main` branch.
* [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them.
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py`
* [ ] Update `CHANGES.rst`.
* [ ] Run pre-release check via `make release-test` in a freshly cloned repo.
* [ ] Create branch and tag for release e.g.:
```bash
git branch 5.2.x
git tag 5.2.0
git push --tags
```
* [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml)
has passed, including the "Upload release to PyPI" job. This will have been triggered
by the new tag.
* [ ] Publish the [release on GitHub](https://github.com/python-pillow/Pillow/releases).
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/),
increment and append `.dev0` to version identifier in `src/PIL/_version.py` and then:
```bash
git push --all
```
## Point Release
* [ ] Create a new issue and select the "Maintainers only: Release" template.
## Point release
Released as needed for security, installation or critical bug fixes.
* [ ] Make necessary changes in `main` branch.
* [ ] Update `CHANGES.rst`.
* [ ] Check out release branch e.g.:
```bash
git checkout -t remotes/origin/5.2.x
```
* [ ] Cherry pick individual commits from `main` branch to release branch e.g. `5.2.x`, then `git push`.
* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) and [AppVeyor](https://ci.appveyor.com/project/python-pillow/Pillow) to confirm passing tests in release branch e.g. `5.2.x`.
* [ ] If this is a security fix: amend commits to include the CVE identifier in the commit message.
* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) to confirm passing tests in release branch e.g. `5.2.x`.
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py`
* [ ] Run pre-release check via `make release-test`.
* [ ] Create tag for release e.g.:
@ -59,8 +39,9 @@ Released as needed for security, installation or critical bug fixes.
```bash
git push
```
* [ ] If this is a security fix: publish the [GitHub Security Advisory or Advisories](https://github.com/python-pillow/Pillow/security/advisories).
## Embargoed Release
## Embargoed release
Released as needed privately to individual vendors for critical security-related bug fixes.
@ -84,7 +65,7 @@ Released as needed privately to individual vendors for critical security-related
git push origin 2.5.x
```
## Publicize Release
## Publicize release
* [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321
@ -92,7 +73,7 @@ Released as needed privately to individual vendors for critical security-related
* [ ] Make sure the [default version for Read the Docs](https://pillow.readthedocs.io/en/stable/) is up-to-date with the release changes
## Docker Images
## Docker images
* [ ] Update Pillow in the Docker Images repository
```bash

View File

@ -1,4 +1,4 @@
Pillow Tests
Pillow tests
============
Test scripts are named ``test_xxx.py``. Helper classes and functions can be found in ``helper.py``.

View File

@ -1,54 +0,0 @@
from __future__ import annotations
import time
from PIL import PyAccess
from .helper import hopper
# Not running this test by default. No DOS against CI.
def iterate_get(size, access) -> None:
(w, h) = size
for x in range(w):
for y in range(h):
access[(x, y)]
def iterate_set(size, access) -> None:
(w, h) = size
for x in range(w):
for y in range(h):
access[(x, y)] = (x % 256, y % 256, 0)
def timer(func, label, *args) -> None:
iterations = 5000
starttime = time.time()
for x in range(iterations):
func(*args)
if time.time() - starttime > 10:
break
endtime = time.time()
print(
f"{label}: completed {x + 1} iterations in {endtime - starttime:.4f}s, "
f"{(endtime - starttime) / (x + 1.0):.6f}s per iteration"
)
def test_direct() -> None:
im = hopper()
im.load()
# im = Image.new("RGB", (2000, 2000), (1, 3, 2))
caccess = im.im.pixel_access(False)
access = PyAccess.new(im, False)
assert access is not None
assert caccess[(0, 0)] == access[(0, 0)]
print(f"Size: {im.width}x{im.height}")
timer(iterate_get, "PyAccess - get", im.size, access)
timer(iterate_set, "PyAccess - set", im.size, access)
timer(iterate_get, "C-api - get", im.size, caccess)
timer(iterate_set, "C-api - set", im.size, caccess)

View File

@ -1,43 +0,0 @@
from __future__ import annotations
import sys
from PIL import features
def test_wheel_modules() -> None:
expected_modules = {"pil", "tkinter", "freetype2", "littlecms2", "webp"}
# tkinter is not available in cibuildwheel installed CPython on Windows
try:
import tkinter
assert tkinter
except ImportError:
expected_modules.remove("tkinter")
assert set(features.get_supported_modules()) == expected_modules
def test_wheel_codecs() -> None:
expected_codecs = {"jpg", "jpg_2000", "zlib", "libtiff"}
assert set(features.get_supported_codecs()) == expected_codecs
def test_wheel_features() -> None:
expected_features = {
"webp_anim",
"webp_mux",
"transp_webp",
"raqm",
"fribidi",
"harfbuzz",
"libjpeg_turbo",
"xcb",
}
if sys.platform == "win32":
expected_features.remove("xcb")
assert set(features.get_supported_features()) == expected_features

View File

@ -1,9 +1,17 @@
from __future__ import annotations
import io
import sys
import sysconfig
import pytest
FREE_THREADED_BUILD = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
gil_enabled_at_start = True
if FREE_THREADED_BUILD:
gil_enabled_at_start = sys._is_gil_enabled() # type: ignore[attr-defined]
def pytest_report_header(config: pytest.Config) -> str:
try:
@ -16,6 +24,25 @@ def pytest_report_header(config: pytest.Config) -> str:
return f"pytest_report_header failed: {e}"
def pytest_terminal_summary(terminalreporter: pytest.TerminalReporter) -> None:
if (
FREE_THREADED_BUILD
and not gil_enabled_at_start
and sys._is_gil_enabled() # type: ignore[attr-defined]
):
tr = terminalreporter
tr.ensure_newline()
tr.section("GIL re-enabled", red=True, bold=True)
tr.line("The GIL was re-enabled at runtime during the tests.")
tr.line("This can happen with no test failures if the RuntimeWarning")
tr.line("raised by Python when this happens is filtered by a test.")
tr.line("")
tr.line("Please ensure all new C modules declare support for running")
tr.line("without the GIL. Any new tests that intentionally imports")
tr.line("code that re-enables the GIL should do so in a subprocess.")
pytest.exit("GIL re-enabled during tests", returncode=1)
def pytest_configure(config: pytest.Config) -> None:
config.addinivalue_line(
"markers",

1
Tests/createfontdatachunk.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from __future__ import annotations
import base64

Binary file not shown.

View File

@ -2,7 +2,7 @@
NotoNastaliqUrdu-Regular.ttf and NotoSansSymbols-Regular.ttf, from https://github.com/googlei18n/noto-fonts
NotoSans-Regular.ttf, from https://www.google.com/get/noto/
NotoSansJP-Thin.otf, from https://www.google.com/get/noto/help/cjk/
AdobeVFPrototype.ttf, from https://github.com/adobe-fonts/adobe-variable-font-prototype
AdobeVFPrototype.ttf, from https://github.com/adobe-fonts/adobe-variable-font-prototype. AdobeVFPrototypeDuplicates.ttf is a modified version of this
TINY5x3GX.ttf, from http://velvetyne.fr/fonts/tiny
ArefRuqaa-Regular.ttf, from https://github.com/google/fonts/tree/master/ofl/arefruqaa
ter-x20b.pcf, from http://terminus-font.sourceforge.net/

View File

@ -1,10 +1,10 @@
STARTFONT
FONT ÿ
SIZE 10
FONTBOUNDINGBOX
CHARS
FONTBOUNDINGBOX 1 1 0 0
CHARS 1
STARTCHAR
ENCODING
ENCODING 65
BBX 2 5
ENDCHAR
ENDFONT

View File

@ -9,17 +9,21 @@ import os
import shutil
import subprocess
import sys
import sysconfig
import tempfile
from functools import lru_cache
from io import BytesIO
from typing import Any, Callable, Sequence
import pytest
from packaging.version import parse as parse_version
from PIL import Image, ImageFile, ImageMath, features
TYPE_CHECKING = False
if TYPE_CHECKING:
from collections.abc import Callable, Sequence
from pathlib import Path
from typing import Any
logger = logging.getLogger(__name__)
uploader = None
@ -51,17 +55,15 @@ def convert_to_comparable(
if a.mode == "P":
new_a = Image.new("L", a.size)
new_b = Image.new("L", b.size)
new_a.putdata(a.getdata())
new_b.putdata(b.getdata())
new_a.putdata(a.get_flattened_data())
new_b.putdata(b.get_flattened_data())
elif a.mode == "I;16":
new_a = a.convert("I")
new_b = b.convert("I")
return new_a, new_b
def assert_deep_equal(
a: Sequence[Any], b: Sequence[Any], msg: str | None = None
) -> None:
def assert_deep_equal(a: Any, b: Any, msg: str | None = None) -> None:
try:
assert len(a) == len(b), msg or f"got length {len(a)}, expected {len(b)}"
except Exception:
@ -97,12 +99,14 @@ def assert_image_equal(a: Image.Image, b: Image.Image, msg: str | None = None) -
def assert_image_equal_tofile(
a: Image.Image, filename: str, msg: str | None = None, mode: str | None = None
a: Image.Image,
filename: str | Path,
msg: str | None = None,
mode: str | None = None,
) -> None:
with Image.open(filename) as img:
if mode:
img = img.convert(mode)
assert_image_equal(a, img, msg)
with Image.open(filename) as im:
converted_im = im.convert(mode) if mode else im
assert_image_equal(a, converted_im, msg)
def assert_image_similar(
@ -138,21 +142,14 @@ def assert_image_similar(
def assert_image_similar_tofile(
a: Image.Image,
filename: str,
filename: str | Path,
epsilon: float,
msg: str | None = None,
mode: str | None = None,
) -> None:
with Image.open(filename) as img:
if mode:
img = img.convert(mode)
assert_image_similar(a, img, epsilon, msg)
def assert_all_same(items: Sequence[Any], msg: str | None = None) -> None:
assert items.count(items[0]) == len(items), msg
def assert_not_all_same(items: Sequence[Any], msg: str | None = None) -> None:
assert items.count(items[0]) != len(items), msg
@ -166,11 +163,25 @@ def assert_tuple_approx_equal(
pytest.fail(msg + ": " + repr(actuals) + " != " + repr(targets))
def timeout_unless_slower_valgrind(timeout: float) -> pytest.MarkDecorator:
if "PILLOW_VALGRIND_TEST" in os.environ:
return pytest.mark.pil_noop_mark()
return pytest.mark.timeout(timeout)
def skip_unless_feature(feature: str) -> pytest.MarkDecorator:
reason = f"{feature} not available"
return pytest.mark.skipif(not features.check(feature), reason=reason)
def has_feature_version(feature: str, required: str) -> bool:
version = features.version(feature)
assert version is not None
version_required = parse_version(required)
version_available = parse_version(version)
return version_available >= version_required
def skip_unless_feature_version(
feature: str, required: str, reason: str | None = None
) -> pytest.MarkDecorator:
@ -270,17 +281,13 @@ def _cached_hopper(mode: str) -> Image.Image:
im = hopper("L")
else:
im = hopper()
if mode.startswith("BGR;"):
with pytest.warns(DeprecationWarning):
im = im.convert(mode)
else:
try:
im = im.convert(mode)
except ImportError:
if mode == "LAB":
im = Image.open("Tests/images/hopper.Lab.tif")
else:
raise
try:
im = im.convert(mode)
except ImportError:
if mode == "LAB":
im = Image.open("Tests/images/hopper.Lab.tif")
else:
raise
return im
@ -294,16 +301,6 @@ def djpeg_available() -> bool:
return False
def cjpeg_available() -> bool:
if shutil.which("cjpeg"):
try:
subprocess.check_call(["cjpeg", "-version"])
return True
except subprocess.CalledProcessError: # pragma: no cover
return False
return False
def netpbm_available() -> bool:
return bool(shutil.which("ppmquant") and shutil.which("ppmtogif"))
@ -328,16 +325,7 @@ def magick_command() -> list[str] | None:
return None
def on_appveyor() -> bool:
return "APPVEYOR" in os.environ
def on_github_actions() -> bool:
return "GITHUB_ACTIONS" in os.environ
def on_ci() -> bool:
# GitHub Actions and AppVeyor have "CI"
return "CI" in os.environ
@ -359,10 +347,6 @@ def is_pypy() -> bool:
return hasattr(sys, "pypy_translation_info")
def is_mingw() -> bool:
return sysconfig.get_platform() == "mingw"
class CachedProperty:
def __init__(self, func: Callable[[Any], Any]) -> None:
self.func = func

BIN
Tests/images/avif/exif.avif Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Tests/images/avif/star.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
Tests/images/avif/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

View File

@ -1,578 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>BMP Suite Image List</title>
<style>
.b { background:url(bkgd.png); }
.q { background-color:#fff0e0; }
.bad { background-color:#ffa0a0; }
</style>
</head>
<body>
<h1>BMP Suite Image List</h1>
<p><i>For <a href="http://entropymine.com/jason/bmpsuite/">BMP Suite</a>
version 2.3</i></p>
<p>This document describes the images in <i>BMP Suite</i>, and shows what
I allege to be the correct way to interpret them. PNG and JPEG images are
used for reference.
</p>
<p>It also shows how your web browser displays the BMP images,
but that&rsquo;s not its main purpose.
BMP is poor image format to use on web pages, so a web browser&rsquo;s
level of support for it is arguably not important.</p>
<table border=1 cellpadding=8>
<tr>
<th>File</th>
<th>Ver.</th>
<th>Correct display</th>
<th>In your browser</th>
<th>Notes</th>
</tr>
<tr>
<td>g/pal1.bmp</td>
<td>3</td>
<td class=b><img src="pal1.png"></td>
<td class=b><img src="../g/pal1.bmp"></td>
<td>1 bit/pixel paletted image, in which black is the first color in
the palette.</td>
</tr>
<tr>
<td>g/pal1wb.bmp</td>
<td>3</td>
<td class=b><img src="pal1.png"></td>
<td class=b><img src="../g/pal1wb.bmp"></td>
<td>1 bit/pixel paletted image, in which white is the first color in
the palette.</td>
</tr>
<tr>
<td>g/pal1bg.bmp</td>
<td>3</td>
<td class=b><img src="pal1bg.png"></td>
<td class=b><img src="../g/pal1bg.bmp"></td>
<td>1 bit/pixel paletted image, with colors other than black and white.</td>
</tr>
<tr>
<td class=q>q/pal1p1.bmp</td>
<td>3</td>
<td class=b><img src="pal1p1.png"></td>
<td class=b><img src="../q/pal1p1.bmp"></td>
<td>1 bit/pixel paletted image, with only one color in the palette.
The documentation says that 1-bpp images have a palette size of 2
(not &ldquo;up to 2&rdquo;), but it would be silly for a viewer not to
support a size of 1.</td>
</tr>
<tr>
<td class=q>q/pal2.bmp</td>
<td>3</td>
<td class=b><img src="pal2.png"></td>
<td class=b><img src="../q/pal2.bmp"></td>
<td>A paletted image with 2 bits/pixel. Usually only 1, 4,
and 8 are allowed, but 2 is legal on Windows CE.</td>
</tr>
<tr>
<td>g/pal4.bmp</td>
<td>3</td>
<td class=b><img src="pal4.png"></td>
<td class=b><img src="../g/pal4.bmp"></td>
<td>Paletted image with 12 palette colors, and 4 bits/pixel.</td>
</tr>
<tr>
<td>g/pal4rle.bmp</td>
<td>3</td>
<td class=b><img src="pal4.png"></td>
<td class=b><img src="../g/pal4rle.bmp"></td>
<td>4-bit image that uses RLE compression.</td>
</tr>
<tr>
<td class=q>q/pal4rletrns.bmp</td>
<td>3</td>
<td class=b><img src="pal4rletrns.png"><br>
or<br><img src="pal4rletrns-0.png"><br>
or<br><img src="pal4rletrns-b.png"></td>
<td class=b><img src="../q/pal4rletrns.bmp"></td>
<td>An RLE-compressed image that used &ldquo;delta&rdquo;
codes to skip over some pixels, leaving them undefined. Some viewers
make undefined pixels transparent, others make them black, and
others assign them palette color 0 (purple, in this case).</td>
</tr>
<tr>
<td>g/pal8.bmp</td>
<td>3</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8.bmp"></td>
<td>Our standard paletted image, with 252 palette colors, and 8
bits/pixel.</td>
</tr>
<tr>
<td>g/pal8-0.bmp</td>
<td>3</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8-0.bmp"></td>
<td>Every field that can be set to 0 is set to 0: pixels/meter=0;
colors used=0 (meaning the default 256); size-of-image=0.</td>
</tr>
<tr>
<td>g/pal8rle.bmp</td>
<td>3</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8rle.bmp"></td>
<td>8-bit image that uses RLE compression.</td>
</tr>
<tr>
<td class=q>q/pal8rletrns.bmp</td>
<td>3</td>
<td class=b><img src="pal8rletrns.png"><br>
or<br><img src="pal8rletrns-0.png"><br>
or<br><img src="pal8rletrns-b.png"></td>
<td class=b><img src="../q/pal8rletrns.bmp"></td>
<td>8-bit version of q/pal4rletrns.bmp.</td>
</tr>
<tr>
<td>g/pal8w126.bmp</td>
<td>3</td>
<td class=b><img src="pal8w126.png"></td>
<td class=b><img src="../g/pal8w126.bmp"></td>
<td rowspan=3>Images with different widths and heights.
In BMP format, rows are padded to a multiple of four bytes, so we
test all four possibilities.</td>
</tr>
<tr>
<td>g/pal8w125.bmp</td>
<td>3</td>
<td class=b><img src="pal8w125.png"></td>
<td class=b><img src="../g/pal8w125.bmp"></td>
</tr>
<tr>
<td>g/pal8w124.bmp</td>
<td>3</td>
<td class=b><img src="pal8w124.png"></td>
<td class=b><img src="../g/pal8w124.bmp"></td>
</tr>
<tr>
<td>g/pal8topdown.bmp</td>
<td>3</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8topdown.bmp"></td>
<td>BMP images are normally stored from the bottom up, but
there is a way to store them from the top down.</td>
</tr>
<tr>
<td class=q>q/pal8offs.bmp</td>
<td>3</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../q/pal8offs.bmp"></td>
<td>A file with some unused bytes between the palette and the
image. This is probably valid, but I&rsquo;m not 100% sure.</td>
</tr>
<tr>
<td class=q>q/pal8oversizepal.bmp</td>
<td>3</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../q/pal8oversizepal.bmp"></td>
<td>An 8-bit image with 300 palette colors. This may be invalid,
because the documentation could
be interpreted to imply that 8-bit images aren&rsquo;t allowed
to have more than 256 colors.</td>
</tr>
<tr>
<td>g/pal8nonsquare.bmp</td>
<td>3</td>
<td class=b>
<img src="pal8nonsquare-v.png"><br>
or<br>
<img src="pal8nonsquare-e.png">
</td>
<td class=b><img src="../g/pal8nonsquare.bmp"></td>
<td>An image with non-square pixels: the X pixels/meter is twice
the Y pixels/meter. Image <i>editors</i> can be expected to
leave the image &ldquo;squashed&rdquo;; image <i>viewers</i> should
consider stretching it to its correct proportions.</td>
</tr>
<tr>
<td>g/pal8os2.bmp</td>
<td>OS/2v1</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8os2.bmp"></td>
<td>An OS/2-style bitmap.</td>
</tr>
<tr>
<td class=q>q/pal8os2sp.bmp</td>
<td>OS/2v1</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../q/pal8os2sp.bmp"></td>
<td>An OS/2v1 with a less-than-full-sized palette.
Probably not valid, but such files have been seen in the wild.</td>
</tr>
<tr>
<td class=q>q/pal8os2v2.bmp</td>
<td>OS/2v2</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../q/pal8os2v2.bmp"></td>
<td>My attempt to make an OS/2v2 bitmap.</td>
</tr>
<tr>
<td class=q>q/pal8os2v2-16.bmp</td>
<td>OS/2v2</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../q/pal8os2v2-16.bmp"></td>
<td>An OS/2v2 bitmap whose header has only 16 bytes, instead of the full 64.</td>
</tr>
<tr>
<td>g/pal8v4.bmp</td>
<td>4</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8v4.bmp"></td>
<td>A v4 bitmap. I&rsquo;m not sure that the gamma and chromaticity values in
this file are sensible, because I can&rsquo;t find any detailed documentation
of them.</td>
</tr>
<tr>
<td>g/pal8v5.bmp</td>
<td>5</td>
<td class=b><img src="pal8.png"></td>
<td class=b><img src="../g/pal8v5.bmp"></td>
<td>A v5 bitmap. Version 5 has additional colorspace options over v4, so it
is easier to create, and ought to be more portable.</td>
</tr>
<tr>
<td>g/rgb16.bmp</td>
<td>3</td>
<td class=b><img src="rgb16.png"></td>
<td class=b><img src="../g/rgb16.bmp"></td>
<td>A 16-bit image with the default color format: 5 bits each for red,
green, and blue, and 1 unused bit.
The whitest colors should (I assume) be displayed as pure white:
<span style="background-color:rgb(255,255,255)">(255,255,255)</span>, not
<span style="background-color:rgb(248,248,248)">(248,248,248)</span>.</td>
</tr>
<tr>
<td>g/rgb16-565.bmp</td>
<td>3</td>
<td class=b><img src="rgb16-565.png"></td>
<td class=b><img src="../g/rgb16-565.bmp"></td>
<td>A 16-bit image with a BITFIELDS segment indicating 5 red, 6 green,
and 5 blue bits. This is a standard 16-bit format, even supported by
old versions of Windows that don&rsquo;t support any other non-default 16-bit
formats.
The whitest colors should be displayed as pure white:
<span style="background-color:rgb(255,255,255)">(255,255,255)</span>, not
<span style="background-color:rgb(248,252,248)">(248,252,248)</span>.</td>
</tr>
<tr>
<td>g/rgb16-565pal.bmp</td>
<td>3</td>
<td class=b><img src="rgb16-565.png"></td>
<td class=b><img src="../g/rgb16-565pal.bmp"></td>
<td>A 16-bit image with both a BITFIELDS segment and a palette.</td>
</tr>
<tr>
<td class=q>q/rgb16-231.bmp</td>
<td>3</td>
<td class=b><img src="rgb16-231.png"></td>
<td class=b><img src="../q/rgb16-231.bmp"></td>
<td>An unusual and silly 16-bit image, with 2 red bits, 3 green bits, and 1
blue bit. Most viewers do support this image, but the colors may be darkened
with a yellow-green shadow. That&rsquo;s because they&rsquo;re doing simple
bit-shifting (possibly including one round of bit replication), instead of
proper scaling.</td>
</tr>
<tr>
<td class=q>q/rgba16-4444.bmp</td>
<td>5</td>
<td class=b><img src="rgba16-4444.png"></td>
<td class=b><img src="../q/rgba16-4444.bmp"></td>
<td>A 16-bit image with an alpha channel. There are 4 bits for each color
channel, and 4 bits for the alpha channel.
It&rsquo;s not clear if this is valid, but I can&rsquo;t find anything that
suggests it isn&rsquo;t.
</td>
</tr>
<tr>
<td>g/rgb24.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../g/rgb24.bmp"></td>
<td>A perfectly ordinary 24-bit (truecolor) image.</td>
</tr>
<tr>
<td>g/rgb24pal.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../g/rgb24pal.bmp"></td>
<td>A 24-bit image, with a palette containing 256 colors. There is little if
any reason for a truecolor image to contain a palette, but it is legal.</td>
</tr>
<tr>
<td class=q>q/rgb24largepal.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../q/rgb24largepal.bmp"></td>
<td>A 24-bit image, with a palette containing 300 colors.
The fact that the palette has more than 256 colors may cause some viewers
to complain, but the documentation does not mention a size limit.</td>
</tr>
<tr>
<td class=q>q/rgb24prof.bmp</td>
<td>5</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../q/rgb24prof.bmp"></td>
<td>My attempt to make a BMP file with an embedded color profile.</td>
</tr>
<tr>
<td class=q>q/rgb24lprof.bmp</td>
<td>5</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../q/rgb24lprof.bmp"></td>
<td>My attempt to make a BMP file with a linked color profile.</td>
</tr>
<tr>
<td class=q>q/rgb24jpeg.bmp</td>
<td>5</td>
<td class=b><img src="rgb24.jpg"></td>
<td class=b><img src="../q/rgb24jpeg.bmp"></td>
<td rowspan=2>My attempt to make BMP files with embedded JPEG and PNG images.
These are not likely to be supported by much of anything (they&rsquo;re
intended for printers).</td>
</tr>
<tr>
<td class=q>q/rgb24png.bmp</td>
<td>5</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../q/rgb24png.bmp"></td>
</tr>
<tr>
<td>g/rgb32.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../g/rgb32.bmp"></td>
<td>A 32-bit image using the default color format for 32-bit images (no
BITFIELDS segment). There are 8 bits per color channel, and 8 unused
bits. The unused bits are set to 0.</td>
</tr>
<tr>
<td>g/rgb32bf.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../g/rgb32bf.bmp"></td>
<td>A 32-bit image with a BITFIELDS segment. As usual, there are 8 bits per
color channel, and 8 unused bits. But the color channels are in an unusual
order, so the viewer must read the BITFIELDS, and not just guess.</td>
</tr>
<tr>
<td class=q>q/rgb32fakealpha.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"><br>
or<br>
<img class=b src="fakealpha.png">
</td>
<td class=b><img src="../q/rgb32fakealpha.bmp"></td>
<td>Same as g/rgb32.bmp, except that the unused bits are set to something
other than 0.
If the image becomes transparent toward the bottom, it probably means
the viewer uses heuristics to guess whether the undefined
data represents transparency.</td>
</tr>
<tr>
<td class=q>q/rgb32-111110.bmp</td>
<td>3</td>
<td class=b><img src="rgb24.png"></td>
<td class=b><img src="../q/rgb32-111110.bmp"></td>
<td>A 32 bits/pixel image, with all 32 bits used: 11 each for red and
green, and 10 for blue. As far as I know, this is perfectly valid, but it
is unusual.</td>
</tr>
<tr>
<td class=q>q/rgba32.bmp</td>
<td>5</td>
<td class=b><img src="rgba32.png"></td>
<td class=b><img src="../q/rgba32.bmp"></td>
<td>A BMP with an alpha channel. Transparency is barely documented,
so it&rsquo;s <i>possible</i> that this file is not correctly formed.
The color channels are in an unusual order, to prevent viewers from
passing this test by making a lucky guess.</td>
</tr>
<tr>
<td class=q>q/rgba32abf.bmp</td>
<td>3</td>
<td class=b><img src="rgba32.png"></td>
<td class=b><img src="../q/rgba32abf.bmp"></td>
<td>An image of type BI_ALHPABITFIELDS. Supposedly, this was used on
Windows CE. I don&rsquo;t know whether it is constructed correctly.</td>
</tr>
<tr>
<td class=bad>b/badbitcount.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badbitcount.bmp"></td>
<td>Header indicates an absurdly large number of bits/pixel.</td>
</tr>
<tr>
<td class=bad>b/badbitssize.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badbitssize.bmp"></td>
<td>Header incorrectly indicates that the bitmap is several GB in size.</td>
</tr>
<tr>
<td class=bad>b/baddens1.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/baddens1.bmp"></td>
<td rowspan=2>Density (pixels per meter) suggests the image is <i>much</i>
larger in one dimension than the other.</td>
</tr>
<tr>
<td class=bad>b/baddens2.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/baddens2.bmp"></td>
</tr>
<tr>
<td class=bad>b/badfilesize.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badfilesize.bmp"></td>
<td>Header incorrectly indicates that the file is several GB in size.</td>
</tr>
<tr>
<td class=bad>b/badheadersize.bmp</td>
<td>?</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badheadersize.bmp"></td>
<td>Header size is 66 bytes, which is not a valid size for any known BMP
version.</td>
</tr>
<tr>
<td class=bad>b/badpalettesize.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badpalettesize.bmp"></td>
<td>Header incorrectly indicates that the palette contains an absurdly large
number of colors.</td>
</tr>
<tr>
<td class=bad>b/badplanes.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badplanes.bmp"></td>
<td>The &ldquo;planes&rdquo; setting, which is required to be 1, is not 1.</td>
</tr>
<tr>
<td class=bad>b/badrle.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badrle.bmp"></td>
<td>An invalid RLE-compressed image that tries to cause buffer overruns.</td>
</tr>
<tr>
<td class=bad>b/badwidth.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/badwidth.bmp"></td>
<td>The image claims to be a negative number of pixels in width.</td>
</tr>
<tr>
<td class=bad>b/pal8badindex.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/pal8badindex.bmp"></td>
<td>Many of the palette indices used in the image are not present in the
palette.</td>
</tr>
<tr>
<td class=bad>b/reallybig.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/reallybig.bmp"></td>
<td>An image with a very large reported width and height.</td>
</tr>
<tr>
<td class=bad>b/rletopdown.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/rletopdown.bmp"></td>
<td>An RLE-compressed image that tries to use top-down orientation,
which isn&rsquo;t allowed.</td>
</tr>
<tr>
<td class=bad>b/shortfile.bmp</td>
<td>3</td>
<td class=b>N/A</td>
<td class=b><img src="../b/shortfile.bmp"></td>
<td>A file that has been truncated in the middle of the bitmap.</td>
</tr>
</table>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Some files were not shown because too many files have changed in this diff Show More