Skip to content

Commit bf11459

Browse files
committed
get ready for 3.0.0
1 parent e8f0085 commit bf11459

File tree

3 files changed

+135
-126
lines changed

3 files changed

+135
-126
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## Version 3.0.0 (release date TBD)
1+
## Version 3.0.0 (released 22 April 2025)
22

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

99
## Version 2.2.3 (released 28 April 2024)
1010

doc/vimage.rst

Lines changed: 68 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ Autogenerated methods
274274
~matrixinvert
275275
~matrixload
276276
~matrixload_source
277+
~matrixmultiply
277278
~matrixprint
278279
~matrixsave
279280
~matrixsave_target
@@ -2058,12 +2059,12 @@ Autogenerated methods
20582059
:rtype: Image or list[Image, Dict[str, mixed]]
20592060
:raises Error:
20602061

2061-
.. 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)
2062+
.. 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)
20622063

20632064
Save as gif.
20642065

20652066
Example:
2066-
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)
2067+
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)
20672068

20682069
:param filename: Filename to save to
20692070
:type filename: str
@@ -2081,6 +2082,8 @@ Autogenerated methods
20812082
:type interpalette_maxerror: float
20822083
:param interlace: Generate an interlaced (progressive) GIF
20832084
:type interlace: bool
2085+
:param keep_duplicate_frames: Keep duplicate frames in the output instead of combining them
2086+
:type keep_duplicate_frames: bool
20842087
:param keep: Which metadata to retain
20852088
:type keep: int
20862089
:param background: Background value
@@ -2092,12 +2095,12 @@ Autogenerated methods
20922095
:rtype: list[]
20932096
:raises Error:
20942097

2095-
.. 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)
2098+
.. 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)
20962099

20972100
Save as gif.
20982101

20992102
Example:
2100-
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)
2103+
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)
21012104

21022105
:param dither: Amount of dithering
21032106
:type dither: float
@@ -2113,6 +2116,8 @@ Autogenerated methods
21132116
:type interpalette_maxerror: float
21142117
:param interlace: Generate an interlaced (progressive) GIF
21152118
:type interlace: bool
2119+
:param keep_duplicate_frames: Keep duplicate frames in the output instead of combining them
2120+
:type keep_duplicate_frames: bool
21162121
:param keep: Which metadata to retain
21172122
:type keep: int
21182123
:param background: Background value
@@ -2124,12 +2129,12 @@ Autogenerated methods
21242129
:rtype: str
21252130
:raises Error:
21262131

2127-
.. 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)
2132+
.. 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)
21282133

21292134
Save as gif.
21302135

21312136
Example:
2132-
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)
2137+
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)
21332138

21342139
:param target: Target to save to
21352140
:type target: Target
@@ -2147,6 +2152,8 @@ Autogenerated methods
21472152
:type interpalette_maxerror: float
21482153
:param interlace: Generate an interlaced (progressive) GIF
21492154
:type interlace: bool
2155+
:param keep_duplicate_frames: Keep duplicate frames in the output instead of combining them
2156+
:type keep_duplicate_frames: bool
21502157
:param keep: Which metadata to retain
21512158
:type keep: int
21522159
:param background: Background value
@@ -2728,17 +2735,19 @@ Autogenerated methods
27282735
:rtype: Image
27292736
:raises Error:
27302737

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

27332740
Load JPEG2000 image.
27342741

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

27382745
:param filename: Filename to load from
27392746
:type filename: str
27402747
:param page: Load this page from the image
27412748
:type page: int
2749+
:param oneshot: Load images a frame at a time
2750+
:type oneshot: bool
27422751
:param memory: Force open via memory
27432752
:type memory: bool
27442753
:param access: Required access pattern for this file
@@ -2752,17 +2761,19 @@ Autogenerated methods
27522761
:rtype: Image or list[Image, Dict[str, mixed]]
27532762
:raises Error:
27542763

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

27572766
Load JPEG2000 image.
27582767

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

27622771
:param buffer: Buffer to load from
27632772
:type buffer: str
27642773
:param page: Load this page from the image
27652774
:type page: int
2775+
:param oneshot: Load images a frame at a time
2776+
:type oneshot: bool
27662777
:param memory: Force open via memory
27672778
:type memory: bool
27682779
:param access: Required access pattern for this file
@@ -2776,17 +2787,19 @@ Autogenerated methods
27762787
:rtype: Image or list[Image, Dict[str, mixed]]
27772788
:raises Error:
27782789

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

27812792
Load JPEG2000 image.
27822793

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

27862797
:param source: Source to load from
27872798
:type source: Source
27882799
:param page: Load this page from the image
27892800
:type page: int
2801+
:param oneshot: Load images a frame at a time
2802+
:type oneshot: bool
27902803
:param memory: Force open via memory
27912804
:type memory: bool
27922805
:param access: Required access pattern for this file
@@ -3874,7 +3887,7 @@ Autogenerated methods
38743887

38753888
.. method:: matrixinvert()
38763889

3877-
Invert an matrix.
3890+
Invert a matrix.
38783891

38793892
Example:
38803893
out = in.matrixinvert()
@@ -3926,6 +3939,18 @@ Autogenerated methods
39263939
:rtype: Image or list[Image, Dict[str, mixed]]
39273940
:raises Error:
39283941

3942+
.. method:: matrixmultiply(right)
3943+
3944+
Multiply two matrices.
3945+
3946+
Example:
3947+
out = left.matrixmultiply(right)
3948+
3949+
:param right: Second matrix to multiply
3950+
:type right: Image
3951+
:rtype: Image
3952+
:raises Error:
3953+
39293954
.. method:: matrixprint(keep=int, background=list[float], page_height=int, profile=str)
39303955

