mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge branch 'main' into install-doc-dir
This commit is contained in:
commit
e39fb2ef14
7
.github/workflows/wheels-dependencies.sh
vendored
7
.github/workflows/wheels-dependencies.sh
vendored
|
@ -19,7 +19,7 @@ FREETYPE_VERSION=2.13.2
|
|||
HARFBUZZ_VERSION=8.3.0
|
||||
LIBPNG_VERSION=1.6.40
|
||||
JPEGTURBO_VERSION=3.0.1
|
||||
OPENJPEG_VERSION=2.5.0
|
||||
OPENJPEG_VERSION=2.5.2
|
||||
XZ_VERSION=5.4.5
|
||||
TIFF_VERSION=4.6.0
|
||||
LCMS2_VERSION=2.16
|
||||
|
@ -40,7 +40,7 @@ BROTLI_VERSION=1.1.0
|
|||
|
||||
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-2.5.0.tar.gz)
|
||||
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)
|
||||
|
@ -93,6 +93,9 @@ function build {
|
|||
done
|
||||
fi
|
||||
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"
|
||||
|
|
|
@ -82,9 +82,6 @@ As of 2019, Pillow development is
|
|||
<a href="https://gitter.im/python-pillow/Pillow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img
|
||||
alt="Join the chat at https://gitter.im/python-pillow/Pillow"
|
||||
src="https://badges.gitter.im/python-pillow/Pillow.svg"></a>
|
||||
<a href="https://twitter.com/PythonPillow"><img
|
||||
alt="Follow on https://twitter.com/PythonPillow"
|
||||
src="https://img.shields.io/badge/tweet-on%20Twitter-00aced.svg"></a>
|
||||
<a href="https://fosstodon.org/@pillow"><img
|
||||
alt="Follow on https://fosstodon.org/@pillow"
|
||||
src="https://img.shields.io/badge/publish-on%20Mastodon-595aff.svg"
|
||||
|
|
|
@ -86,7 +86,7 @@ Released as needed privately to individual vendors for critical security-related
|
|||
|
||||
## Publicize Release
|
||||
|
||||
* [ ] Announce release availability via [Twitter](https://twitter.com/pythonpillow) and [Mastodon](https://fosstodon.org/@pillow) e.g. https://twitter.com/PythonPillow/status/1013789184354603010
|
||||
* [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321
|
||||
|
||||
## Documentation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# install openjpeg
|
||||
|
||||
archive=openjpeg-2.5.0
|
||||
archive=openjpeg-2.5.2
|
||||
|
||||
./download-and-extract.sh $archive https://raw.githubusercontent.com/python-pillow/pillow-depends/main/$archive.tar.gz
|
||||
|
||||
|
|
|
@ -73,10 +73,6 @@ Pillow for enterprise is available via the Tidelift Subscription. `Learn more <h
|
|||
:target: https://gitter.im/python-pillow/Pillow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||
:alt: Join the chat at https://gitter.im/python-pillow/Pillow
|
||||
|
||||
.. image:: https://img.shields.io/badge/tweet-on%20Twitter-00aced.svg
|
||||
:target: https://twitter.com/PythonPillow
|
||||
:alt: Follow on https://twitter.com/PythonPillow
|
||||
|
||||
.. image:: https://img.shields.io/badge/publish-on%20Mastodon-595aff.svg
|
||||
:target: https://fosstodon.org/@pillow
|
||||
:alt: Follow on https://fosstodon.org/@pillow
|
||||
|
|
|
@ -54,7 +54,7 @@ Many of Pillow's features require external libraries:
|
|||
* **openjpeg** provides JPEG 2000 functionality.
|
||||
|
||||
* Pillow has been tested with openjpeg **2.0.0**, **2.1.0**, **2.3.1**,
|
||||
**2.4.0** and **2.5.0**.
|
||||
**2.4.0**, **2.5.0** and **2.5.2**.
|
||||
* Pillow does **not** support the earlier **1.5** series which ships
|
||||
with Debian Jessie.
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ only work on L and RGB images.
|
|||
.. autofunction:: colorize
|
||||
.. autofunction:: crop
|
||||
.. autofunction:: scale
|
||||
.. autoclass:: SupportsGetMesh
|
||||
:show-inheritance:
|
||||
.. autofunction:: deform
|
||||
.. autofunction:: equalize
|
||||
.. autofunction:: expand
|
||||
|
|
|
@ -81,7 +81,6 @@ Homepage = "https://python-pillow.org"
|
|||
Mastodon = "https://fosstodon.org/@pillow"
|
||||
"Release notes" = "https://pillow.readthedocs.io/en/stable/releasenotes/index.html"
|
||||
Source = "https://github.com/python-pillow/Pillow"
|
||||
Twitter = "https://twitter.com/PythonPillow"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["PIL"]
|
||||
|
|
|
@ -411,7 +411,15 @@ def scale(
|
|||
return image.resize(size, resample)
|
||||
|
||||
|
||||
class _SupportsGetMesh(Protocol):
|
||||
class SupportsGetMesh(Protocol):
|
||||
"""
|
||||
An object that supports the ``getmesh`` method, taking an image as an
|
||||
argument, and returning a list of tuples. Each tuple contains two tuples,
|
||||
the source box as a tuple of 4 integers, and a tuple of 8 integers for the
|
||||
final quadrilateral, in order of top left, bottom left, bottom right, top
|
||||
right.
|
||||
"""
|
||||
|
||||
def getmesh(
|
||||
self, image: Image.Image
|
||||
) -> list[
|
||||
|
@ -421,7 +429,7 @@ class _SupportsGetMesh(Protocol):
|
|||
|
||||
def deform(
|
||||
image: Image.Image,
|
||||
deformer: _SupportsGetMesh,
|
||||
deformer: SupportsGetMesh,
|
||||
resample: int = Image.Resampling.BILINEAR,
|
||||
) -> Image.Image:
|
||||
"""
|
||||
|
|
|
@ -308,21 +308,16 @@ DEPS = {
|
|||
"libs": [r"Lib\MS\*.lib"],
|
||||
},
|
||||
"openjpeg": {
|
||||
"url": "https://github.com/uclouvain/openjpeg/archive/v2.5.0.tar.gz",
|
||||
"filename": "openjpeg-2.5.0.tar.gz",
|
||||
"dir": "openjpeg-2.5.0",
|
||||
"url": "https://github.com/uclouvain/openjpeg/archive/v2.5.2.tar.gz",
|
||||
"filename": "openjpeg-2.5.2.tar.gz",
|
||||
"dir": "openjpeg-2.5.2",
|
||||
"license": "LICENSE",
|
||||
"patch": {
|
||||
r"src\lib\openjp2\ht_dec.c": {
|
||||
"#ifdef OPJ_COMPILER_MSVC\n return (OPJ_UINT32)__popcnt(val);": "#if defined(OPJ_COMPILER_MSVC) && (defined(_M_IX86) || defined(_M_AMD64))\n return (OPJ_UINT32)__popcnt(val);", # noqa: E501
|
||||
}
|
||||
},
|
||||
"build": [
|
||||
*cmds_cmake(
|
||||
"openjp2", "-DBUILD_CODEC:BOOL=OFF", "-DBUILD_SHARED_LIBS:BOOL=OFF"
|
||||
),
|
||||
cmd_mkdir(r"{inc_dir}\openjpeg-2.5.0"),
|
||||
cmd_copy(r"src\lib\openjp2\*.h", r"{inc_dir}\openjpeg-2.5.0"),
|
||||
cmd_mkdir(r"{inc_dir}\openjpeg-2.5.2"),
|
||||
cmd_copy(r"src\lib\openjp2\*.h", r"{inc_dir}\openjpeg-2.5.2"),
|
||||
],
|
||||
"libs": [r"bin\*.lib"],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user