diff --git a/doc/vimage.rst b/doc/vimage.rst index c1af9ae..3fb491c 100644 --- a/doc/vimage.rst +++ b/doc/vimage.rst @@ -308,6 +308,7 @@ Autogenerated methods ~ppmsave ~ppmsave_target ~premultiply + ~prewitt ~profile ~profile_load ~project @@ -342,6 +343,7 @@ Autogenerated methods ~scRGB2BW ~scRGB2XYZ ~scRGB2sRGB + ~scharr ~sequential ~sharpen ~shrink @@ -388,6 +390,7 @@ Autogenerated methods ~webpload_source ~webpsave ~webpsave_buffer + ~webpsave_mime ~webpsave_target ~worley ~wrap @@ -642,12 +645,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: analyzeload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: analyzeload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load an Analyze6 image. Example: - out = pyvips.Image.analyzeload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.analyzeload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -657,6 +660,8 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] @@ -1096,7 +1101,7 @@ Autogenerated methods .. method:: convsep(mask, precision=Union[str, Precision], layers=int, cluster=int) - Seperable convolution operation. + Separable convolution operation. Example: out = in.convsep(mask, precision=Union[str, Precision], layers=int, cluster=int) @@ -1172,12 +1177,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: csvload(filename, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: csvload(filename, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load csv. Example: - out = pyvips.Image.csvload(filename, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.csvload(filename, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -1195,17 +1200,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: csvload_source(source, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: csvload_source(source, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load csv. Example: - out = pyvips.Image.csvload_source(source, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.csvload_source(source, skip=int, lines=int, whitespace=str, separator=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -1223,24 +1230,28 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: csvsave(filename, separator=str, strip=bool, background=list[float], page_height=int) + .. method:: csvsave(filename, profile=str, separator=str, keep=int, background=list[float], page_height=int) Save image to csv. Example: - in.csvsave(filename, separator=str, strip=bool, background=list[float], page_height=int) + in.csvsave(filename, profile=str, separator=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str + :param profile: Filename of ICC profile to embed + :type profile: str :param separator: Separator characters :type separator: str - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -1248,19 +1259,21 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: csvsave_target(target, separator=str, strip=bool, background=list[float], page_height=int) + .. method:: csvsave_target(target, profile=str, separator=str, keep=int, background=list[float], page_height=int) Save image to csv. Example: - in.csvsave_target(target, separator=str, strip=bool, background=list[float], page_height=int) + in.csvsave_target(target, profile=str, separator=str, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target + :param profile: Filename of ICC profile to embed + :type profile: str :param separator: Separator characters :type separator: str - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -1470,17 +1483,17 @@ Autogenerated methods :rtype: Image :raises Error: - .. method:: dzsave(filename, basename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, no_strip=bool, id=str, strip=bool, background=list[float], page_height=int) + .. method:: dzsave(filename, imagename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, profile=str, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, id=str, Q=int, keep=int, background=list[float], page_height=int) Save image to deepzoom file. Example: - in.dzsave(filename, basename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, no_strip=bool, id=str, strip=bool, background=list[float], page_height=int) + in.dzsave(filename, imagename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, profile=str, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, id=str, Q=int, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param basename: Base name to save to - :type basename: str + :param imagename: Image name + :type imagename: str :param layout: Directory layout :type layout: Union[str, ForeignDzLayout] :param suffix: Filename suffix for tiles @@ -1489,6 +1502,8 @@ Autogenerated methods :type overlap: int :param tile_size: Tile size in pixels :type tile_size: int + :param profile: Filename of ICC profile to embed + :type profile: str :param centre: Center image in tile :type centre: bool :param depth: Pyramid depth @@ -1503,12 +1518,12 @@ Autogenerated methods :type region_shrink: Union[str, RegionShrink] :param skip_blanks: Skip tiles which are nearly equal to the background :type skip_blanks: int - :param no_strip: Don't strip tile metadata - :type no_strip: bool :param id: Resource ID :type id: str - :param strip: Strip all metadata from image - :type strip: bool + :param Q: Q factor + :type Q: int + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -1516,15 +1531,15 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: dzsave_buffer(basename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, no_strip=bool, id=str, strip=bool, background=list[float], page_height=int) + .. method:: dzsave_buffer(imagename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, profile=str, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, id=str, Q=int, keep=int, background=list[float], page_height=int) Save image to dz buffer. Example: - buffer = in.dzsave_buffer(basename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, no_strip=bool, id=str, strip=bool, background=list[float], page_height=int) + buffer = in.dzsave_buffer(imagename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, profile=str, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, id=str, Q=int, keep=int, background=list[float], page_height=int) - :param basename: Base name to save to - :type basename: str + :param imagename: Image name + :type imagename: str :param layout: Directory layout :type layout: Union[str, ForeignDzLayout] :param suffix: Filename suffix for tiles @@ -1533,6 +1548,8 @@ Autogenerated methods :type overlap: int :param tile_size: Tile size in pixels :type tile_size: int + :param profile: Filename of ICC profile to embed + :type profile: str :param centre: Center image in tile :type centre: bool :param depth: Pyramid depth @@ -1547,12 +1564,12 @@ Autogenerated methods :type region_shrink: Union[str, RegionShrink] :param skip_blanks: Skip tiles which are nearly equal to the background :type skip_blanks: int - :param no_strip: Don't strip tile metadata - :type no_strip: bool :param id: Resource ID :type id: str - :param strip: Strip all metadata from image - :type strip: bool + :param Q: Q factor + :type Q: int + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -1560,17 +1577,17 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: dzsave_target(target, basename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, no_strip=bool, id=str, strip=bool, background=list[float], page_height=int) + .. method:: dzsave_target(target, imagename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, profile=str, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, id=str, Q=int, keep=int, background=list[float], page_height=int) Save image to deepzoom target. Example: - in.dzsave_target(target, basename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, no_strip=bool, id=str, strip=bool, background=list[float], page_height=int) + in.dzsave_target(target, imagename=str, layout=Union[str, ForeignDzLayout], suffix=str, overlap=int, tile_size=int, profile=str, centre=bool, depth=Union[str, ForeignDzDepth], angle=Union[str, Angle], container=Union[str, ForeignDzContainer], compression=int, region_shrink=Union[str, RegionShrink], skip_blanks=int, id=str, Q=int, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target - :param basename: Base name to save to - :type basename: str + :param imagename: Image name + :type imagename: str :param layout: Directory layout :type layout: Union[str, ForeignDzLayout] :param suffix: Filename suffix for tiles @@ -1579,6 +1596,8 @@ Autogenerated methods :type overlap: int :param tile_size: Tile size in pixels :type tile_size: int + :param profile: Filename of ICC profile to embed + :type profile: str :param centre: Center image in tile :type centre: bool :param depth: Pyramid depth @@ -1593,12 +1612,12 @@ Autogenerated methods :type region_shrink: Union[str, RegionShrink] :param skip_blanks: Skip tiles which are nearly equal to the background :type skip_blanks: int - :param no_strip: Don't strip tile metadata - :type no_strip: bool :param id: Resource ID :type id: str - :param strip: Strip all metadata from image - :type strip: bool + :param Q: Q factor + :type Q: int + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -1712,26 +1731,28 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: find_trim(threshold=float, background=list[float]) + .. method:: find_trim(threshold=float, background=list[float], line_art=bool) Search an image for non-edge areas. Example: - left, top, width, height = in.find_trim(threshold=float, background=list[float]) + left, top, width, height = in.find_trim(threshold=float, background=list[float], line_art=bool) :param threshold: Object threshold :type threshold: float :param background: Color for background pixels :type background: list[float] + :param line_art: Enable line art mode + :type line_art: bool :rtype: list[int, int, int, int] :raises Error: - .. staticmethod:: fitsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: fitsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load a FITS image. Example: - out = pyvips.Image.fitsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.fitsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -1741,17 +1762,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: fitsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: fitsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load FITS from a source. Example: - out = pyvips.Image.fitsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.fitsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -1761,22 +1784,26 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: fitssave(filename, strip=bool, background=list[float], page_height=int) + .. method:: fitssave(filename, profile=str, keep=int, background=list[float], page_height=int) Save image to fits file. Example: - in.fitssave(filename, strip=bool, background=list[float], page_height=int) + in.fitssave(filename, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -1938,18 +1965,18 @@ Autogenerated methods :rtype: list[float] :raises Error: - .. staticmethod:: gifload(filename, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: gifload(filename, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load GIF with libnsgif. Example: - out = pyvips.Image.gifload(filename, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.gifload(filename, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param page: Load this page from the file + :param page: First page to load :type page: int :param memory: Force open via memory :type memory: bool @@ -1957,23 +1984,25 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: gifload_buffer(buffer, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: gifload_buffer(buffer, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load GIF with libnsgif. Example: - out = pyvips.Image.gifload_buffer(buffer, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.gifload_buffer(buffer, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param page: Load this page from the file + :param page: First page to load :type page: int :param memory: Force open via memory :type memory: bool @@ -1981,23 +2010,25 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: gifload_source(source, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: gifload_source(source, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load gif from source. Example: - out = pyvips.Image.gifload_source(source, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.gifload_source(source, n=int, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param page: Load this page from the file + :param page: First page to load :type page: int :param memory: Force open via memory :type memory: bool @@ -2005,17 +2036,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: gifsave(filename, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reoptimise=bool, interpalette_maxerror=float, strip=bool, background=list[float], page_height=int) + .. method:: gifsave(filename, dither=float, effort=int, profile=str, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int) Save as gif. Example: - in.gifsave(filename, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reoptimise=bool, interpalette_maxerror=float, strip=bool, background=list[float], page_height=int) + in.gifsave(filename, dither=float, effort=int, profile=str, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -2023,16 +2056,20 @@ Autogenerated methods :type dither: float :param effort: Quantisation effort :type effort: int + :param profile: Filename of ICC profile to embed + :type profile: str :param bitdepth: Number of bits per pixel :type bitdepth: int :param interframe_maxerror: Maximum inter-frame error for transparency :type interframe_maxerror: float - :param reoptimise: Reoptimise colour palettes - :type reoptimise: bool + :param reuse: Reuse palette from input + :type reuse: bool :param interpalette_maxerror: Maximum inter-palette error for palette reusage :type interpalette_maxerror: float - :param strip: Strip all metadata from image - :type strip: bool + :param interlace: Generate an interlaced (progressive) GIF + :type interlace: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2040,27 +2077,31 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: gifsave_buffer(dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reoptimise=bool, interpalette_maxerror=float, strip=bool, background=list[float], page_height=int) + .. method:: gifsave_buffer(dither=float, effort=int, profile=str, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int) Save as gif. Example: - buffer = in.gifsave_buffer(dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reoptimise=bool, interpalette_maxerror=float, strip=bool, background=list[float], page_height=int) + buffer = in.gifsave_buffer(dither=float, effort=int, profile=str, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int) :param dither: Amount of dithering :type dither: float :param effort: Quantisation effort :type effort: int + :param profile: Filename of ICC profile to embed + :type profile: str :param bitdepth: Number of bits per pixel :type bitdepth: int :param interframe_maxerror: Maximum inter-frame error for transparency :type interframe_maxerror: float - :param reoptimise: Reoptimise colour palettes - :type reoptimise: bool + :param reuse: Reuse palette from input + :type reuse: bool :param interpalette_maxerror: Maximum inter-palette error for palette reusage :type interpalette_maxerror: float - :param strip: Strip all metadata from image - :type strip: bool + :param interlace: Generate an interlaced (progressive) GIF + :type interlace: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2068,12 +2109,12 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: gifsave_target(target, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reoptimise=bool, interpalette_maxerror=float, strip=bool, background=list[float], page_height=int) + .. method:: gifsave_target(target, dither=float, effort=int, profile=str, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int) Save as gif. Example: - in.gifsave_target(target, dither=float, effort=int, bitdepth=int, interframe_maxerror=float, reoptimise=bool, interpalette_maxerror=float, strip=bool, background=list[float], page_height=int) + in.gifsave_target(target, dither=float, effort=int, profile=str, bitdepth=int, interframe_maxerror=float, reuse=bool, interpalette_maxerror=float, interlace=bool, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -2081,16 +2122,20 @@ Autogenerated methods :type dither: float :param effort: Quantisation effort :type effort: int + :param profile: Filename of ICC profile to embed + :type profile: str :param bitdepth: Number of bits per pixel :type bitdepth: int :param interframe_maxerror: Maximum inter-frame error for transparency :type interframe_maxerror: float - :param reoptimise: Reoptimise colour palettes - :type reoptimise: bool + :param reuse: Reuse palette from input + :type reuse: bool :param interpalette_maxerror: Maximum inter-palette error for palette reusage :type interpalette_maxerror: float - :param strip: Strip all metadata from image - :type strip: bool + :param interlace: Generate an interlaced (progressive) GIF + :type interlace: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2164,18 +2209,18 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: heifload(filename, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: heifload(filename, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load a HEIF image. Example: - out = pyvips.Image.heifload(filename, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.heifload(filename, page=int, n=int, thumbnail=bool, 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: Load this page from the file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param thumbnail: Fetch thumbnail image :type thumbnail: bool @@ -2187,23 +2232,25 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: heifload_buffer(buffer, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: heifload_buffer(buffer, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load a HEIF image. Example: - out = pyvips.Image.heifload_buffer(buffer, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.heifload_buffer(buffer, page=int, n=int, thumbnail=bool, 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: Load this page from the file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param thumbnail: Fetch thumbnail image :type thumbnail: bool @@ -2215,23 +2262,25 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: heifload_source(source, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: heifload_source(source, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load a HEIF image. Example: - out = pyvips.Image.heifload_source(source, page=int, n=int, thumbnail=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.heifload_source(source, page=int, n=int, thumbnail=bool, 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: Load this page from the file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param thumbnail: Fetch thumbnail image :type thumbnail: bool @@ -2243,17 +2292,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: heifsave(filename, Q=int, bitdepth=int, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + .. method:: heifsave(filename, Q=int, bitdepth=int, profile=str, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], encoder=Union[str, ForeignHeifEncoder], keep=int, background=list[float], page_height=int) Save image in HEIF format. Example: - in.heifsave(filename, Q=int, bitdepth=int, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + in.heifsave(filename, Q=int, bitdepth=int, profile=str, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], encoder=Union[str, ForeignHeifEncoder], keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -2261,6 +2312,8 @@ Autogenerated methods :type Q: int :param bitdepth: Number of bits per pixel :type bitdepth: int + :param profile: Filename of ICC profile to embed + :type profile: str :param lossless: Enable lossless compression :type lossless: bool :param compression: Compression format @@ -2269,8 +2322,10 @@ Autogenerated methods :type effort: int :param subsample_mode: Select chroma subsample operation mode :type subsample_mode: Union[str, ForeignSubsample] - :param strip: Strip all metadata from image - :type strip: bool + :param encoder: Select encoder to use + :type encoder: Union[str, ForeignHeifEncoder] + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2278,17 +2333,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: heifsave_buffer(Q=int, bitdepth=int, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + .. method:: heifsave_buffer(Q=int, bitdepth=int, profile=str, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], encoder=Union[str, ForeignHeifEncoder], keep=int, background=list[float], page_height=int) Save image in HEIF format. Example: - buffer = in.heifsave_buffer(Q=int, bitdepth=int, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + buffer = in.heifsave_buffer(Q=int, bitdepth=int, profile=str, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], encoder=Union[str, ForeignHeifEncoder], keep=int, background=list[float], page_height=int) :param Q: Q factor :type Q: int :param bitdepth: Number of bits per pixel :type bitdepth: int + :param profile: Filename of ICC profile to embed + :type profile: str :param lossless: Enable lossless compression :type lossless: bool :param compression: Compression format @@ -2297,8 +2354,10 @@ Autogenerated methods :type effort: int :param subsample_mode: Select chroma subsample operation mode :type subsample_mode: Union[str, ForeignSubsample] - :param strip: Strip all metadata from image - :type strip: bool + :param encoder: Select encoder to use + :type encoder: Union[str, ForeignHeifEncoder] + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2306,12 +2365,12 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: heifsave_target(target, Q=int, bitdepth=int, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + .. method:: heifsave_target(target, Q=int, bitdepth=int, profile=str, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], encoder=Union[str, ForeignHeifEncoder], keep=int, background=list[float], page_height=int) Save image in HEIF format. Example: - in.heifsave_target(target, Q=int, bitdepth=int, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + in.heifsave_target(target, Q=int, bitdepth=int, profile=str, lossless=bool, compression=Union[str, ForeignHeifCompression], effort=int, subsample_mode=Union[str, ForeignSubsample], encoder=Union[str, ForeignHeifEncoder], keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -2319,6 +2378,8 @@ Autogenerated methods :type Q: int :param bitdepth: Number of bits per pixel :type bitdepth: int + :param profile: Filename of ICC profile to embed + :type profile: str :param lossless: Enable lossless compression :type lossless: bool :param compression: Compression format @@ -2327,8 +2388,10 @@ Autogenerated methods :type effort: int :param subsample_mode: Select chroma subsample operation mode :type subsample_mode: Union[str, ForeignSubsample] - :param strip: Strip all metadata from image - :type strip: bool + :param encoder: Select encoder to use + :type encoder: Union[str, ForeignHeifEncoder] + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2650,12 +2713,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: jp2kload(filename, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jp2kload(filename, page=int, 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]) + out = pyvips.Image.jp2kload(filename, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -2667,17 +2730,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :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], flags=bool) + .. staticmethod:: jp2kload_buffer(buffer, page=int, 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]) + out = pyvips.Image.jp2kload_buffer(buffer, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str @@ -2689,17 +2754,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :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], flags=bool) + .. staticmethod:: jp2kload_source(source, page=int, 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]) + out = pyvips.Image.jp2kload_source(source, page=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -2711,22 +2778,26 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: jp2ksave(filename, tile_width=int, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + .. method:: jp2ksave(filename, tile_width=int, profile=str, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], keep=int, background=list[float], page_height=int) Save image in JPEG2000 format. Example: - in.jp2ksave(filename, tile_width=int, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + in.jp2ksave(filename, tile_width=int, profile=str, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], keep=int, background=list[float], page_height=int) :param filename: Filename to load from :type filename: str :param tile_width: Tile width in pixels :type tile_width: int + :param profile: Filename of ICC profile to embed + :type profile: str :param tile_height: Tile height in pixels :type tile_height: int :param lossless: Enable lossless compression @@ -2735,8 +2806,8 @@ Autogenerated methods :type Q: int :param subsample_mode: Select chroma subsample operation mode :type subsample_mode: Union[str, ForeignSubsample] - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2744,15 +2815,17 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: jp2ksave_buffer(tile_width=int, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + .. method:: jp2ksave_buffer(tile_width=int, profile=str, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], keep=int, background=list[float], page_height=int) Save image in JPEG2000 format. Example: - buffer = in.jp2ksave_buffer(tile_width=int, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + buffer = in.jp2ksave_buffer(tile_width=int, profile=str, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], keep=int, background=list[float], page_height=int) :param tile_width: Tile width in pixels :type tile_width: int + :param profile: Filename of ICC profile to embed + :type profile: str :param tile_height: Tile height in pixels :type tile_height: int :param lossless: Enable lossless compression @@ -2761,8 +2834,8 @@ Autogenerated methods :type Q: int :param subsample_mode: Select chroma subsample operation mode :type subsample_mode: Union[str, ForeignSubsample] - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2770,17 +2843,19 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: jp2ksave_target(target, tile_width=int, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + .. method:: jp2ksave_target(target, tile_width=int, profile=str, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], keep=int, background=list[float], page_height=int) Save image in JPEG2000 format. Example: - in.jp2ksave_target(target, tile_width=int, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], strip=bool, background=list[float], page_height=int) + in.jp2ksave_target(target, tile_width=int, profile=str, tile_height=int, lossless=bool, Q=int, subsample_mode=Union[str, ForeignSubsample], keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target :param tile_width: Tile width in pixels :type tile_width: int + :param profile: Filename of ICC profile to embed + :type profile: str :param tile_height: Tile height in pixels :type tile_height: int :param lossless: Enable lossless compression @@ -2789,8 +2864,8 @@ Autogenerated methods :type Q: int :param subsample_mode: Select chroma subsample operation mode :type subsample_mode: Union[str, ForeignSubsample] - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2798,12 +2873,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. staticmethod:: jpegload(filename, shrink=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jpegload(filename, shrink=int, autorotate=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load jpeg from file. Example: - out = pyvips.Image.jpegload(filename, shrink=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.jpegload(filename, shrink=int, autorotate=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -2811,23 +2886,27 @@ Autogenerated methods :type shrink: int :param autorotate: Rotate image using exif orientation :type autorotate: bool + :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 :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: jpegload_buffer(buffer, shrink=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jpegload_buffer(buffer, shrink=int, autorotate=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load jpeg from buffer. Example: - out = pyvips.Image.jpegload_buffer(buffer, shrink=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.jpegload_buffer(buffer, shrink=int, autorotate=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str @@ -2835,23 +2914,27 @@ Autogenerated methods :type shrink: int :param autorotate: Rotate image using exif orientation :type autorotate: bool + :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 :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: jpegload_source(source, shrink=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jpegload_source(source, shrink=int, autorotate=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load image from jpeg source. Example: - out = pyvips.Image.jpegload_source(source, shrink=int, autorotate=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.jpegload_source(source, shrink=int, autorotate=bool, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -2859,29 +2942,33 @@ Autogenerated methods :type shrink: int :param autorotate: Rotate image using exif orientation :type autorotate: bool + :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 :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: jpegsave(filename, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + .. method:: jpegsave(filename, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) Save image to jpeg file. Example: - in.jpegsave(filename, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + in.jpegsave(filename, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str :param Q: Q factor :type Q: int - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str :param optimize_coding: Compute optimal Huffman coding tables :type optimize_coding: bool @@ -2899,8 +2986,8 @@ Autogenerated methods :type subsample_mode: Union[str, ForeignSubsample] :param restart_interval: Add restart markers every specified number of mcu :type restart_interval: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2908,16 +2995,16 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: jpegsave_buffer(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + .. method:: jpegsave_buffer(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) Save image to jpeg buffer. Example: - buffer = in.jpegsave_buffer(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + buffer = in.jpegsave_buffer(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) :param Q: Q factor :type Q: int - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str :param optimize_coding: Compute optimal Huffman coding tables :type optimize_coding: bool @@ -2935,8 +3022,8 @@ Autogenerated methods :type subsample_mode: Union[str, ForeignSubsample] :param restart_interval: Add restart markers every specified number of mcu :type restart_interval: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2944,16 +3031,16 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: jpegsave_mime(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + .. method:: jpegsave_mime(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) Save image to jpeg mime. Example: - in.jpegsave_mime(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + in.jpegsave_mime(Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) :param Q: Q factor :type Q: int - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str :param optimize_coding: Compute optimal Huffman coding tables :type optimize_coding: bool @@ -2971,8 +3058,8 @@ Autogenerated methods :type subsample_mode: Union[str, ForeignSubsample] :param restart_interval: Add restart markers every specified number of mcu :type restart_interval: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -2980,18 +3067,18 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: jpegsave_target(target, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + .. method:: jpegsave_target(target, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) Save image to jpeg target. Example: - in.jpegsave_target(target, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, strip=bool, background=list[float], page_height=int) + in.jpegsave_target(target, Q=int, profile=str, optimize_coding=bool, interlace=bool, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, subsample_mode=Union[str, ForeignSubsample], restart_interval=int, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target :param Q: Q factor :type Q: int - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str :param optimize_coding: Compute optimal Huffman coding tables :type optimize_coding: bool @@ -3009,8 +3096,8 @@ Autogenerated methods :type subsample_mode: Union[str, ForeignSubsample] :param restart_interval: Add restart markers every specified number of mcu :type restart_interval: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3018,12 +3105,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. staticmethod:: jxlload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jxlload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load JPEG-XL image. Example: - out = pyvips.Image.jxlload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.jxlload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -3033,17 +3120,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: jxlload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jxlload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load JPEG-XL image. Example: - out = pyvips.Image.jxlload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.jxlload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str @@ -3053,17 +3142,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: jxlload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: jxlload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load JPEG-XL image. Example: - out = pyvips.Image.jxlload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.jxlload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -3073,17 +3164,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: jxlsave(filename, tier=int, distance=float, effort=int, lossless=bool, Q=int, strip=bool, background=list[float], page_height=int) + .. method:: jxlsave(filename, tier=int, distance=float, profile=str, effort=int, lossless=bool, Q=int, keep=int, background=list[float], page_height=int) Save image in JPEG-XL format. Example: - in.jxlsave(filename, tier=int, distance=float, effort=int, lossless=bool, Q=int, strip=bool, background=list[float], page_height=int) + in.jxlsave(filename, tier=int, distance=float, profile=str, effort=int, lossless=bool, Q=int, keep=int, background=list[float], page_height=int) :param filename: Filename to load from :type filename: str @@ -3091,14 +3184,16 @@ Autogenerated methods :type tier: int :param distance: Target butteraugli distance :type distance: float + :param profile: Filename of ICC profile to embed + :type profile: str :param effort: Encoding effort :type effort: int :param lossless: Enable lossless compression :type lossless: bool :param Q: Quality factor :type Q: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3106,25 +3201,27 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: jxlsave_buffer(tier=int, distance=float, effort=int, lossless=bool, Q=int, strip=bool, background=list[float], page_height=int) + .. method:: jxlsave_buffer(tier=int, distance=float, profile=str, effort=int, lossless=bool, Q=int, keep=int, background=list[float], page_height=int) Save image in JPEG-XL format. Example: - buffer = in.jxlsave_buffer(tier=int, distance=float, effort=int, lossless=bool, Q=int, strip=bool, background=list[float], page_height=int) + buffer = in.jxlsave_buffer(tier=int, distance=float, profile=str, effort=int, lossless=bool, Q=int, keep=int, background=list[float], page_height=int) :param tier: Decode speed tier :type tier: int :param distance: Target butteraugli distance :type distance: float + :param profile: Filename of ICC profile to embed + :type profile: str :param effort: Encoding effort :type effort: int :param lossless: Enable lossless compression :type lossless: bool :param Q: Quality factor :type Q: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3132,12 +3229,12 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: jxlsave_target(target, tier=int, distance=float, effort=int, lossless=bool, Q=int, strip=bool, background=list[float], page_height=int) + .. method:: jxlsave_target(target, tier=int, distance=float, profile=str, effort=int, lossless=bool, Q=int, keep=int, background=list[float], page_height=int) Save image in JPEG-XL format. Example: - in.jxlsave_target(target, tier=int, distance=float, effort=int, lossless=bool, Q=int, strip=bool, background=list[float], page_height=int) + in.jxlsave_target(target, tier=int, distance=float, profile=str, effort=int, lossless=bool, Q=int, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -3145,14 +3242,16 @@ Autogenerated methods :type tier: int :param distance: Target butteraugli distance :type distance: float + :param profile: Filename of ICC profile to embed + :type profile: str :param effort: Encoding effort :type effort: int :param lossless: Enable lossless compression :type lossless: bool :param Q: Quality factor :type Q: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3224,20 +3323,20 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: magickload(filename, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: magickload(filename, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load file with ImageMagick. Example: - out = pyvips.Image.magickload(filename, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.magickload(filename, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str :param density: Canvas resolution for rendering vector formats like SVG :type density: str - :param page: Load this page from the file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param memory: Force open via memory :type memory: bool @@ -3245,25 +3344,27 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: magickload_buffer(buffer, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: magickload_buffer(buffer, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load buffer with ImageMagick. Example: - out = pyvips.Image.magickload_buffer(buffer, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.magickload_buffer(buffer, density=str, page=int, n=int, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str :param density: Canvas resolution for rendering vector formats like SVG :type density: str - :param page: Load this page from the file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param memory: Force open via memory :type memory: bool @@ -3271,17 +3372,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: magicksave(filename, format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + .. method:: magicksave(filename, format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, profile=str, keep=int, background=list[float], page_height=int) Save file with ImageMagick. Example: - in.magicksave(filename, format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + in.magicksave(filename, format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -3295,8 +3398,10 @@ Autogenerated methods :type optimize_gif_transparency: bool :param bitdepth: Number of bits per pixel :type bitdepth: int - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3304,12 +3409,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: magicksave_buffer(format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + .. method:: magicksave_buffer(format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, profile=str, keep=int, background=list[float], page_height=int) Save image to magick buffer. Example: - buffer = in.magicksave_buffer(format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + buffer = in.magicksave_buffer(format=str, quality=int, optimize_gif_frames=bool, optimize_gif_transparency=bool, bitdepth=int, profile=str, keep=int, background=list[float], page_height=int) :param format: Format to save in :type format: str @@ -3321,8 +3426,10 @@ Autogenerated methods :type optimize_gif_transparency: bool :param bitdepth: Number of bits per pixel :type bitdepth: int - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3716,12 +3823,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: matload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: matload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load mat from file. Example: - out = pyvips.Image.matload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.matload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -3731,6 +3838,8 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] @@ -3746,12 +3855,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: matrixload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: matrixload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load matrix. Example: - out = pyvips.Image.matrixload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.matrixload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -3761,17 +3870,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: matrixload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: matrixload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load matrix. Example: - out = pyvips.Image.matrixload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.matrixload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -3781,20 +3892,24 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: matrixprint(strip=bool, background=list[float], page_height=int) + .. method:: matrixprint(profile=str, keep=int, background=list[float], page_height=int) Print matrix. Example: - in.matrixprint(strip=bool, background=list[float], page_height=int) + in.matrixprint(profile=str, keep=int, background=list[float], page_height=int) - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3802,17 +3917,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: matrixsave(filename, strip=bool, background=list[float], page_height=int) + .. method:: matrixsave(filename, profile=str, keep=int, background=list[float], page_height=int) Save image to matrix. Example: - in.matrixsave(filename, strip=bool, background=list[float], page_height=int) + in.matrixsave(filename, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -3820,17 +3937,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: matrixsave_target(target, strip=bool, background=list[float], page_height=int) + .. method:: matrixsave_target(target, profile=str, keep=int, background=list[float], page_height=int) Save image to matrix. Example: - in.matrixsave_target(target, strip=bool, background=list[float], page_height=int) + in.matrixsave_target(target, profile=str, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4044,12 +4163,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: niftiload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: niftiload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load NIfTI volume. Example: - out = pyvips.Image.niftiload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.niftiload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -4059,17 +4178,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: niftiload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: niftiload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load NIfTI volumes. Example: - out = pyvips.Image.niftiload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.niftiload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -4079,22 +4200,26 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: niftisave(filename, strip=bool, background=list[float], page_height=int) + .. method:: niftisave(filename, profile=str, keep=int, background=list[float], page_height=int) Save image to nifti file. Example: - in.niftisave(filename, strip=bool, background=list[float], page_height=int) + in.niftisave(filename, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4102,12 +4227,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. staticmethod:: openexrload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: openexrload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load an OpenEXR image. Example: - out = pyvips.Image.openexrload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.openexrload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -4117,87 +4242,97 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: openslideload(filename, attach_associated=bool, level=int, autocrop=bool, associated=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: openslideload(filename, level=int, autocrop=bool, associated=str, attach_associated=bool, rgb=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load file with OpenSlide. Example: - out = pyvips.Image.openslideload(filename, attach_associated=bool, level=int, autocrop=bool, associated=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.openslideload(filename, level=int, autocrop=bool, associated=str, attach_associated=bool, rgb=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str - :param attach_associated: Attach all associated images - :type attach_associated: bool :param level: Load this level from the file :type level: int :param autocrop: Crop to image bounds :type autocrop: bool :param associated: Load this associated image :type associated: str + :param attach_associated: Attach all associated images + :type attach_associated: bool + :param rgb: Output RGB (not RGBA) + :type rgb: bool :param memory: Force open via memory :type memory: bool :param access: Required access pattern for this file :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: openslideload_source(source, attach_associated=bool, level=int, autocrop=bool, associated=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: openslideload_source(source, level=int, autocrop=bool, associated=str, attach_associated=bool, rgb=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load source with OpenSlide. Example: - out = pyvips.Image.openslideload_source(source, attach_associated=bool, level=int, autocrop=bool, associated=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.openslideload_source(source, level=int, autocrop=bool, associated=str, attach_associated=bool, rgb=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source - :param attach_associated: Attach all associated images - :type attach_associated: bool :param level: Load this level from the file :type level: int :param autocrop: Crop to image bounds :type autocrop: bool :param associated: Load this associated image :type associated: str + :param attach_associated: Attach all associated images + :type attach_associated: bool + :param rgb: Output RGB (not RGBA) + :type rgb: bool :param memory: Force open via memory :type memory: bool :param access: Required access pattern for this file :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pdfload(filename, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: pdfload(filename, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load PDF from file. Example: - out = pyvips.Image.pdfload(filename, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.pdfload(filename, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, 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 file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param dpi: Render at this DPI + :param dpi: DPI to render at :type dpi: float - :param scale: Scale output by this factor + :param scale: Factor to scale by :type scale: float - :param background: Background value + :param background: Background colour :type background: list[float] - :param password: Decrypt with this password + :param password: Password to decrypt with :type password: str :param memory: Force open via memory :type memory: bool @@ -4205,31 +4340,33 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pdfload_buffer(buffer, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: pdfload_buffer(buffer, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load PDF from buffer. Example: - out = pyvips.Image.pdfload_buffer(buffer, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.pdfload_buffer(buffer, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, 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 file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param dpi: Render at this DPI + :param dpi: DPI to render at :type dpi: float - :param scale: Scale output by this factor + :param scale: Factor to scale by :type scale: float - :param background: Background value + :param background: Background colour :type background: list[float] - :param password: Decrypt with this password + :param password: Password to decrypt with :type password: str :param memory: Force open via memory :type memory: bool @@ -4237,31 +4374,33 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pdfload_source(source, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: pdfload_source(source, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load PDF from source. Example: - out = pyvips.Image.pdfload_source(source, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.pdfload_source(source, page=int, n=int, dpi=float, scale=float, background=list[float], password=str, 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 file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param dpi: Render at this DPI + :param dpi: DPI to render at :type dpi: float - :param scale: Scale output by this factor + :param scale: Factor to scale by :type scale: float - :param background: Background value + :param background: Background colour :type background: list[float] - :param password: Decrypt with this password + :param password: Password to decrypt with :type password: str :param memory: Force open via memory :type memory: bool @@ -4269,6 +4408,8 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] @@ -4318,12 +4459,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: pngload(filename, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: pngload(filename, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load png from file. Example: - out = pyvips.Image.pngload(filename, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.pngload(filename, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -4335,17 +4476,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pngload_buffer(buffer, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: pngload_buffer(buffer, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load png from buffer. Example: - out = pyvips.Image.pngload_buffer(buffer, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.pngload_buffer(buffer, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str @@ -4357,17 +4500,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pngload_source(source, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: pngload_source(source, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load png from source. Example: - out = pyvips.Image.pngload_source(source, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.pngload_source(source, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -4379,17 +4524,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: pngsave(filename, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, strip=bool, background=list[float], page_height=int) + .. method:: pngsave(filename, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, keep=int, background=list[float], page_height=int) - Save image to file as PNG. + Save image to png file. Example: - in.pngsave(filename, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, strip=bool, background=list[float], page_height=int) + in.pngsave(filename, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -4397,9 +4544,9 @@ Autogenerated methods :type compression: int :param interlace: Interlace image :type interlace: bool - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str - :param filter: libspng row filter flag(s) + :param filter: libpng row filter flag(s) :type filter: int :param palette: Quantise to 8bpp palette :type palette: bool @@ -4411,8 +4558,8 @@ Autogenerated methods :type bitdepth: int :param effort: Quantisation CPU effort :type effort: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4420,20 +4567,20 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: pngsave_buffer(compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, strip=bool, background=list[float], page_height=int) + .. method:: pngsave_buffer(compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, keep=int, background=list[float], page_height=int) - Save image to buffer as PNG. + Save image to png buffer. Example: - buffer = in.pngsave_buffer(compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, strip=bool, background=list[float], page_height=int) + buffer = in.pngsave_buffer(compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, keep=int, background=list[float], page_height=int) :param compression: Compression factor :type compression: int :param interlace: Interlace image :type interlace: bool - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str - :param filter: libspng row filter flag(s) + :param filter: libpng row filter flag(s) :type filter: int :param palette: Quantise to 8bpp palette :type palette: bool @@ -4445,8 +4592,8 @@ Autogenerated methods :type bitdepth: int :param effort: Quantisation CPU effort :type effort: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4454,12 +4601,12 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: pngsave_target(target, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, strip=bool, background=list[float], page_height=int) + .. method:: pngsave_target(target, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, keep=int, background=list[float], page_height=int) Save image to target as PNG. Example: - in.pngsave_target(target, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, strip=bool, background=list[float], page_height=int) + in.pngsave_target(target, compression=int, interlace=bool, profile=str, filter=int, palette=bool, Q=int, dither=float, bitdepth=int, effort=int, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -4467,9 +4614,9 @@ Autogenerated methods :type compression: int :param interlace: Interlace image :type interlace: bool - :param profile: ICC profile to embed + :param profile: Filename of ICC profile to embed :type profile: str - :param filter: libspng row filter flag(s) + :param filter: libpng row filter flag(s) :type filter: int :param palette: Quantise to 8bpp palette :type palette: bool @@ -4481,8 +4628,8 @@ Autogenerated methods :type bitdepth: int :param effort: Quantisation CPU effort :type effort: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4490,12 +4637,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. staticmethod:: ppmload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: ppmload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load ppm from file. Example: - out = pyvips.Image.ppmload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.ppmload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -4505,17 +4652,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: ppmload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: ppmload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load ppm base class. Example: - out = pyvips.Image.ppmload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.ppmload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -4525,17 +4674,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: ppmsave(filename, format=Union[str, ForeignPpmFormat], ascii=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + .. method:: ppmsave(filename, format=Union[str, ForeignPpmFormat], ascii=bool, profile=str, bitdepth=int, keep=int, background=list[float], page_height=int) Save image to ppm file. Example: - in.ppmsave(filename, format=Union[str, ForeignPpmFormat], ascii=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + in.ppmsave(filename, format=Union[str, ForeignPpmFormat], ascii=bool, profile=str, bitdepth=int, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -4543,10 +4694,12 @@ Autogenerated methods :type format: Union[str, ForeignPpmFormat] :param ascii: Save as ascii :type ascii: bool + :param profile: Filename of ICC profile to embed + :type profile: str :param bitdepth: Set to 1 to write as a 1 bit image :type bitdepth: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4554,12 +4707,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: ppmsave_target(target, format=Union[str, ForeignPpmFormat], ascii=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + .. method:: ppmsave_target(target, format=Union[str, ForeignPpmFormat], ascii=bool, profile=str, bitdepth=int, keep=int, background=list[float], page_height=int) Save to ppm. Example: - in.ppmsave_target(target, format=Union[str, ForeignPpmFormat], ascii=bool, bitdepth=int, strip=bool, background=list[float], page_height=int) + in.ppmsave_target(target, format=Union[str, ForeignPpmFormat], ascii=bool, profile=str, bitdepth=int, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -4567,10 +4720,12 @@ Autogenerated methods :type format: Union[str, ForeignPpmFormat] :param ascii: Save as ascii :type ascii: bool + :param profile: Filename of ICC profile to embed + :type profile: str :param bitdepth: Set to 1 to write as a 1 bit image :type bitdepth: int - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4590,6 +4745,16 @@ Autogenerated methods :rtype: Image :raises Error: + .. method:: prewitt() + + Prewitt edge detector. + + Example: + out = in.prewitt() + + :rtype: Image + :raises Error: + .. method:: profile() Find image profiles. @@ -4646,12 +4811,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: radload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: radload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load a Radiance image from a file. Example: - out = pyvips.Image.radload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.radload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -4661,17 +4826,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: radload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: radload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load rad from buffer. Example: - out = pyvips.Image.radload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.radload_buffer(buffer, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param buffer: Buffer to load from :type buffer: str @@ -4681,17 +4848,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: radload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: radload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load rad from source. Example: - out = pyvips.Image.radload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.radload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -4701,22 +4870,26 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: radsave(filename, strip=bool, background=list[float], page_height=int) + .. method:: radsave(filename, profile=str, keep=int, background=list[float], page_height=int) Save image to Radiance file. Example: - in.radsave(filename, strip=bool, background=list[float], page_height=int) + in.radsave(filename, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4724,15 +4897,17 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: radsave_buffer(strip=bool, background=list[float], page_height=int) + .. method:: radsave_buffer(profile=str, keep=int, background=list[float], page_height=int) Save image to Radiance buffer. Example: - buffer = in.radsave_buffer(strip=bool, background=list[float], page_height=int) + buffer = in.radsave_buffer(profile=str, keep=int, background=list[float], page_height=int) - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4740,17 +4915,19 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: radsave_target(target, strip=bool, background=list[float], page_height=int) + .. method:: radsave_target(target, profile=str, keep=int, background=list[float], page_height=int) Save image to Radiance target. Example: - in.radsave_target(target, strip=bool, background=list[float], page_height=int) + in.radsave_target(target, profile=str, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4774,12 +4951,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: rawload(filename, width, height, bands, offset=long, format=Union[str, BandFormat], interpretation=Union[str, Interpretation], memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: rawload(filename, width, height, bands, offset=long, format=Union[str, BandFormat], interpretation=Union[str, Interpretation], memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load raw data from a file. Example: - out = pyvips.Image.rawload(filename, width, height, bands, offset=long, format=Union[str, BandFormat], interpretation=Union[str, Interpretation], memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.rawload(filename, width, height, bands, offset=long, format=Union[str, BandFormat], interpretation=Union[str, Interpretation], memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -4801,22 +4978,26 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: rawsave(filename, strip=bool, background=list[float], page_height=int) + .. method:: rawsave(filename, profile=str, keep=int, background=list[float], page_height=int) Save image to raw file. Example: - in.rawsave(filename, strip=bool, background=list[float], page_height=int) + in.rawsave(filename, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -4824,17 +5005,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: rawsave_fd(fd, strip=bool, background=list[float], page_height=int) + .. method:: rawsave_fd(fd, profile=str, keep=int, background=list[float], page_height=int) Write raw image to file descriptor. Example: - in.rawsave_fd(fd, strip=bool, background=list[float], page_height=int) + in.rawsave_fd(fd, profile=str, keep=int, background=list[float], page_height=int) :param fd: File descriptor to write to :type fd: int - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -5102,6 +5285,16 @@ Autogenerated methods :rtype: Image :raises Error: + .. method:: scharr() + + Scharr edge detector. + + Example: + out = in.scharr() + + :rtype: Image + :raises Error: + .. method:: sequential(tile_height=int) Check sequential access. @@ -5236,12 +5429,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. method:: smartcrop(width, height, interesting=Union[str, Interesting]) + .. method:: smartcrop(width, height, interesting=Union[str, Interesting], premultiplied=bool, attention_x=bool, attention_y=bool) Extract an area from an image. Example: - out = input.smartcrop(width, height, interesting=Union[str, Interesting]) + out = input.smartcrop(width, height, interesting=Union[str, Interesting], premultiplied=bool) :param width: Width of extract area :type width: int @@ -5249,7 +5442,13 @@ Autogenerated methods :type height: int :param interesting: How to measure interestingness :type interesting: Union[str, Interesting] - :rtype: Image + :param premultiplied: Input image already has premultiplied alpha + :type premultiplied: bool + :param attention_x: enable output: Horizontal position of attention centre + :type attention_x: bool + :param attention_y: enable output: Vertical position of attention centre + :type attention_y: bool + :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: .. method:: sobel() @@ -5356,12 +5555,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], flags=bool) + .. staticmethod:: svgload(filename, dpi=float, scale=float, unlimited=bool, 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]) + out = pyvips.Image.svgload(filename, dpi=float, scale=float, unlimited=bool, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -5377,17 +5576,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :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], flags=bool) + .. 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) 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]) + 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) :param buffer: Buffer to load from :type buffer: str @@ -5403,17 +5604,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :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], flags=bool) + .. 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) 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]) + 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) :param source: Source to load from :type source: Source @@ -5429,6 +5632,8 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] @@ -5468,12 +5673,12 @@ Autogenerated methods :rtype: list[] or list[Dict[str, mixed]] :raises Error: - .. staticmethod:: text(text, font=str, width=int, height=int, align=Union[str, Align], rgba=bool, dpi=int, justify=bool, spacing=int, fontfile=str, autofit_dpi=bool) + .. staticmethod:: text(text, font=str, width=int, height=int, align=Union[str, Align], justify=bool, dpi=int, spacing=int, fontfile=str, rgba=bool, wrap=Union[str, TextWrap], autofit_dpi=bool) Make a text image. Example: - out = pyvips.Image.text(text, font=str, width=int, height=int, align=Union[str, Align], rgba=bool, dpi=int, justify=bool, spacing=int, fontfile=str) + out = pyvips.Image.text(text, font=str, width=int, height=int, align=Union[str, Align], justify=bool, dpi=int, spacing=int, fontfile=str, rgba=bool, wrap=Union[str, TextWrap]) :param text: Text to render :type text: str @@ -5485,16 +5690,18 @@ Autogenerated methods :type height: int :param align: Align on the low, centre or high edge :type align: Union[str, Align] - :param rgba: Enable RGBA output - :type rgba: bool - :param dpi: DPI to render at - :type dpi: int :param justify: Justify lines :type justify: bool + :param dpi: DPI to render at + :type dpi: int :param spacing: Line spacing :type spacing: int :param fontfile: Load this font file :type fontfile: str + :param rgba: Enable RGBA output + :type rgba: bool + :param wrap: Wrap lines on word or character boundaries + :type wrap: Union[str, TextWrap] :param autofit_dpi: enable output: DPI selected by autofit :type autofit_dpi: bool :rtype: Image or list[Image, Dict[str, mixed]] @@ -5630,20 +5837,20 @@ 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], flags=bool) + .. 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) 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]) + 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) :param filename: Filename to load from :type filename: str - :param page: Load this page from the image + :param page: First page to load :type page: int - :param subifd: Select subifd index + :param subifd: Subifd index :type subifd: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param autorotate: Rotate image using orientation tag :type autorotate: bool @@ -5653,25 +5860,27 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :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], flags=bool) + .. 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) 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]) + 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) :param buffer: Buffer to load from :type buffer: str - :param page: Load this page from the image + :param page: First page to load :type page: int - :param subifd: Select subifd index + :param subifd: Subifd index :type subifd: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param autorotate: Rotate image using orientation tag :type autorotate: bool @@ -5681,25 +5890,27 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :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], flags=bool) + .. 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) 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]) + 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) :param source: Source to load from :type source: Source - :param page: Load this page from the image + :param page: First page to load :type page: int - :param subifd: Select subifd index + :param subifd: Subifd index :type subifd: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int :param autorotate: Rotate image using orientation tag :type autorotate: bool @@ -5709,17 +5920,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: tiffsave(filename, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], profile=str, tile=bool, tile_width=int, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, strip=bool, background=list[float], page_height=int) + .. method:: tiffsave(filename, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], tile=bool, tile_width=int, profile=str, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, keep=int, background=list[float], page_height=int) Save image to tiff file. Example: - in.tiffsave(filename, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], profile=str, tile=bool, tile_width=int, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, strip=bool, background=list[float], page_height=int) + in.tiffsave(filename, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], tile=bool, tile_width=int, profile=str, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -5729,12 +5942,12 @@ Autogenerated methods :type Q: int :param predictor: Compression prediction :type predictor: Union[str, ForeignTiffPredictor] - :param profile: ICC profile to embed - :type profile: str :param tile: Write a tiled tiff :type tile: bool :param tile_width: Tile width in pixels :type tile_width: int + :param profile: Filename of ICC profile to embed + :type profile: str :param tile_height: Tile height in pixels :type tile_height: int :param pyramid: Write a pyramidal tiff @@ -5765,8 +5978,8 @@ Autogenerated methods :type subifd: bool :param premultiply: Save with premultiplied alpha :type premultiply: bool - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -5774,12 +5987,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: tiffsave_buffer(compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], profile=str, tile=bool, tile_width=int, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, strip=bool, background=list[float], page_height=int) + .. method:: tiffsave_buffer(compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], tile=bool, tile_width=int, profile=str, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, keep=int, background=list[float], page_height=int) Save image to tiff buffer. Example: - buffer = in.tiffsave_buffer(compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], profile=str, tile=bool, tile_width=int, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, strip=bool, background=list[float], page_height=int) + buffer = in.tiffsave_buffer(compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], tile=bool, tile_width=int, profile=str, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, keep=int, background=list[float], page_height=int) :param compression: Compression for this file :type compression: Union[str, ForeignTiffCompression] @@ -5787,12 +6000,12 @@ Autogenerated methods :type Q: int :param predictor: Compression prediction :type predictor: Union[str, ForeignTiffPredictor] - :param profile: ICC profile to embed - :type profile: str :param tile: Write a tiled tiff :type tile: bool :param tile_width: Tile width in pixels :type tile_width: int + :param profile: Filename of ICC profile to embed + :type profile: str :param tile_height: Tile height in pixels :type tile_height: int :param pyramid: Write a pyramidal tiff @@ -5823,8 +6036,8 @@ Autogenerated methods :type subifd: bool :param premultiply: Save with premultiplied alpha :type premultiply: bool - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -5832,12 +6045,12 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: tiffsave_target(target, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], profile=str, tile=bool, tile_width=int, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, strip=bool, background=list[float], page_height=int) + .. method:: tiffsave_target(target, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], tile=bool, tile_width=int, profile=str, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, keep=int, background=list[float], page_height=int) Save image to tiff target. Example: - in.tiffsave_target(target, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], profile=str, tile=bool, tile_width=int, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, strip=bool, background=list[float], page_height=int) + in.tiffsave_target(target, compression=Union[str, ForeignTiffCompression], Q=int, predictor=Union[str, ForeignTiffPredictor], tile=bool, tile_width=int, profile=str, tile_height=int, pyramid=bool, miniswhite=bool, bitdepth=int, resunit=Union[str, ForeignTiffResunit], xres=float, yres=float, bigtiff=bool, properties=bool, region_shrink=Union[str, RegionShrink], level=int, lossless=bool, depth=Union[str, ForeignDzDepth], subifd=bool, premultiply=bool, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -5847,12 +6060,12 @@ Autogenerated methods :type Q: int :param predictor: Compression prediction :type predictor: Union[str, ForeignTiffPredictor] - :param profile: ICC profile to embed - :type profile: str :param tile: Write a tiled tiff :type tile: bool :param tile_width: Tile width in pixels :type tile_width: int + :param profile: Filename of ICC profile to embed + :type profile: str :param tile_height: Tile height in pixels :type tile_height: int :param pyramid: Write a pyramidal tiff @@ -5883,8 +6096,8 @@ Autogenerated methods :type subifd: bool :param premultiply: Save with premultiplied alpha :type premultiply: bool - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -5970,12 +6183,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: vipsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: vipsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load vips from file. Example: - out = pyvips.Image.vipsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.vipsload(filename, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param filename: Filename to load from :type filename: str @@ -5985,17 +6198,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: vipsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: vipsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load vips from source. Example: - out = pyvips.Image.vipsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.vipsload_source(source, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool) :param source: Source to load from :type source: Source @@ -6005,22 +6220,26 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: vipssave(filename, strip=bool, background=list[float], page_height=int) + .. method:: vipssave(filename, profile=str, keep=int, background=list[float], page_height=int) Save image to file in vips format. Example: - in.vipssave(filename, strip=bool, background=list[float], page_height=int) + in.vipssave(filename, profile=str, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -6028,17 +6247,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: vipssave_target(target, strip=bool, background=list[float], page_height=int) + .. method:: vipssave_target(target, profile=str, keep=int, background=list[float], page_height=int) Save image to target in vips format. Example: - in.vipssave_target(target, strip=bool, background=list[float], page_height=int) + in.vipssave_target(target, profile=str, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target - :param strip: Strip all metadata from image - :type strip: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -6046,20 +6267,20 @@ Autogenerated methods :rtype: list[] :raises Error: - .. staticmethod:: webpload(filename, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: webpload(filename, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load webp from file. Example: - out = pyvips.Image.webpload(filename, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.webpload(filename, page=int, n=int, scale=float, 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 file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param scale: Scale factor on load + :param scale: Factor to scale by :type scale: float :param memory: Force open via memory :type memory: bool @@ -6067,25 +6288,27 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: webpload_buffer(buffer, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: webpload_buffer(buffer, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load webp from buffer. Example: - out = pyvips.Image.webpload_buffer(buffer, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.webpload_buffer(buffer, page=int, n=int, scale=float, 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 file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param scale: Scale factor on load + :param scale: Factor to scale by :type scale: float :param memory: Force open via memory :type memory: bool @@ -6093,25 +6316,27 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: webpload_source(source, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], flags=bool) + .. staticmethod:: webpload_source(source, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn], revalidate=bool, flags=bool) Load webp from source. Example: - out = pyvips.Image.webpload_source(source, page=int, n=int, scale=float, memory=bool, access=Union[str, Access], fail_on=Union[str, FailOn]) + out = pyvips.Image.webpload_source(source, page=int, n=int, scale=float, 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 file + :param page: First page to load :type page: int - :param n: Load this many pages + :param n: Number of pages to load, -1 for all :type n: int - :param scale: Scale factor on load + :param scale: Factor to scale by :type scale: float :param memory: Force open via memory :type memory: bool @@ -6119,17 +6344,19 @@ Autogenerated methods :type access: Union[str, Access] :param fail_on: Error level to fail on :type fail_on: Union[str, FailOn] + :param revalidate: Don't use a cached result for this operation + :type revalidate: bool :param flags: enable output: Flags for this file :type flags: bool :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: webpsave(filename, Q=int, lossless=bool, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, profile=str, mixed=bool, strip=bool, background=list[float], page_height=int) + .. method:: webpsave(filename, Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) - Save image to webp file. + Save as WebP. Example: - in.webpsave(filename, Q=int, lossless=bool, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, profile=str, mixed=bool, strip=bool, background=list[float], page_height=int) + in.webpsave(filename, Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) :param filename: Filename to save to :type filename: str @@ -6137,6 +6364,8 @@ Autogenerated methods :type Q: int :param lossless: Enable lossless compression :type lossless: bool + :param profile: Filename of ICC profile to embed + :type profile: str :param preset: Preset for lossy compression :type preset: Union[str, ForeignWebpPreset] :param smart_subsample: Enable high quality chroma subsampling @@ -6153,12 +6382,10 @@ Autogenerated methods :type kmax: int :param effort: Level of CPU effort to reduce file size :type effort: int - :param profile: ICC profile to embed - :type profile: str :param mixed: Allow mixed encoding (might reduce file size) :type mixed: bool - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -6166,17 +6393,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: webpsave_buffer(Q=int, lossless=bool, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, profile=str, mixed=bool, strip=bool, background=list[float], page_height=int) + .. method:: webpsave_buffer(Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) - Save image to webp buffer. + Save as WebP. Example: - buffer = in.webpsave_buffer(Q=int, lossless=bool, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, profile=str, mixed=bool, strip=bool, background=list[float], page_height=int) + buffer = in.webpsave_buffer(Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) :param Q: Q factor :type Q: int :param lossless: Enable lossless compression :type lossless: bool + :param profile: Filename of ICC profile to embed + :type profile: str :param preset: Preset for lossy compression :type preset: Union[str, ForeignWebpPreset] :param smart_subsample: Enable high quality chroma subsampling @@ -6193,12 +6422,10 @@ Autogenerated methods :type kmax: int :param effort: Level of CPU effort to reduce file size :type effort: int - :param profile: ICC profile to embed - :type profile: str :param mixed: Allow mixed encoding (might reduce file size) :type mixed: bool - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save @@ -6206,12 +6433,52 @@ Autogenerated methods :rtype: str :raises Error: - .. method:: webpsave_target(target, Q=int, lossless=bool, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, profile=str, mixed=bool, strip=bool, background=list[float], page_height=int) + .. method:: webpsave_mime(Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) - Save image to webp target. + Save image to webp mime. Example: - in.webpsave_target(target, Q=int, lossless=bool, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, profile=str, mixed=bool, strip=bool, background=list[float], page_height=int) + in.webpsave_mime(Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) + + :param Q: Q factor + :type Q: int + :param lossless: Enable lossless compression + :type lossless: bool + :param profile: Filename of ICC profile to embed + :type profile: str + :param preset: Preset for lossy compression + :type preset: Union[str, ForeignWebpPreset] + :param smart_subsample: Enable high quality chroma subsampling + :type smart_subsample: bool + :param near_lossless: Enable preprocessing in lossless mode (uses Q) + :type near_lossless: bool + :param alpha_q: Change alpha plane fidelity for lossy compression + :type alpha_q: int + :param min_size: Optimise for minimum size + :type min_size: bool + :param kmin: Minimum number of frames between key frames + :type kmin: int + :param kmax: Maximum number of frames between key frames + :type kmax: int + :param effort: Level of CPU effort to reduce file size + :type effort: int + :param mixed: Allow mixed encoding (might reduce file size) + :type mixed: bool + :param keep: Which metadata to retain + :type keep: int + :param background: Background value + :type background: list[float] + :param page_height: Set page height for multipage save + :type page_height: int + :rtype: list[] + :raises Error: + + .. method:: webpsave_target(target, Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) + + Save as WebP. + + Example: + in.webpsave_target(target, Q=int, lossless=bool, profile=str, preset=Union[str, ForeignWebpPreset], smart_subsample=bool, near_lossless=bool, alpha_q=int, min_size=bool, kmin=int, kmax=int, effort=int, mixed=bool, keep=int, background=list[float], page_height=int) :param target: Target to save to :type target: Target @@ -6219,6 +6486,8 @@ Autogenerated methods :type Q: int :param lossless: Enable lossless compression :type lossless: bool + :param profile: Filename of ICC profile to embed + :type profile: str :param preset: Preset for lossy compression :type preset: Union[str, ForeignWebpPreset] :param smart_subsample: Enable high quality chroma subsampling @@ -6235,12 +6504,10 @@ Autogenerated methods :type kmax: int :param effort: Level of CPU effort to reduce file size :type effort: int - :param profile: ICC profile to embed - :type profile: str :param mixed: Allow mixed encoding (might reduce file size) :type mixed: bool - :param strip: Strip all metadata from image - :type strip: bool + :param keep: Which metadata to retain + :type keep: int :param background: Background value :type background: list[float] :param page_height: Set page height for multipage save