39313956
Print matrix.
@@ -5648,12 +5673,12 @@ Autogenerated methods
56485673
:rtype: Image
56495674
:raises Error:
56505675

5651-
.. staticmethod:: svgload(filename, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool)
5676+
.. 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)
56525677

56535678
Load SVG with rsvg.
56545679

56555680
Example:
5656-
out = pyvips.Image.svgload(filename, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool)
5681+
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)
56575682

56585683
:param filename: Filename to load from
56595684
:type filename: str
@@ -5663,6 +5688,8 @@ Autogenerated methods
56635688
:type scale: float
56645689
:param unlimited: Allow SVG of any size
56655690
:type unlimited: bool
5691+
:param stylesheet: Custom CSS
5692+
:type stylesheet: str
56665693
:param memory: Force open via memory
56675694
:type memory: bool
56685695
:param access: Required access pattern for this file
@@ -5676,12 +5703,12 @@ Autogenerated methods
56765703
:rtype: Image or list[Image, Dict[str, mixed]]
56775704
:raises Error:
56785705

5679-
.. 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)
5706+
.. 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)
56805707

56815708
Load SVG with rsvg.
56825709

56835710
Example:
5684-
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)
5711+
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)
56855712

56865713
:param buffer: Buffer to load from
56875714
:type buffer: str
@@ -5691,6 +5718,8 @@ Autogenerated methods
56915718
:type scale: float
56925719
:param unlimited: Allow SVG of any size
56935720
:type unlimited: bool
5721+
:param stylesheet: Custom CSS
5722+
:type stylesheet: str
56945723
:param memory: Force open via memory
56955724
:type memory: bool
56965725
:param access: Required access pattern for this file
@@ -5704,12 +5733,12 @@ Autogenerated methods
57045733
:rtype: Image or list[Image, Dict[str, mixed]]
57055734
:raises Error:
57065735

5707-
.. 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)
5736+
.. 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)
57085737

57095738
Load svg from source.
57105739

57115740
Example:
5712-
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)
5741+
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)
57135742

57145743
:param source: Source to load from
57155744
:type source: Source
@@ -5719,6 +5748,8 @@ Autogenerated methods
57195748
:type scale: float
57205749
:param unlimited: Allow SVG of any size
57215750
:type unlimited: bool
5751+
:param stylesheet: Custom CSS
5752+
:type stylesheet: str
57225753
:param memory: Force open via memory
57235754
:type memory: bool
57245755
:param access: Required access pattern for this file
@@ -5930,23 +5961,25 @@ Autogenerated methods
59305961
:rtype: Image
59315962
:raises Error:
59325963

5933-
.. 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)
5964+
.. 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)
59345965

59355966
Load tiff from file.
59365967

59375968
Example:
5938-
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)
5969+
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)
59395970

59405971
:param filename: Filename to load from
59415972
:type filename: str
59425973
:param page: First page to load
59435974
:type page: int
5944-
:param subifd: Subifd index
5945-
:type subifd: int
59465975
:param n: Number of pages to load, -1 for all
59475976
:type n: int
59485977
:param autorotate: Rotate image using orientation tag
59495978
:type autorotate: bool
5979+
:param subifd: Subifd index
5980+
:type subifd: int
5981+
:param unlimited: Remove all denial of service limits
5982+
:type unlimited: bool
59505983
:param memory: Force open via memory
59515984
:type memory: bool
59525985
:param access: Required access pattern for this file
@@ -5960,23 +5993,25 @@ Autogenerated methods
59605993
:rtype: Image or list[Image, Dict[str, mixed]]
59615994
:raises Error:
59625995

5963-
.. 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)
5996+
.. 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)
59645997

59655998
Load tiff from buffer.
59665999

59676000
Example:
5968-
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)
6001+
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)
59696002

59706003
:param buffer: Buffer to load from
59716004
:type buffer: str
59726005
:param page: First page to load
59736006
:type page: int
5974-
:param subifd: Subifd index
5975-
:type subifd: int
59766007
:param n: Number of pages to load, -1 for all
59776008
:type n: int
59786009
:param autorotate: Rotate image using orientation tag
59796010
:type autorotate: bool
6011+
:param subifd: Subifd index
6012+
:type subifd: int
6013+
:param unlimited: Remove all denial of service limits
6014+
:type unlimited: bool
59806015
:param memory: Force open via memory
59816016
:type memory: bool
59826017
:param access: Required access pattern for this file
@@ -5990,23 +6025,25 @@ Autogenerated methods
59906025
:rtype: Image or list[Image, Dict[str, mixed]]
59916026
:raises Error:
59926027

5993-
.. 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)
6028+
.. 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)
59946029

59956030
Load tiff from source.
59966031

59976032
Example:
5998-
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)
6033+
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)
59996034

60006035
:param source: Source to load from
60016036
:type source: Source
60026037
:param page: First page to load
60036038
:type page: int
6004-
:param subifd: Subifd index
6005-
:type subifd: int
60066039
:param n: Number of pages to load, -1 for all
60076040
:type n: int
60086041
:param autorotate: Rotate image using orientation tag
60096042
:type autorotate: bool
6043+
:param subifd: Subifd index
6044+
:type subifd: int
6045+
:param unlimited: Remove all denial of service limits
6046+
:type unlimited: bool
60106047
:param memory: Force open via memory
60116048
:type memory: bool
60126049
:param access: Required access pattern for this file

0 commit comments

Comments
 (0)