Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Version 3.0.0 (release date TBD)
## Version 3.0.0 (released 22 April 2025)

- drop support for Python 2.7, require Python >= 3.7 [kleisauke]
- migrate to `pyproject.toml` [kleisauke]
- fix a small memleak in `write_to_buffer()` [kleisauke]
- add `[binary]` install option [kleisauke]
- add `shutdown()`
- add `shutdown()` [jcupitt]

## Version 2.2.3 (released 28 April 2024)

Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ Local user install:
.. code-block:: shell

$ pip install -e .[binary]
$ pypy -m pip --user -e .

Run all tests:

Expand Down
99 changes: 68 additions & 31 deletions doc/vimage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ Autogenerated methods
~matrixinvert
~matrixload
~matrixload_source
~matrixmultiply
~matrixprint
~matrixsave
~matrixsave_target
Expand Down Expand Up @@ -2058,12 +2059,12 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. method:: gifsave(filename, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int, profile=str)
.. method:: gifsave(filename, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep_duplicate_frames=bool, keep=int, background=list[float], page_height=int, profile=str)

Save as gif.

Example:
in.gifsave(filename, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int, profile=str)
in.gifsave(filename, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep_duplicate_frames=bool, keep=int, background=list[float], page_height=int, profile=str)

:param filename: Filename to save to
:type filename: str
Expand All @@ -2081,6 +2082,8 @@ Autogenerated methods
:type interpalette_maxerror: float
:param interlace: Generate an interlaced (progressive) GIF
:type interlace: bool
:param keep_duplicate_frames: Keep duplicate frames in the output instead of combining them
:type keep_duplicate_frames: bool
:param keep: Which metadata to retain
:type keep: int
:param background: Background value
Expand All @@ -2092,12 +2095,12 @@ Autogenerated methods
:rtype: list[]
:raises Error:

.. method:: gifsave_buffer(dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int, profile=str)
.. method:: gifsave_buffer(dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep_duplicate_frames=bool, keep=int, background=list[float], page_height=int, profile=str)

Save as gif.

Example:
buffer = in.gifsave_buffer(dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int, profile=str)
buffer = in.gifsave_buffer(dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep_duplicate_frames=bool, keep=int, background=list[float], page_height=int, profile=str)

:param dither: Amount of dithering
:type dither: float
Expand All @@ -2113,6 +2116,8 @@ Autogenerated methods
:type interpalette_maxerror: float
:param interlace: Generate an interlaced (progressive) GIF
:type interlace: bool
:param keep_duplicate_frames: Keep duplicate frames in the output instead of combining them
:type keep_duplicate_frames: bool
:param keep: Which metadata to retain
:type keep: int
:param background: Background value
Expand All @@ -2124,12 +2129,12 @@ Autogenerated methods
:rtype: str
:raises Error:

.. method:: gifsave_target(target, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int, profile=str)
.. method:: gifsave_target(target, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep_duplicate_frames=bool, keep=int, background=list[float], page_height=int, profile=str)

Save as gif.

Example:
in.gifsave_target(target, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int, profile=str)
in.gifsave_target(target, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep_duplicate_frames=bool, keep=int, background=list[float], page_height=int, profile=str)

:param target: Target to save to
:type target: Target
Expand All @@ -2147,6 +2152,8 @@ Autogenerated methods
:type interpalette_maxerror: float
:param interlace: Generate an interlaced (progressive) GIF
:type interlace: bool
:param keep_duplicate_frames: Keep duplicate frames in the output instead of combining them
:type keep_duplicate_frames: bool
:param keep: Which metadata to retain
:type keep: int
:param background: Background value
Expand Down Expand Up @@ -2728,17 +2735,19 @@ Autogenerated methods
:rtype: Image
:raises Error:

.. staticmethod:: jp2kload(filename, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: jp2kload(filename, page=int, oneshot=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load JPEG2000 image.

Example:
out = pyvips.Image.jp2kload(filename, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.jp2kload(filename, page=int, oneshot=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param filename: Filename to load from
:type filename: str
:param page: Load this page from the image
:type page: int
:param oneshot: Load images a frame at a time
:type oneshot: bool
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand All @@ -2752,17 +2761,19 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. staticmethod:: jp2kload_buffer(buffer, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: jp2kload_buffer(buffer, page=int, oneshot=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load JPEG2000 image.

Example:
out = pyvips.Image.jp2kload_buffer(buffer, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.jp2kload_buffer(buffer, page=int, oneshot=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param buffer: Buffer to load from
:type buffer: str
:param page: Load this page from the image
:type page: int
:param oneshot: Load images a frame at a time
:type oneshot: bool
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand All @@ -2776,17 +2787,19 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. staticmethod:: jp2kload_source(source, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: jp2kload_source(source, page=int, oneshot=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load JPEG2000 image.

Example:
out = pyvips.Image.jp2kload_source(source, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.jp2kload_source(source, page=int, oneshot=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param source: Source to load from
:type source: Source
:param page: Load this page from the image
:type page: int
:param oneshot: Load images a frame at a time
:type oneshot: bool
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand Down Expand Up @@ -3874,7 +3887,7 @@ Autogenerated methods

.. method:: matrixinvert()

Invert an matrix.
Invert a matrix.

Example:
out = in.matrixinvert()
Expand Down Expand Up @@ -3926,6 +3939,18 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. method:: matrixmultiply(right)

Multiply two matrices.

Example:
out = left.matrixmultiply(right)

:param right: Second matrix to multiply
:type right: Image
:rtype: Image
:raises Error:

.. method:: matrixprint(keep=int, background=list[float], page_height=int, profile=str)

Print matrix.
Expand Down Expand Up @@ -5648,12 +5673,12 @@ Autogenerated methods
:rtype: Image
:raises Error:

.. staticmethod:: svgload(filename, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: svgload(filename, dpi=float, scale=float, unlimited=bool, stylesheet=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load SVG with rsvg.

Example:
out = pyvips.Image.svgload(filename, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.svgload(filename, dpi=float, scale=float, unlimited=bool, stylesheet=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param filename: Filename to load from
:type filename: str
Expand All @@ -5663,6 +5688,8 @@ Autogenerated methods
:type scale: float
:param unlimited: Allow SVG of any size
:type unlimited: bool
:param stylesheet: Custom CSS
:type stylesheet: str
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand All @@ -5676,12 +5703,12 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. staticmethod:: svgload_buffer(buffer, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: svgload_buffer(buffer, dpi=float, scale=float, unlimited=bool, stylesheet=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load SVG with rsvg.

Example:
out = pyvips.Image.svgload_buffer(buffer, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.svgload_buffer(buffer, dpi=float, scale=float, unlimited=bool, stylesheet=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param buffer: Buffer to load from
:type buffer: str
Expand All @@ -5691,6 +5718,8 @@ Autogenerated methods
:type scale: float
:param unlimited: Allow SVG of any size
:type unlimited: bool
:param stylesheet: Custom CSS
:type stylesheet: str
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand All @@ -5704,12 +5733,12 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. staticmethod:: svgload_source(source, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: svgload_source(source, dpi=float, scale=float, unlimited=bool, stylesheet=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load svg from source.

Example:
out = pyvips.Image.svgload_source(source, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.svgload_source(source, dpi=float, scale=float, unlimited=bool, stylesheet=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param source: Source to load from
:type source: Source
Expand All @@ -5719,6 +5748,8 @@ Autogenerated methods
:type scale: float
:param unlimited: Allow SVG of any size
:type unlimited: bool
:param stylesheet: Custom CSS
:type stylesheet: str
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand Down Expand Up @@ -5930,23 +5961,25 @@ Autogenerated methods
:rtype: Image
:raises Error:

.. staticmethod:: tiffload(filename, page=int, subifd=int, n=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: tiffload(filename, page=int, n=int, autorotate=bool, subifd=int, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load tiff from file.

Example:
out = pyvips.Image.tiffload(filename, page=int, subifd=int, n=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.tiffload(filename, page=int, n=int, autorotate=bool, subifd=int, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param filename: Filename to load from
:type filename: str
:param page: First page to load
:type page: int
:param subifd: Subifd index
:type subifd: int
:param n: Number of pages to load, -1 for all
:type n: int
:param autorotate: Rotate image using orientation tag
:type autorotate: bool
:param subifd: Subifd index
:type subifd: int
:param unlimited: Remove all denial of service limits
:type unlimited: bool
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand All @@ -5960,23 +5993,25 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. staticmethod:: tiffload_buffer(buffer, page=int, subifd=int, n=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: tiffload_buffer(buffer, page=int, n=int, autorotate=bool, subifd=int, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load tiff from buffer.

Example:
out = pyvips.Image.tiffload_buffer(buffer, page=int, subifd=int, n=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.tiffload_buffer(buffer, page=int, n=int, autorotate=bool, subifd=int, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param buffer: Buffer to load from
:type buffer: str
:param page: First page to load
:type page: int
:param subifd: Subifd index
:type subifd: int
:param n: Number of pages to load, -1 for all
:type n: int
:param autorotate: Rotate image using orientation tag
:type autorotate: bool
:param subifd: Subifd index
:type subifd: int
:param unlimited: Remove all denial of service limits
:type unlimited: bool
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand All @@ -5990,23 +6025,25 @@ Autogenerated methods
:rtype: Image or list[Image, Dict[str, mixed]]
:raises Error:

.. staticmethod:: tiffload_source(source, page=int, subifd=int, n=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
.. staticmethod:: tiffload_source(source, page=int, n=int, autorotate=bool, subifd=int, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)

Load tiff from source.

Example:
out = pyvips.Image.tiffload_source(source, page=int, subifd=int, n=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
out = pyvips.Image.tiffload_source(source, page=int, n=int, autorotate=bool, subifd=int, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)

:param source: Source to load from
:type source: Source
:param page: First page to load
:type page: int
:param subifd: Subifd index
:type subifd: int
:param n: Number of pages to load, -1 for all
:type n: int
:param autorotate: Rotate image using orientation tag
:type autorotate: bool
:param subifd: Subifd index
:type subifd: int
:param unlimited: Remove all denial of service limits
:type unlimited: bool
:param memory: Force open via memory
:type memory: bool
:param access: Required access pattern for this file
Expand Down
Loading
Loading