From 14ef40434afed0da6a260f20ac43a8fe75ec33a5 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Fri, 28 Aug 2026 12:12:55 +0200 Subject: [PATCH 1/3] Update docs for future 8.19 --- doc/vimage.rst | 381 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 336 insertions(+), 45 deletions(-) diff --git a/doc/vimage.rst b/doc/vimage.rst index 072d344..475bd75 100644 --- a/doc/vimage.rst +++ b/doc/vimage.rst @@ -90,6 +90,7 @@ Autogenerated methods .. autosummary:: :nosignatures: + ~CICP2scRGB ~CMC2LCh ~CMYK2XYZ ~HSV2sRGB @@ -307,6 +308,7 @@ Autogenerated methods ~pdfload_buffer ~pdfload_source ~percent + ~percent_lum ~perlin ~phasecor ~pngload @@ -325,6 +327,12 @@ Autogenerated methods ~profile ~profile_load ~project + ~qoiload + ~qoiload_buffer + ~qoiload_source + ~qoisave + ~qoisave_buffer + ~qoisave_target ~quadratic ~rad2float ~radload @@ -356,6 +364,7 @@ Autogenerated methods ~sRGB2HSV ~sRGB2scRGB ~scRGB2BW + ~scRGB2CICP ~scRGB2XYZ ~scRGB2sRGB ~scharr @@ -422,6 +431,16 @@ Autogenerated methods ~zoom + .. method:: CICP2scRGB() + + Transform CICP to scRGB. + + Example: + out = in.CICP2scRGB() + + :rtype: Image + :raises Error: + .. method:: CMC2LCh() Transform LCh to CMC. @@ -1386,17 +1405,19 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: dcrawload(filename, bitdepth=int, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool, flags=bool) + .. staticmethod:: dcrawload(filename, bitdepth=int, half_size=bool, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool, flags=bool) Load RAW camera files. Example: - out = pyvips.Image.dcrawload(filename, bitdepth=int, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool) + out = pyvips.Image.dcrawload(filename, bitdepth=int, half_size=bool, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool) :param filename: Filename to load from :type filename: str | Path - :param bitdepth: Number of bits per pixel + :param bitdepth: Number of bits to decode to :type bitdepth: int + :param half_size: Decode image at half size + :type half_size: bool :param memory: Force open via memory :type memory: bool :param access: Required access pattern for this file @@ -1410,17 +1431,19 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: dcrawload_buffer(buffer, bitdepth=int, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) + .. staticmethod:: dcrawload_buffer(buffer, bitdepth=int, half_size=bool, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) Load RAW camera files. Example: - out = pyvips.Image.dcrawload_buffer(buffer, bitdepth=int, memory=bool, access=str | Access, fail_on=str | FailOn) + out = pyvips.Image.dcrawload_buffer(buffer, bitdepth=int, half_size=bool, memory=bool, access=str | Access, fail_on=str | FailOn) :param buffer: Buffer to load from :type buffer: bytes - :param bitdepth: Number of bits per pixel + :param bitdepth: Number of bits to decode to :type bitdepth: int + :param half_size: Decode image at half size + :type half_size: bool :param memory: Force open via memory :type memory: bool :param access: Required access pattern for this file @@ -1432,17 +1455,19 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: dcrawload_source(source, bitdepth=int, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) + .. staticmethod:: dcrawload_source(source, bitdepth=int, half_size=bool, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) Load RAW camera files. Example: - out = pyvips.Image.dcrawload_source(source, bitdepth=int, memory=bool, access=str | Access, fail_on=str | FailOn) + out = pyvips.Image.dcrawload_source(source, bitdepth=int, half_size=bool, memory=bool, access=str | Access, fail_on=str | FailOn) :param source: Source to load from :type source: Source - :param bitdepth: Number of bits per pixel + :param bitdepth: Number of bits to decode to :type bitdepth: int + :param half_size: Decode image at half size + :type half_size: bool :param memory: Force open via memory :type memory: bool :param access: Required access pattern for this file @@ -1542,12 +1567,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. method:: draw_line(ink, x1, y1, x2, y2) + .. method:: draw_line(ink, x1, y1, x2, y2, draw_point=ffi.CData, client=ffi.CData) Draw a line on an image. Example: - image = image.draw_line(ink, x1, y1, x2, y2) + image = image.draw_line(ink, x1, y1, x2, y2, draw_point=ffi.CData, client=ffi.CData) :param ink: Color for pixels :type ink: list[float] @@ -1559,6 +1584,10 @@ Autogenerated methods :type x2: int :param y2: End of draw_line :type y2: int + :param draw_point: Custom point draw function + :type draw_point: ffi.CData + :param client: Client data for the point draw function + :type client: ffi.CData :rtype: Image :raises Error: @@ -3318,12 +3347,12 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: jxlsave(filename, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, keep=int, background=list[float], page_height=int, profile=str | Path) + .. method:: jxlsave(filename, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, interlace=bool, progressive=bool, keep=int, background=list[float], page_height=int, profile=str | Path) Save image in JPEG-XL format. Example: - in.jxlsave(filename, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, keep=int, background=list[float], page_height=int, profile=str | Path) + in.jxlsave(filename, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, interlace=bool, progressive=bool, keep=int, background=list[float], page_height=int, profile=str | Path) :param filename: Filename to save to :type filename: str | Path @@ -3339,6 +3368,10 @@ Autogenerated methods :type Q: int :param bitdepth: Bit depth :type bitdepth: int + :param interlace: Enable progressive (interlaced) encoding + :type interlace: bool + :param progressive: Enable progressive encoding + :type progressive: bool :param keep: Which metadata to retain :type keep: int :param background: Background value @@ -3350,12 +3383,12 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: jxlsave_buffer(tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, keep=int, background=list[float], page_height=int, profile=str | Path) + .. method:: jxlsave_buffer(tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, interlace=bool, progressive=bool, keep=int, background=list[float], page_height=int, profile=str | Path) Save image in JPEG-XL format. Example: - buffer = in.jxlsave_buffer(tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, keep=int, background=list[float], page_height=int, profile=str | Path) + buffer = in.jxlsave_buffer(tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, interlace=bool, progressive=bool, keep=int, background=list[float], page_height=int, profile=str | Path) :param tier: Decode speed tier :type tier: int @@ -3369,6 +3402,10 @@ Autogenerated methods :type Q: int :param bitdepth: Bit depth :type bitdepth: int + :param interlace: Enable progressive (interlaced) encoding + :type interlace: bool + :param progressive: Enable progressive encoding + :type progressive: bool :param keep: Which metadata to retain :type keep: int :param background: Background value @@ -3380,12 +3417,12 @@ Autogenerated methods :rtype: bytes :raises Error: - .. method:: jxlsave_target(target, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, keep=int, background=list[float], page_height=int, profile=str | Path) + .. method:: jxlsave_target(target, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, interlace=bool, progressive=bool, keep=int, background=list[float], page_height=int, profile=str | Path) Save image in JPEG-XL format. Example: - in.jxlsave_target(target, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, keep=int, background=list[float], page_height=int, profile=str | Path) + in.jxlsave_target(target, tier=int, distance=float, effort=int, lossless=bool, Q=int, bitdepth=int, interlace=bool, progressive=bool, keep=int, background=list[float], page_height=int, profile=str | Path) :param target: Target to save to :type target: Target @@ -3401,6 +3438,10 @@ Autogenerated methods :type Q: int :param bitdepth: Bit depth :type bitdepth: int + :param interlace: Enable progressive (interlaced) encoding + :type interlace: bool + :param progressive: Enable progressive encoding + :type progressive: bool :param keep: Which metadata to retain :type keep: int :param background: Background value @@ -4634,6 +4675,20 @@ Autogenerated methods :rtype: int :raises Error: + .. method:: percent_lum(percent, max=float) + + Find threshold for percent of pixels by BT.709 luminance. + + Example: + threshold = in.percent_lum(percent, max=float) + + :param percent: Percentile (0-100) of luminance to return + :type percent: float + :param max: Histogram upper bound in input unit; values above clamp to the top bin + :type max: float + :rtype: float + :raises Error: + .. staticmethod:: perlin(width, height, cell_size=int, uchar=bool, seed=int) Make a perlin noise image. @@ -4666,15 +4721,19 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: pngload(filename, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool, flags=bool) + .. staticmethod:: pngload(filename, page=int, n=int, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool, flags=bool) Load png from file. Example: - out = pyvips.Image.pngload(filename, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool) + out = pyvips.Image.pngload(filename, page=int, n=int, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool) :param filename: Filename to load from :type filename: str | Path + :param page: First page to load + :type page: int + :param n: Number of pages to load, -1 for all + :type n: int :param unlimited: Remove all denial of service limits :type unlimited: bool :param memory: Force open via memory @@ -4690,15 +4749,19 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pngload_buffer(buffer, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) + .. staticmethod:: pngload_buffer(buffer, page=int, n=int, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) Load png from buffer. Example: - out = pyvips.Image.pngload_buffer(buffer, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn) + out = pyvips.Image.pngload_buffer(buffer, page=int, n=int, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn) :param buffer: Buffer to load from :type buffer: bytes + :param page: First page to load + :type page: int + :param n: Number of pages to load, -1 for all + :type n: int :param unlimited: Remove all denial of service limits :type unlimited: bool :param memory: Force open via memory @@ -4712,15 +4775,19 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: pngload_source(source, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) + .. staticmethod:: pngload_source(source, page=int, n=int, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) Load png from source. Example: - out = pyvips.Image.pngload_source(source, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn) + out = pyvips.Image.pngload_source(source, page=int, n=int, unlimited=bool, memory=bool, access=str | Access, fail_on=str | FailOn) :param source: Source to load from :type source: Source + :param page: First page to load + :type page: int + :param n: Number of pages to load, -1 for all + :type n: int :param unlimited: Remove all denial of service limits :type unlimited: bool :param memory: Force open via memory @@ -4954,15 +5021,17 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: premultiply(max_alpha=float) + .. method:: premultiply(max_alpha=float, uchar=bool) Premultiply image alpha. Example: - out = in.premultiply(max_alpha=float) + out = in.premultiply(max_alpha=float, uchar=bool) :param max_alpha: Maximum value of alpha channel :type max_alpha: float + :param uchar: Output should be uchar + :type uchar: bool :rtype: Image :raises Error: @@ -4998,16 +5067,138 @@ Autogenerated methods :rtype: bytes :raises Error: - .. method:: project() + .. method:: project(combine=str | Combine) Find image projections. Example: - columns, rows = in.project() + columns, rows = in.project(combine=str | Combine) + :param combine: Combine values with this + :type combine: str | Combine :rtype: list[Image, Image] :raises Error: + .. staticmethod:: qoiload(filename, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool, flags=bool) + + Load qoi from file. + + Example: + out = pyvips.Image.qoiload(filename, memory=bool, access=str | Access, fail_on=str | FailOn, revalidate=bool) + + :param filename: Filename to load from + :type filename: str | Path + :param memory: Force open via memory + :type memory: bool + :param access: Required access pattern for this file + :type access: str | Access + :param fail_on: Error level to fail on + :type fail_on: 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:: qoiload_buffer(buffer, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) + + Load qoi from buffer. + + Example: + out = pyvips.Image.qoiload_buffer(buffer, memory=bool, access=str | Access, fail_on=str | FailOn) + + :param buffer: Buffer to load from + :type buffer: bytes + :param memory: Force open via memory + :type memory: bool + :param access: Required access pattern for this file + :type access: str | Access + :param fail_on: Error level to fail on + :type fail_on: str | FailOn + :param flags: enable output: Flags for this file + :type flags: bool + :rtype: Image or list[Image, Dict[str, mixed]] + :raises Error: + + .. staticmethod:: qoiload_source(source, memory=bool, access=str | Access, fail_on=str | FailOn, flags=bool) + + Load qoi from source. + + Example: + out = pyvips.Image.qoiload_source(source, memory=bool, access=str | Access, fail_on=str | FailOn) + + :param source: Source to load from + :type source: Source + :param memory: Force open via memory + :type memory: bool + :param access: Required access pattern for this file + :type access: str | Access + :param fail_on: Error level to fail on + :type fail_on: str | FailOn + :param flags: enable output: Flags for this file + :type flags: bool + :rtype: Image or list[Image, Dict[str, mixed]] + :raises Error: + + .. method:: qoisave(filename, keep=int, background=list[float], page_height=int, profile=str | Path) + + Save image to file as QOI. + + Example: + in.qoisave(filename, keep=int, background=list[float], page_height=int, profile=str | Path) + + :param filename: Filename to save to + :type filename: str | Path + :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 + :param profile: Filename of ICC profile to embed + :type profile: str | Path + :rtype: list[] + :raises Error: + + .. method:: qoisave_buffer(keep=int, background=list[float], page_height=int, profile=str | Path) + + Save image to buffer as QOI. + + Example: + buffer = in.qoisave_buffer(keep=int, background=list[float], page_height=int, profile=str | Path) + + :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 + :param profile: Filename of ICC profile to embed + :type profile: str | Path + :rtype: bytes + :raises Error: + + .. method:: qoisave_target(target, keep=int, background=list[float], page_height=int, profile=str | Path) + + Save image to target as QOI. + + Example: + in.qoisave_target(target, keep=int, background=list[float], page_height=int, profile=str | Path) + + :param target: Target to save to + :type target: Target + :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 + :param profile: Filename of ICC profile to embed + :type profile: str | Path + :rtype: list[] + :raises Error: + .. method:: quadratic(coeff, interpolate=GObject) Resample an image with a quadratic transform. @@ -5512,6 +5703,24 @@ Autogenerated methods :rtype: Image :raises Error: + .. method:: scRGB2CICP(colour_primaries=str | CICPColourPrimaries, transfer_characteristics=str | CICPTransferCharacteristics, matrix_coefficients=str | CICPMatrixCoefficients, depth=int) + + Transform scRGB to CICP. + + Example: + out = in.scRGB2CICP(colour_primaries=str | CICPColourPrimaries, transfer_characteristics=str | CICPTransferCharacteristics, matrix_coefficients=str | CICPMatrixCoefficients, depth=int) + + :param colour_primaries: CICP colour primaries (H.273 Table 2) + :type colour_primaries: str | CICPColourPrimaries + :param transfer_characteristics: CICP transfer characteristics (H.273 Table 3) + :type transfer_characteristics: str | CICPTransferCharacteristics + :param matrix_coefficients: CICP matrix coefficients (H.273 Table 4) + :type matrix_coefficients: str | CICPMatrixCoefficients + :param depth: Output device space depth in bits + :type depth: int + :rtype: Image + :raises Error: + .. method:: scRGB2XYZ() Transform scRGB to XYZ. @@ -5702,12 +5911,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. method:: smartcrop(width, height, interesting=str | Interesting, premultiplied=bool, attention_x=bool, attention_y=bool) + .. method:: smartcrop(width, height, interesting=str | Interesting, interesting_x=int, interesting_y=int, premultiplied=bool, attention_x=bool, attention_y=bool) Extract an area from an image. Example: - out = input.smartcrop(width, height, interesting=str | Interesting, premultiplied=bool) + out = input.smartcrop(width, height, interesting=str | Interesting, interesting_x=int, interesting_y=int, premultiplied=bool) :param width: Width of extract area :type width: int @@ -5715,6 +5924,10 @@ Autogenerated methods :type height: int :param interesting: How to measure interestingness :type interesting: str | Interesting + :param interesting_x: Horizontal position of the specific point of interest + :type interesting_x: int + :param interesting_y: Vertical position of the specific point of interest + :type interesting_y: int :param premultiplied: Input image already has premultiplied alpha :type premultiplied: bool :param attention_x: enable output: Horizontal position of attention centre @@ -5990,12 +6203,12 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. staticmethod:: thumbnail(filename, width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + .. staticmethod:: thumbnail(filename, width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) Generate thumbnail from file. Example: - out = pyvips.Image.thumbnail(filename, width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + out = pyvips.Image.thumbnail(filename, width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) :param filename: Filename to read from :type filename: str | Path @@ -6009,6 +6222,10 @@ Autogenerated methods :type no_rotate: bool :param crop: Reduce to fill target rectangle, then crop :type crop: str | Interesting + :param interesting_x: Horizontal position of the specific point of interest for cropping + :type interesting_x: int + :param interesting_y: Vertical position of the specific point of interest for cropping + :type interesting_y: int :param linear: Reduce in linear light :type linear: bool :param input_profile: Fallback input profile @@ -6022,12 +6239,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: thumbnail_buffer(buffer, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + .. staticmethod:: thumbnail_buffer(buffer, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) Generate thumbnail from buffer. Example: - out = pyvips.Image.thumbnail_buffer(buffer, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + out = pyvips.Image.thumbnail_buffer(buffer, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) :param buffer: Buffer to load from :type buffer: bytes @@ -6043,6 +6260,10 @@ Autogenerated methods :type no_rotate: bool :param crop: Reduce to fill target rectangle, then crop :type crop: str | Interesting + :param interesting_x: Horizontal position of the specific point of interest for cropping + :type interesting_x: int + :param interesting_y: Vertical position of the specific point of interest for cropping + :type interesting_y: int :param linear: Reduce in linear light :type linear: bool :param input_profile: Fallback input profile @@ -6056,12 +6277,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. method:: thumbnail_image(width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + .. method:: thumbnail_image(width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) Generate thumbnail from image. Example: - out = in.thumbnail_image(width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + out = in.thumbnail_image(width, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) :param width: Size to this width :type width: int @@ -6073,6 +6294,10 @@ Autogenerated methods :type no_rotate: bool :param crop: Reduce to fill target rectangle, then crop :type crop: str | Interesting + :param interesting_x: Horizontal position of the specific point of interest for cropping + :type interesting_x: int + :param interesting_y: Vertical position of the specific point of interest for cropping + :type interesting_y: int :param linear: Reduce in linear light :type linear: bool :param input_profile: Fallback input profile @@ -6086,12 +6311,12 @@ Autogenerated methods :rtype: Image :raises Error: - .. staticmethod:: thumbnail_source(source, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + .. staticmethod:: thumbnail_source(source, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) Generate thumbnail from source. Example: - out = pyvips.Image.thumbnail_source(source, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) + out = pyvips.Image.thumbnail_source(source, width, option_string=str, height=int, size=str | Size, no_rotate=bool, crop=str | Interesting, interesting_x=int, interesting_y=int, linear=bool, input_profile=str | Path, output_profile=str | Path, intent=str | Intent, fail_on=str | FailOn) :param source: Source to load from :type source: Source @@ -6107,6 +6332,10 @@ Autogenerated methods :type no_rotate: bool :param crop: Reduce to fill target rectangle, then crop :type crop: str | Interesting + :param interesting_x: Horizontal position of the specific point of interest for cropping + :type interesting_x: int + :param interesting_y: Vertical position of the specific point of interest for cropping + :type interesting_y: int :param linear: Reduce in linear light :type linear: bool :param input_profile: Fallback input profile @@ -6532,12 +6761,12 @@ Autogenerated methods :rtype: Image or list[Image, Dict[str, mixed]] :raises Error: - .. method:: uhdrsave(filename, Q=int, gainmap_scale_factor=int, keep=int, background=list[float], page_height=int, profile=str | Path) + .. method:: uhdrsave(filename, Q=int, gainmap_scale_factor=int, peak_brightness=float, max_content_boost=float, optimize_coding=bool, interlace=bool, subsample_mode=str | ForeignSubsample, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, restart_interval=int, keep=int, background=list[float], page_height=int, profile=str | Path) Save image in UltraHDR format. Example: - in.uhdrsave(filename, Q=int, gainmap_scale_factor=int, keep=int, background=list[float], page_height=int, profile=str | Path) + in.uhdrsave(filename, Q=int, gainmap_scale_factor=int, peak_brightness=float, max_content_boost=float, optimize_coding=bool, interlace=bool, subsample_mode=str | ForeignSubsample, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, restart_interval=int, keep=int, background=list[float], page_height=int, profile=str | Path) :param filename: Filename to save to :type filename: str | Path @@ -6545,6 +6774,26 @@ Autogenerated methods :type Q: int :param gainmap_scale_factor: The scale factor of base image to gainmap image :type gainmap_scale_factor: int + :param peak_brightness: Target display peak brightness in nits + :type peak_brightness: float + :param max_content_boost: Maximum content boost for the gainmap + :type max_content_boost: float + :param optimize_coding: Compute optimal Huffman coding tables + :type optimize_coding: bool + :param interlace: Generate an interlaced (progressive) jpeg + :type interlace: bool + :param subsample_mode: Select chroma subsample operation mode + :type subsample_mode: str | ForeignSubsample + :param trellis_quant: Apply trellis quantisation to each 8x8 block + :type trellis_quant: bool + :param overshoot_deringing: Apply overshooting to samples with extreme values + :type overshoot_deringing: bool + :param optimize_scans: Split spectrum of DCT coefficients into separate scans + :type optimize_scans: bool + :param quant_table: Use predefined quantization table with given index + :type quant_table: int + :param restart_interval: Add restart markers every specified number of mcu + :type restart_interval: int :param keep: Which metadata to retain :type keep: int :param background: Background value @@ -6556,17 +6805,37 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: uhdrsave_buffer(Q=int, gainmap_scale_factor=int, keep=int, background=list[float], page_height=int, profile=str | Path) + .. method:: uhdrsave_buffer(Q=int, gainmap_scale_factor=int, peak_brightness=float, max_content_boost=float, optimize_coding=bool, interlace=bool, subsample_mode=str | ForeignSubsample, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, restart_interval=int, keep=int, background=list[float], page_height=int, profile=str | Path) Save image in UltraHDR format. Example: - buffer = in.uhdrsave_buffer(Q=int, gainmap_scale_factor=int, keep=int, background=list[float], page_height=int, profile=str | Path) + buffer = in.uhdrsave_buffer(Q=int, gainmap_scale_factor=int, peak_brightness=float, max_content_boost=float, optimize_coding=bool, interlace=bool, subsample_mode=str | ForeignSubsample, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, restart_interval=int, keep=int, background=list[float], page_height=int, profile=str | Path) :param Q: Q factor :type Q: int :param gainmap_scale_factor: The scale factor of base image to gainmap image :type gainmap_scale_factor: int + :param peak_brightness: Target display peak brightness in nits + :type peak_brightness: float + :param max_content_boost: Maximum content boost for the gainmap + :type max_content_boost: float + :param optimize_coding: Compute optimal Huffman coding tables + :type optimize_coding: bool + :param interlace: Generate an interlaced (progressive) jpeg + :type interlace: bool + :param subsample_mode: Select chroma subsample operation mode + :type subsample_mode: str | ForeignSubsample + :param trellis_quant: Apply trellis quantisation to each 8x8 block + :type trellis_quant: bool + :param overshoot_deringing: Apply overshooting to samples with extreme values + :type overshoot_deringing: bool + :param optimize_scans: Split spectrum of DCT coefficients into separate scans + :type optimize_scans: bool + :param quant_table: Use predefined quantization table with given index + :type quant_table: int + :param restart_interval: Add restart markers every specified number of mcu + :type restart_interval: int :param keep: Which metadata to retain :type keep: int :param background: Background value @@ -6578,12 +6847,12 @@ Autogenerated methods :rtype: bytes :raises Error: - .. method:: uhdrsave_target(target, Q=int, gainmap_scale_factor=int, keep=int, background=list[float], page_height=int, profile=str | Path) + .. method:: uhdrsave_target(target, Q=int, gainmap_scale_factor=int, peak_brightness=float, max_content_boost=float, optimize_coding=bool, interlace=bool, subsample_mode=str | ForeignSubsample, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, restart_interval=int, keep=int, background=list[float], page_height=int, profile=str | Path) Save image in UltraHDR format. Example: - in.uhdrsave_target(target, Q=int, gainmap_scale_factor=int, keep=int, background=list[float], page_height=int, profile=str | Path) + in.uhdrsave_target(target, Q=int, gainmap_scale_factor=int, peak_brightness=float, max_content_boost=float, optimize_coding=bool, interlace=bool, subsample_mode=str | ForeignSubsample, trellis_quant=bool, overshoot_deringing=bool, optimize_scans=bool, quant_table=int, restart_interval=int, keep=int, background=list[float], page_height=int, profile=str | Path) :param target: Target to save to :type target: Target @@ -6591,6 +6860,26 @@ Autogenerated methods :type Q: int :param gainmap_scale_factor: The scale factor of base image to gainmap image :type gainmap_scale_factor: int + :param peak_brightness: Target display peak brightness in nits + :type peak_brightness: float + :param max_content_boost: Maximum content boost for the gainmap + :type max_content_boost: float + :param optimize_coding: Compute optimal Huffman coding tables + :type optimize_coding: bool + :param interlace: Generate an interlaced (progressive) jpeg + :type interlace: bool + :param subsample_mode: Select chroma subsample operation mode + :type subsample_mode: str | ForeignSubsample + :param trellis_quant: Apply trellis quantisation to each 8x8 block + :type trellis_quant: bool + :param overshoot_deringing: Apply overshooting to samples with extreme values + :type overshoot_deringing: bool + :param optimize_scans: Split spectrum of DCT coefficients into separate scans + :type optimize_scans: bool + :param quant_table: Use predefined quantization table with given index + :type quant_table: int + :param restart_interval: Add restart markers every specified number of mcu + :type restart_interval: int :param keep: Which metadata to retain :type keep: int :param background: Background value @@ -6602,17 +6891,19 @@ Autogenerated methods :rtype: list[] :raises Error: - .. method:: unpremultiply(max_alpha=float, alpha_band=int) + .. method:: unpremultiply(max_alpha=float, alpha_band=int, uchar=bool) Unpremultiply image alpha. Example: - out = in.unpremultiply(max_alpha=float, alpha_band=int) + out = in.unpremultiply(max_alpha=float, alpha_band=int, uchar=bool) :param max_alpha: Maximum value of alpha channel :type max_alpha: float :param alpha_band: Unpremultiply with this alpha :type alpha_band: int + :param uchar: Output should be uchar + :type uchar: bool :rtype: Image :raises Error: From fab96d222789c696c9b939097b1fc7de65b51235 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Fri, 28 Aug 2026 12:13:34 +0200 Subject: [PATCH 2/3] Update enums for future 8.19 --- pyvips/enums.py | 91 +++++++++++++++++++++++++++++++++++++++++++++--- pyvips/enums.pyi | 54 ++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 4 deletions(-) diff --git a/pyvips/enums.py b/pyvips/enums.py index 8d4eeb6..8446f59 100644 --- a/pyvips/enums.py +++ b/pyvips/enums.py @@ -58,8 +58,6 @@ class BlendMode(object): The Cairo docs have [a nice explanation of all the blend modes](https://www.cairographics.org/operators). -The non-separable modes are not implemented. - Attributes: CLEAR (str): where the second object is drawn, the first is removed @@ -112,6 +110,14 @@ class BlendMode(object): EXCLUSION (str): somewhat like DIFFERENCE, but lower-contrast + HUE (str): hue of the second, saturation and luminosity of the first + + SATURATION (str): saturation of the second, hue and luminosity of the first + + COLOUR (str): hue and saturation of the second, luminosity of the first + + LUMINOSITY (str): luminosity of the second, hue and saturation of the first + """ CLEAR = 'clear' @@ -139,6 +145,10 @@ class BlendMode(object): SOFT_LIGHT = 'soft-light' DIFFERENCE = 'difference' EXCLUSION = 'exclusion' + HUE = 'hue' + SATURATION = 'saturation' + COLOUR = 'colour' + LUMINOSITY = 'luminosity' class Coding(object): @@ -294,9 +304,9 @@ class OperationBoolean(object): EOR (str): `^` - LSHIFT (str): `>>` + LSHIFT (str): `<<` - RSHIFT (str): `<<` + RSHIFT (str): `>>` """ @@ -672,6 +682,8 @@ class Interesting(object): ALL (str): everything is interesting + SPECIFIC (str): use the specified point of interest + """ NONE = 'none' @@ -681,6 +693,7 @@ class Interesting(object): LOW = 'low' HIGH = 'high' ALL = 'all' + SPECIFIC = 'specific' class Angle(object): @@ -1295,6 +1308,76 @@ class Kernel(object): MKS2021 = 'mks2021' +class CICPColourPrimaries(object): + """CICPColourPrimaries. + +Attributes: + + """ + + BT709 = 'bt709' + UNSPECIFIED = 'unspecified' + BT470M = 'bt470m' + BT470BG = 'bt470bg' + BT601 = 'bt601' + SMPTE240 = 'smpte240' + GENERIC_FILM = 'generic-film' + BT2020 = 'bt2020' + SMPTE428 = 'smpte428' + DCI_P3 = 'dci-p3' + DISPLAY_P3 = 'display-p3' + EBU3213 = 'ebu3213' + + +class CICPTransferCharacteristics(object): + """CICPTransferCharacteristics. + +Attributes: + + """ + + BT709 = 'bt709' + UNSPECIFIED = 'unspecified' + BT470M = 'bt470m' + BT470BG = 'bt470bg' + BT601 = 'bt601' + SMPTE240 = 'smpte240' + LINEAR = 'linear' + LOG_100 = 'log-100' + LOG_100_SQRT10 = 'log-100-sqrt10' + IEC61966 = 'iec61966' + BT1361 = 'bt1361' + SRGB = 'srgb' + BT2020_10BIT = 'bt2020-10bit' + BT2020_12BIT = 'bt2020-12bit' + PQ = 'pq' + SMPTE428 = 'smpte428' + HLG = 'hlg' + + +class CICPMatrixCoefficients(object): + """CICPMatrixCoefficients. + +Attributes: + + """ + + RGB = 'rgb' + BT709 = 'bt709' + UNSPECIFIED = 'unspecified' + FCC = 'fcc' + BT470BG = 'bt470bg' + BT601 = 'bt601' + SMPTE240 = 'smpte240' + YCGCO = 'ycgco' + BT2020_NCL = 'bt2020-ncl' + BT2020_CL = 'bt2020-cl' + SMPTE2085 = 'smpte2085' + CHROMA_NCL = 'chroma-ncl' + CHROMA_CL = 'chroma-cl' + ICTCP = 'ictcp' + + class PCS(object): """PCS. diff --git a/pyvips/enums.pyi b/pyvips/enums.pyi index 9bee5dd..cf5f758 100644 --- a/pyvips/enums.pyi +++ b/pyvips/enums.pyi @@ -63,6 +63,59 @@ class BlendMode: SOFT_LIGHT: str = 'soft-light' DIFFERENCE: str = 'difference' EXCLUSION: str = 'exclusion' + HUE: str = 'hue' + SATURATION: str = 'saturation' + COLOUR: str = 'colour' + LUMINOSITY: str = 'luminosity' + +class CICPColourPrimaries: + BT709: str = 'bt709' + UNSPECIFIED: str = 'unspecified' + BT470M: str = 'bt470m' + BT470BG: str = 'bt470bg' + BT601: str = 'bt601' + SMPTE240: str = 'smpte240' + GENERIC_FILM: str = 'generic-film' + BT2020: str = 'bt2020' + SMPTE428: str = 'smpte428' + DCI_P3: str = 'dci-p3' + DISPLAY_P3: str = 'display-p3' + EBU3213: str = 'ebu3213' + +class CICPMatrixCoefficients: + RGB: str = 'rgb' + BT709: str = 'bt709' + UNSPECIFIED: str = 'unspecified' + FCC: str = 'fcc' + BT470BG: str = 'bt470bg' + BT601: str = 'bt601' + SMPTE240: str = 'smpte240' + YCGCO: str = 'ycgco' + BT2020_NCL: str = 'bt2020-ncl' + BT2020_CL: str = 'bt2020-cl' + SMPTE2085: str = 'smpte2085' + CHROMA_NCL: str = 'chroma-ncl' + CHROMA_CL: str = 'chroma-cl' + ICTCP: str = 'ictcp' + +class CICPTransferCharacteristics: + BT709: str = 'bt709' + UNSPECIFIED: str = 'unspecified' + BT470M: str = 'bt470m' + BT470BG: str = 'bt470bg' + BT601: str = 'bt601' + SMPTE240: str = 'smpte240' + LINEAR: str = 'linear' + LOG_100: str = 'log-100' + LOG_100_SQRT10: str = 'log-100-sqrt10' + IEC61966: str = 'iec61966' + BT1361: str = 'bt1361' + SRGB: str = 'srgb' + BT2020_10BIT: str = 'bt2020-10bit' + BT2020_12BIT: str = 'bt2020-12bit' + PQ: str = 'pq' + SMPTE428: str = 'smpte428' + HLG: str = 'hlg' class Coding: ERROR: str = 'error' @@ -218,6 +271,7 @@ class Interesting: LOW: str = 'low' HIGH: str = 'high' ALL: str = 'all' + SPECIFIC: str = 'specific' class Interpretation: ERROR: str = 'error' From 8e2d5146fb057705d6c288c33470b45dabaf24d6 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Fri, 28 Aug 2026 12:14:18 +0200 Subject: [PATCH 3/3] Update type stubs for future 8.19 --- examples/draw_line.py | 2 +- examples/generate_type_stubs.py | 1 + pyvips/__init__.pyi | 2 +- pyvips/vimage.pyi | 122 +++++++++++++++++++++++++++----- 4 files changed, 109 insertions(+), 18 deletions(-) diff --git a/examples/draw_line.py b/examples/draw_line.py index 814a9de..eade24e 100755 --- a/examples/draw_line.py +++ b/examples/draw_line.py @@ -17,4 +17,4 @@ def custom_draw(image, ink, x, y, client): im = pyvips.Image.black(100, 100) im = im.draw_line([100], 0, 0, 100, 0, - draw_point=cb, client=client) # type: ignore[call-arg] + draw_point=cb, client=client) diff --git a/examples/generate_type_stubs.py b/examples/generate_type_stubs.py index e94952c..e3c414f 100755 --- a/examples/generate_type_stubs.py +++ b/examples/generate_type_stubs.py @@ -284,6 +284,7 @@ def generate_vimage() -> str: """ from pathlib import Path +from pyvips import ffi from types import TracebackType from typing import Any, Protocol, TypeAlias diff --git a/pyvips/__init__.pyi b/pyvips/__init__.pyi index 12b24c2..5c91090 100644 --- a/pyvips/__init__.pyi +++ b/pyvips/__init__.pyi @@ -3,7 +3,7 @@ from collections.abc import Mapping from typing import Any, Callable from .base import leak_set as leak_set, shutdown as shutdown, version as version, get_suffixes as get_suffixes, at_least_libvips as at_least_libvips, type_find as type_find, type_name as type_name, nickname_find as nickname_find, type_from_name as type_from_name, type_map as type_map, values_for_enum as values_for_enum, values_for_flag as values_for_flag, enum_dict as enum_dict, flags_dict as flags_dict -from .enums import Access as Access, Align as Align, Angle as Angle, Angle45 as Angle45, BandFormat as BandFormat, BlendMode as BlendMode, Coding as Coding, Combine as Combine, CombineMode as CombineMode, CompassDirection as CompassDirection, Direction as Direction, Extend as Extend, FailOn as FailOn, ForeignDzContainer as ForeignDzContainer, ForeignDzDepth as ForeignDzDepth, ForeignDzLayout as ForeignDzLayout, ForeignHeifCompression as ForeignHeifCompression, ForeignHeifEncoder as ForeignHeifEncoder, ForeignKeep as ForeignKeep, ForeignPdfPageBox as ForeignPdfPageBox, ForeignPngFilter as ForeignPngFilter, ForeignPpmFormat as ForeignPpmFormat, ForeignSubsample as ForeignSubsample, ForeignTiffCompression as ForeignTiffCompression, ForeignTiffPredictor as ForeignTiffPredictor, ForeignTiffResunit as ForeignTiffResunit, ForeignWebpPreset as ForeignWebpPreset, Intent as Intent, Interesting as Interesting, Interpretation as Interpretation, Kernel as Kernel, OperationBoolean as OperationBoolean, OperationComplex as OperationComplex, OperationComplex2 as OperationComplex2, OperationComplexget as OperationComplexget, OperationMath as OperationMath, OperationMath2 as OperationMath2, OperationMorphology as OperationMorphology, OperationRelational as OperationRelational, OperationRound as OperationRound, PCS as PCS, Precision as Precision, RegionShrink as RegionShrink, SdfShape as SdfShape, Size as Size, TextWrap as TextWrap +from .enums import Access as Access, Align as Align, Angle as Angle, Angle45 as Angle45, BandFormat as BandFormat, BlendMode as BlendMode, CICPColourPrimaries as CICPColourPrimaries, CICPMatrixCoefficients as CICPMatrixCoefficients, CICPTransferCharacteristics as CICPTransferCharacteristics, Coding as Coding, Combine as Combine, CombineMode as CombineMode, CompassDirection as CompassDirection, Direction as Direction, Extend as Extend, FailOn as FailOn, ForeignDzContainer as ForeignDzContainer, ForeignDzDepth as ForeignDzDepth, ForeignDzLayout as ForeignDzLayout, ForeignHeifCompression as ForeignHeifCompression, ForeignHeifEncoder as ForeignHeifEncoder, ForeignKeep as ForeignKeep, ForeignPdfPageBox as ForeignPdfPageBox, ForeignPngFilter as ForeignPngFilter, ForeignPpmFormat as ForeignPpmFormat, ForeignSubsample as ForeignSubsample, ForeignTiffCompression as ForeignTiffCompression, ForeignTiffPredictor as ForeignTiffPredictor, ForeignTiffResunit as ForeignTiffResunit, ForeignWebpPreset as ForeignWebpPreset, Intent as Intent, Interesting as Interesting, Interpretation as Interpretation, Kernel as Kernel, OperationBoolean as OperationBoolean, OperationComplex as OperationComplex, OperationComplex2 as OperationComplex2, OperationComplexget as OperationComplexget, OperationMath as OperationMath, OperationMath2 as OperationMath2, OperationMorphology as OperationMorphology, OperationRelational as OperationRelational, OperationRound as OperationRound, PCS as PCS, Precision as Precision, RegionShrink as RegionShrink, SdfShape as SdfShape, Size as Size, TextWrap as TextWrap from .error import Error as Error, _to_bytes as _to_bytes, _to_string as _to_string, _to_string_copy as _to_string_copy from .gobject import GObject as GObject from .gvalue import GValue as GValue diff --git a/pyvips/vimage.pyi b/pyvips/vimage.pyi index 73935b7..0461118 100644 --- a/pyvips/vimage.pyi +++ b/pyvips/vimage.pyi @@ -9,6 +9,7 @@ To regenerate after libvips updates: """ from pathlib import Path +from pyvips import ffi from types import TracebackType from typing import Any, Protocol, TypeAlias @@ -16,7 +17,7 @@ import numpy as np # type: ignore[import-not-found] from PIL.Image import Image as PILImage # type: ignore -from .enums import Access as Access, Align as Align, Angle as Angle, Angle45 as Angle45, BandFormat as BandFormat, BlendMode as BlendMode, Coding as Coding, Combine as Combine, CombineMode as CombineMode, CompassDirection as CompassDirection, Direction as Direction, Extend as Extend, FailOn as FailOn, ForeignDzContainer as ForeignDzContainer, ForeignDzDepth as ForeignDzDepth, ForeignDzLayout as ForeignDzLayout, ForeignHeifCompression as ForeignHeifCompression, ForeignHeifEncoder as ForeignHeifEncoder, ForeignKeep as ForeignKeep, ForeignPdfPageBox as ForeignPdfPageBox, ForeignPngFilter as ForeignPngFilter, ForeignPpmFormat as ForeignPpmFormat, ForeignSubsample as ForeignSubsample, ForeignTiffCompression as ForeignTiffCompression, ForeignTiffPredictor as ForeignTiffPredictor, ForeignTiffResunit as ForeignTiffResunit, ForeignWebpPreset as ForeignWebpPreset, Intent as Intent, Interesting as Interesting, Interpretation as Interpretation, Kernel as Kernel, OperationBoolean as OperationBoolean, OperationComplex as OperationComplex, OperationComplex2 as OperationComplex2, OperationComplexget as OperationComplexget, OperationMath as OperationMath, OperationMath2 as OperationMath2, OperationMorphology as OperationMorphology, OperationRelational as OperationRelational, OperationRound as OperationRound, PCS as PCS, Precision as Precision, RegionShrink as RegionShrink, SdfShape as SdfShape, Size as Size, TextWrap as TextWrap +from .enums import Access as Access, Align as Align, Angle as Angle, Angle45 as Angle45, BandFormat as BandFormat, BlendMode as BlendMode, CICPColourPrimaries as CICPColourPrimaries, CICPMatrixCoefficients as CICPMatrixCoefficients, CICPTransferCharacteristics as CICPTransferCharacteristics, Coding as Coding, Combine as Combine, CombineMode as CombineMode, CompassDirection as CompassDirection, Direction as Direction, Extend as Extend, FailOn as FailOn, ForeignDzContainer as ForeignDzContainer, ForeignDzDepth as ForeignDzDepth, ForeignDzLayout as ForeignDzLayout, ForeignHeifCompression as ForeignHeifCompression, ForeignHeifEncoder as ForeignHeifEncoder, ForeignKeep as ForeignKeep, ForeignPdfPageBox as ForeignPdfPageBox, ForeignPngFilter as ForeignPngFilter, ForeignPpmFormat as ForeignPpmFormat, ForeignSubsample as ForeignSubsample, ForeignTiffCompression as ForeignTiffCompression, ForeignTiffPredictor as ForeignTiffPredictor, ForeignTiffResunit as ForeignTiffResunit, ForeignWebpPreset as ForeignWebpPreset, Intent as Intent, Interesting as Interesting, Interpretation as Interpretation, Kernel as Kernel, OperationBoolean as OperationBoolean, OperationComplex as OperationComplex, OperationComplex2 as OperationComplex2, OperationComplexget as OperationComplexget, OperationMath as OperationMath, OperationMath2 as OperationMath2, OperationMorphology as OperationMorphology, OperationRelational as OperationRelational, OperationRound as OperationRound, PCS as PCS, Precision as Precision, RegionShrink as RegionShrink, SdfShape as SdfShape, Size as Size, TextWrap as TextWrap from .error import Error as Error from .vinterpolate import Interpolate from .vobject import VipsObject @@ -165,6 +166,7 @@ class Image(VipsObject): def scaleimage(self, *, log: bool = ..., exp: float = ...) -> Image: ... # Dynamically generated operations + def CICP2scRGB(self) -> Image: ... def CMC2LCh(self) -> Image: ... def CMYK2XYZ(self) -> Image: ... def HSV2sRGB(self) -> Image: ... @@ -193,6 +195,8 @@ class Image(VipsObject): def addalpha(self) -> Image: ... def affine(self, matrix: list[float], *, interpolate: Interpolate = ..., oarea: list[int] = ..., odx: float = ..., ody: float = ..., idx: float = ..., idy: float = ..., background: list[float] = ..., premultiplied: bool = ..., extend: str | Extend = ...) -> Image: ... @staticmethod + def analyzeload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod def arrayjoin(in_: list[Image], *, across: int = ..., shim: int = ..., background: list[float] = ..., halign: str | Align = ..., valign: str | Align = ..., hspacing: int = ..., vspacing: int = ...) -> Image: ... def autorot(self, angle: bool = ..., flip: bool = ...) -> Image: ... def avg(self) -> float: ... @@ -235,12 +239,18 @@ class Image(VipsObject): def dE00(self, right: Image) -> Image: ... def dE76(self, right: Image) -> Image: ... def dECMC(self, right: Image) -> Image: ... + @staticmethod + def dcrawload(filename: str | Path, *, bitdepth: int = ..., half_size: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def dcrawload_buffer(buffer: _BufferLike, *, bitdepth: int = ..., half_size: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def dcrawload_source(source: Source, *, bitdepth: int = ..., half_size: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... def deviate(self) -> float: ... def divide(self, right: Image) -> Image: ... def draw_circle(self, ink: list[float], cx: int, cy: int, radius: int, *, fill: bool = ...) -> Image: ... def draw_flood(self, ink: list[float], x: int, y: int, *, test: Image = ..., equal: bool = ..., left: bool = ..., top: bool = ..., width: bool = ..., height: bool = ...) -> Image: ... def draw_image(self, sub: Image, x: int, y: int, *, mode: str | CombineMode = ...) -> Image: ... - def draw_line(self, ink: list[float], x1: int, y1: int, x2: int, y2: int) -> Image: ... + def draw_line(self, ink: list[float], x1: int, y1: int, x2: int, y2: int, *, draw_point: ffi.CData = ..., client: ffi.CData = ...) -> Image: ... def draw_mask(self, ink: list[float], mask: Image, x: int, y: int) -> Image: ... def draw_rect(self, ink: list[float], left: int, top: int, width: int, height: int, *, fill: bool = ...) -> Image: ... def draw_smudge(self, left: int, top: int, width: int, height: int) -> Image: ... @@ -256,12 +266,18 @@ class Image(VipsObject): def fastcor(self, ref: Image) -> Image: ... def fill_nearest(self, distance: bool = ...) -> Image: ... def find_trim(self, *, threshold: float = ..., background: list[float] = ..., line_art: bool = ...) -> tuple[int, int, int, int]: ... + @staticmethod + def fitsload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def fitsload_source(source: Source, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def fitssave(self, filename: str | Path, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... def flatten(self, *, background: list[float] = ..., max_alpha: float = ...) -> Image: ... def flip(self, direction: str | Direction) -> Image: ... def float2rad(self) -> Image: ... @staticmethod def fractsurf(width: int, height: int, fractal_dimension: float) -> Image: ... def freqmult(self, mask: Image) -> Image: ... + def fwfft(self) -> Image: ... def gamma(self, *, exponent: float = ...) -> Image: ... def gaussblur(self, sigma: float, *, min_ampl: float = ..., precision: str | Precision = ...) -> Image: ... @staticmethod @@ -313,8 +329,18 @@ class Image(VipsObject): def insert(self, sub: Image, x: int, y: int, *, expand: bool = ..., background: list[float] = ...) -> Image: ... def invert(self) -> Image: ... def invertlut(self, *, size: int = ...) -> Image: ... + def invfft(self, *, real: bool = ...) -> Image: ... def join(self, in2: Image, direction: str | Direction, *, expand: bool = ..., shim: int = ..., background: list[float] = ..., align: str | Align = ...) -> Image: ... @staticmethod + def jp2kload(filename: str | Path, *, page: int = ..., oneshot: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def jp2kload_buffer(buffer: _BufferLike, *, page: int = ..., oneshot: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def jp2kload_source(source: Source, *, page: int = ..., oneshot: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def jp2ksave(self, filename: str | Path, *, tile_width: int = ..., tile_height: int = ..., lossless: bool = ..., Q: int = ..., subsample_mode: str | ForeignSubsample = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def jp2ksave_buffer(self, *, tile_width: int = ..., tile_height: int = ..., lossless: bool = ..., Q: int = ..., subsample_mode: str | ForeignSubsample = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... + def jp2ksave_target(self, target: Target, *, tile_width: int = ..., tile_height: int = ..., lossless: bool = ..., Q: int = ..., subsample_mode: str | ForeignSubsample = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + @staticmethod def jpegload(filename: str | Path, *, shrink: int = ..., autorotate: bool = ..., unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @staticmethod def jpegload_buffer(buffer: _BufferLike, *, shrink: int = ..., autorotate: bool = ..., unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @@ -324,11 +350,28 @@ class Image(VipsObject): def jpegsave_buffer(self, *, Q: int = ..., optimize_coding: bool = ..., interlace: bool = ..., trellis_quant: bool = ..., overshoot_deringing: bool = ..., optimize_scans: bool = ..., quant_table: int = ..., subsample_mode: str | ForeignSubsample = ..., restart_interval: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... def jpegsave_mime(self, *, Q: int = ..., optimize_coding: bool = ..., interlace: bool = ..., trellis_quant: bool = ..., overshoot_deringing: bool = ..., optimize_scans: bool = ..., quant_table: int = ..., subsample_mode: str | ForeignSubsample = ..., restart_interval: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... def jpegsave_target(self, target: Target, *, Q: int = ..., optimize_coding: bool = ..., interlace: bool = ..., trellis_quant: bool = ..., overshoot_deringing: bool = ..., optimize_scans: bool = ..., quant_table: int = ..., subsample_mode: str | ForeignSubsample = ..., restart_interval: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + @staticmethod + def jxlload(filename: str | Path, *, page: int = ..., n: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def jxlload_buffer(buffer: _BufferLike, *, page: int = ..., n: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def jxlload_source(source: Source, *, page: int = ..., n: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def jxlsave(self, filename: str | Path, *, tier: int = ..., distance: float = ..., effort: int = ..., lossless: bool = ..., Q: int = ..., bitdepth: int = ..., interlace: bool = ..., progressive: bool = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def jxlsave_buffer(self, *, tier: int = ..., distance: float = ..., effort: int = ..., lossless: bool = ..., Q: int = ..., bitdepth: int = ..., interlace: bool = ..., progressive: bool = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... + def jxlsave_target(self, target: Target, *, tier: int = ..., distance: float = ..., effort: int = ..., lossless: bool = ..., Q: int = ..., bitdepth: int = ..., interlace: bool = ..., progressive: bool = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... def labelregions(self, segments: bool = ...) -> Image: ... def linear(self, a: list[float], b: list[float], *, uchar: bool = ...) -> Image: ... def linecache(self, *, tile_height: int = ..., access: str | Access = ..., threaded: bool = ..., persistent: bool = ...) -> Image: ... @staticmethod def logmat(sigma: float, min_ampl: float, *, separable: bool = ..., precision: str | Precision = ...) -> Image: ... + @staticmethod + def magickload(filename: str | Path, *, density: str = ..., page: int = ..., n: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def magickload_buffer(buffer: _BufferLike, *, density: str = ..., page: int = ..., n: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def magickload_source(source: Source, *, density: str = ..., page: int = ..., n: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def magicksave(self, filename: str | Path, *, format: str = ..., quality: int = ..., optimize_gif_frames: bool = ..., optimize_gif_transparency: bool = ..., bitdepth: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def magicksave_buffer(self, *, format: str = ..., quality: int = ..., optimize_gif_frames: bool = ..., optimize_gif_transparency: bool = ..., bitdepth: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... def mapim(self, index: Image, *, interpolate: Interpolate = ..., background: list[float] = ..., premultiplied: bool = ..., extend: str | Extend = ...) -> Image: ... def maplut(self, lut: Image, *, band: int = ...) -> Image: ... @staticmethod @@ -355,6 +398,8 @@ class Image(VipsObject): def math(self, math: str | OperationMath) -> Image: ... def math2(self, right: Image, math2: str | OperationMath2) -> Image: ... def math2_const(self, math2: str | OperationMath2, c: list[float]) -> Image: ... + @staticmethod + def matload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... def matrixinvert(self) -> Image: ... @staticmethod def matrixload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @@ -375,27 +420,71 @@ class Image(VipsObject): def mosaic1(self, sec: Image, direction: str | Direction, xr1: int, yr1: int, xs1: int, ys1: int, xr2: int, yr2: int, xs2: int, ys2: int, *, hwindow: int = ..., harea: int = ..., search: bool = ..., interpolate: Interpolate = ..., mblend: int = ...) -> Image: ... def msb(self, *, band: int = ...) -> Image: ... def multiply(self, right: Image) -> Image: ... + @staticmethod + def niftiload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def niftiload_source(source: Source, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def niftisave(self, filename: str | Path, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + @staticmethod + def openexrload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def openslideload(filename: str | Path, *, level: int = ..., autocrop: bool = ..., associated: str = ..., attach_associated: bool = ..., rgb: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def openslideload_source(source: Source, *, level: int = ..., autocrop: bool = ..., associated: str = ..., attach_associated: bool = ..., rgb: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def pdfload(filename: str | Path, *, page: int = ..., n: int = ..., dpi: float = ..., scale: float = ..., background: list[float] = ..., password: str = ..., page_box: str | ForeignPdfPageBox = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def pdfload_buffer(buffer: _BufferLike, *, page: int = ..., n: int = ..., dpi: float = ..., scale: float = ..., background: list[float] = ..., password: str = ..., page_box: str | ForeignPdfPageBox = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def pdfload_source(source: Source, *, page: int = ..., n: int = ..., dpi: float = ..., scale: float = ..., background: list[float] = ..., password: str = ..., page_box: str | ForeignPdfPageBox = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... def percent(self, percent: float) -> int: ... + def percent_lum(self, percent: float, *, max_: float = ...) -> float: ... @staticmethod def perlin(width: int, height: int, *, cell_size: int = ..., uchar: bool = ..., seed: int = ...) -> Image: ... def phasecor(self, in2: Image) -> Image: ... @staticmethod - def pngload(filename: str | Path, *, unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def pngload(filename: str | Path, *, page: int = ..., n: int = ..., unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @staticmethod - def pngload_buffer(buffer: _BufferLike, *, unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def pngload_buffer(buffer: _BufferLike, *, page: int = ..., n: int = ..., unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @staticmethod - def pngload_source(source: Source, *, unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def pngload_source(source: Source, *, page: int = ..., n: int = ..., unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... def pngsave(self, filename: str | Path, *, compression: int = ..., interlace: bool = ..., filter: int = ..., palette: bool = ..., Q: int = ..., dither: float = ..., bitdepth: int = ..., effort: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... def pngsave_buffer(self, *, compression: int = ..., interlace: bool = ..., filter: int = ..., palette: bool = ..., Q: int = ..., dither: float = ..., bitdepth: int = ..., effort: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... def pngsave_target(self, target: Target, *, compression: int = ..., interlace: bool = ..., filter: int = ..., palette: bool = ..., Q: int = ..., dither: float = ..., bitdepth: int = ..., effort: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... - def premultiply(self, *, max_alpha: float = ...) -> Image: ... + @staticmethod + def ppmload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def ppmload_buffer(buffer: _BufferLike, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def ppmload_source(source: Source, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def ppmsave(self, filename: str | Path, *, format: str | ForeignPpmFormat = ..., ascii: bool = ..., bitdepth: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def ppmsave_target(self, target: Target, *, format: str | ForeignPpmFormat = ..., ascii: bool = ..., bitdepth: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def premultiply(self, *, max_alpha: float = ..., uchar: bool = ...) -> Image: ... def prewitt(self) -> Image: ... def profile(self) -> tuple[Image, Image]: ... @staticmethod def profile_load(name: str) -> bytes: ... - def project(self) -> tuple[Image, Image]: ... + def project(self, *, combine: str | Combine = ...) -> tuple[Image, Image]: ... + @staticmethod + def qoiload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def qoiload_buffer(buffer: _BufferLike, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def qoiload_source(source: Source, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def qoisave(self, filename: str | Path, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def qoisave_buffer(self, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... + def qoisave_target(self, target: Target, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... def quadratic(self, coeff: Image, *, interpolate: Interpolate = ...) -> Image: ... def rad2float(self) -> Image: ... + @staticmethod + def radload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def radload_buffer(buffer: _BufferLike, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + @staticmethod + def radload_source(source: Source, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... + def radsave(self, filename: str | Path, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def radsave_buffer(self, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... + def radsave_target(self, target: Target, *, keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... def rank(self, width: int, height: int, index: int) -> Image: ... @staticmethod def rawload(filename: str | Path, width: int, height: int, bands: int, *, offset: int = ..., format: str | BandFormat = ..., interpretation: str | Interpretation = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @@ -420,6 +509,7 @@ class Image(VipsObject): def sRGB2HSV(self) -> Image: ... def sRGB2scRGB(self) -> Image: ... def scRGB2BW(self, *, depth: int = ...) -> Image: ... + def scRGB2CICP(self, *, colour_primaries: str | CICPColourPrimaries = ..., transfer_characteristics: str | CICPTransferCharacteristics = ..., matrix_coefficients: str | CICPMatrixCoefficients = ..., depth: int = ...) -> Image: ... def scRGB2XYZ(self) -> Image: ... def scRGB2sRGB(self, *, depth: int = ...) -> Image: ... def scharr(self) -> Image: ... @@ -434,7 +524,7 @@ class Image(VipsObject): def similarity(self, *, scale: float = ..., angle: float = ..., interpolate: Interpolate = ..., background: list[float] = ..., odx: float = ..., ody: float = ..., idx: float = ..., idy: float = ...) -> Image: ... @staticmethod def sines(width: int, height: int, *, uchar: bool = ..., hfreq: float = ..., vfreq: float = ...) -> Image: ... - def smartcrop(self, width: int, height: int, *, interesting: str | Interesting = ..., premultiplied: bool = ..., attention_x: bool = ..., attention_y: bool = ...) -> Image: ... + def smartcrop(self, width: int, height: int, *, interesting: str | Interesting = ..., interesting_x: int = ..., interesting_y: int = ..., premultiplied: bool = ..., attention_x: bool = ..., attention_y: bool = ...) -> Image: ... def sobel(self) -> Image: ... def spcor(self, ref: Image) -> Image: ... def spectrum(self) -> Image: ... @@ -457,12 +547,12 @@ class Image(VipsObject): @staticmethod def text(text: str, *, font: str = ..., width: int = ..., height: int = ..., align: str | Align = ..., justify: bool = ..., dpi: int = ..., spacing: int = ..., fontfile: str = ..., rgba: bool = ..., wrap: str | TextWrap = ..., autofit_dpi: bool = ...) -> Image: ... @staticmethod - def thumbnail(filename: str | Path, width: int, *, height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... + def thumbnail(filename: str | Path, width: int, *, height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., interesting_x: int = ..., interesting_y: int = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... @staticmethod - def thumbnail_buffer(buffer: _BufferLike, width: int, *, option_string: str = ..., height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... - def thumbnail_image(self, width: int, *, height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... + def thumbnail_buffer(buffer: _BufferLike, width: int, *, option_string: str = ..., height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., interesting_x: int = ..., interesting_y: int = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... + def thumbnail_image(self, width: int, *, height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., interesting_x: int = ..., interesting_y: int = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... @staticmethod - def thumbnail_source(source: Source, width: int, *, option_string: str = ..., height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... + def thumbnail_source(source: Source, width: int, *, option_string: str = ..., height: int = ..., size: str | Size = ..., no_rotate: bool = ..., crop: str | Interesting = ..., interesting_x: int = ..., interesting_y: int = ..., linear: bool = ..., input_profile: str | Path = ..., output_profile: str | Path = ..., intent: str | Intent = ..., fail_on: str | FailOn = ...) -> Image: ... @staticmethod def tiffload(filename: str | Path, *, page: int = ..., n: int = ..., autorotate: bool = ..., subifd: int = ..., unlimited: bool = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @staticmethod @@ -483,10 +573,10 @@ class Image(VipsObject): def uhdrload_buffer(buffer: _BufferLike, *, shrink: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @staticmethod def uhdrload_source(source: Source, *, shrink: int = ..., memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... - def uhdrsave(self, filename: str | Path, *, Q: int = ..., gainmap_scale_factor: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... - def uhdrsave_buffer(self, *, Q: int = ..., gainmap_scale_factor: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... - def uhdrsave_target(self, target: Target, *, Q: int = ..., gainmap_scale_factor: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... - def unpremultiply(self, *, max_alpha: float = ..., alpha_band: int = ...) -> Image: ... + def uhdrsave(self, filename: str | Path, *, Q: int = ..., gainmap_scale_factor: int = ..., peak_brightness: float = ..., max_content_boost: float = ..., optimize_coding: bool = ..., interlace: bool = ..., subsample_mode: str | ForeignSubsample = ..., trellis_quant: bool = ..., overshoot_deringing: bool = ..., optimize_scans: bool = ..., quant_table: int = ..., restart_interval: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def uhdrsave_buffer(self, *, Q: int = ..., gainmap_scale_factor: int = ..., peak_brightness: float = ..., max_content_boost: float = ..., optimize_coding: bool = ..., interlace: bool = ..., subsample_mode: str | ForeignSubsample = ..., trellis_quant: bool = ..., overshoot_deringing: bool = ..., optimize_scans: bool = ..., quant_table: int = ..., restart_interval: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> bytes: ... + def uhdrsave_target(self, target: Target, *, Q: int = ..., gainmap_scale_factor: int = ..., peak_brightness: float = ..., max_content_boost: float = ..., optimize_coding: bool = ..., interlace: bool = ..., subsample_mode: str | ForeignSubsample = ..., trellis_quant: bool = ..., overshoot_deringing: bool = ..., optimize_scans: bool = ..., quant_table: int = ..., restart_interval: int = ..., keep: int = ..., background: list[float] = ..., page_height: int = ..., profile: str | Path = ...) -> None: ... + def unpremultiply(self, *, max_alpha: float = ..., alpha_band: int = ..., uchar: bool = ...) -> Image: ... @staticmethod def vipsload(filename: str | Path, *, memory: bool = ..., access: str | Access = ..., fail_on: str | FailOn = ..., revalidate: bool = ..., flags: bool = ...) -> Image: ... @staticmethod