Skip to content

Upgrading pillow 10 to 11

Breaking10.4.0 → 11.3.0Breaking9Security4Platform4Deprecated9New34Changed141Fixed80Other287

BreakingUpgrade verdict

9 breaking changes and 4 platform requirement changes and 3 security fixes.

  • Removes the ImageCmsProfile._set method.
  • Removes ImageTk._show.
  • Removes the debug Image._wedge.
  • Build-time feature flags starting with WITH_ are gone from the C extension.
Top 5 of 25 that need code or config changes

Python requirement changed in 11.0.0: >=3.8 → >=3.9.

Breaking9
Removes the ImageCmsProfile._set method.
ImageCmsProfile._set
Removes ImageTk._show.
ImageTk._show
Removes the debug Image._wedge.
Image._wedge
Removes all WITH_* flags from _imaging.c and other flags.
_imaging.cWITH_*
Removes the unused _util.is_directory function.
_util.is_directory
Removes PSFile, PyAccess and USE_CFFI_ACCESS.
PSFilePyAccessUSE_CFFI_ACCESS
Removes WebP support without anim, mux/demux, and with buggy alpha.
WebP
Removes the unused TiffImagePlugin IFD_LEGACY_API.
TiffImagePluginIFD_LEGACY_API
Requires the font parameter in FreeTypeFont and truetype().
FreeTypeFonttruetype()
Security3
Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a sufficiently large (>64k encoded with default settings) image in the DDS format due to writing into a buffer without checking for available space. This only affects users who save untrusted data as a compressed DDS image. This issue has been patched in version 11.3.0.
DDS
Applies security fixes to GitHub Actions.
Adds zizmor to pre-commit and fixes potential cache-poisoning in wheels workflow.
zizmor
Platform4
Improves support for Python 3.14.
Drops support for Python 3.8.
Updates the macOS deployment target for Python 3.12 and later on Intel to 10.13.
Adds support for Python 3.13.
Deprecated9
Deprecates the fromarray mode argument.
fromarray
Deprecates saving I mode images as PNG.
Moves get_child_images() to ImageFile.
get_child_images()ImageFile
Restores Makernote as a deprecated enum.
Makernote
Deprecates ICNS (width, height, scale) sizes in favour of load(scale).
ICNSload(scale)
Deprecates isImageType.
isImageType
Deprecates support for FreeType 2.9.0.
FreeType 2.9.0
Deprecates JpegImageFile huffman_ac and huffman_dc.
JpegImageFile.huffman_acJpegImageFile.huffman_dc
Deprecates ImageMath lambda_eval and unsafe_eval options argument.
ImageMath.lambda_evalImageMath.unsafe_eval

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: class AvifImageFile(ImageFile.ImageFile)
  • added: field AvifImageFile.format
  • added: field AvifImageFile.format_description
  • added: function get_codec_version(codec_name: str) -> str | None
  • added: method AvifImageFile.load() -> Image.core.PixelAccess | None
  • added: method AvifImageFile.load_seek(pos: int) -> None
  • added: method AvifImageFile.seek(frame: int) -> None
  • added: method AvifImageFile.tell() -> int
  • added: variable DECODE_CODEC_CHOICE
  • added: variable DEFAULT_MAX_THREADS
  • added: variable SUPPORTED
  • removed: variable bdf_slant
  • removed: variable bdf_spacing
  • changed: method BmpRleDecoder.decode(buffer: bytes) -> tuple[int, int] → method BmpRleDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • added: variable USE_RAW_ALPHA
  • changed: class ContainerIO(Generic[AnyStr]) → class ContainerIO(IO[AnyStr])
  • changed: method ContainerIO.readline() -> AnyStr → method ContainerIO.readline(n: int=…) -> AnyStr
  • changed: method ContainerIO.readlines() -> list[AnyStr] → method ContainerIO.readlines(n: int | None=…) -> list[AnyStr]
  • changed: method ContainerIO.seek(offset: int, mode: Literal[0, 1, 2]=…) -> None → method ContainerIO.seek(offset: int, mode: int=…) -> int
  • added: method ContainerIO.close() -> None
  • added: method ContainerIO.fileno() -> int
  • added: method ContainerIO.flush() -> None
  • added: method ContainerIO.readable() -> bool
  • added: method ContainerIO.seekable() -> bool
  • added: method ContainerIO.truncate(size: int | None=…) -> int
  • added: method ContainerIO.writable() -> bool
  • added: method ContainerIO.write(b: AnyStr) -> NoReturn
  • added: method ContainerIO.writelines(lines: Iterable[AnyStr]) -> NoReturn
  • changed: method DdsRgbDecoder.decode(buffer: bytes) -> tuple[int, int] → method DdsRgbDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • removed: class PSFile
  • removed: constructor PSFile(fp)
  • removed: method PSFile.readline() -> str
  • removed: method PSFile.seek(offset, whence=…)
  • changed: function Ghostscript(tile, size, fp, scale=…, transparency=…) → function Ghostscript(tile: list[ImageFile._Tile], size: tuple[int, int], fp: IO[bytes], scale: int=…, transparency: bool=…) -> Image.core.ImagingCore
  • changed: method EpsImageFile.load(scale=…, transparency=…) → method EpsImageFile.load(scale: int=…, transparency: bool=…) -> Image.core.PixelAccess | None
  • added: field IFD.MakerNote
  • changed: method FitsGzipDecoder.decode(buffer: bytes) -> tuple[int, int] → method FitsGzipDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • changed: method FpxImageFile.load() → method FpxImageFile.load() -> Image.core.PixelAccess | None
  • changed: method GbrImageFile.load() → method GbrImageFile.load() -> Image.core.PixelAccess | None
  • added: variable TYPE_CHECKING
  • added: static method GimpPaletteFile.frombytes(data: bytes) -> GimpPaletteFile
  • removed: property IcnsImageFile.size
  • changed: constructor IcnsFile(fobj) → constructor IcnsFile(fobj: IO[bytes]) -> None
  • changed: function nextheader(fobj) → function nextheader(fobj: IO[bytes]) -> tuple[bytes, int]
  • changed: function read_32(fobj, start_length, size) → function read_32(fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int]) -> dict[str, Image.Image]
  • changed: function read_32t(fobj, start_length, size) → function read_32t(fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int]) -> dict[str, Image.Image]
  • changed: function read_mk(fobj, start_length, size) → function read_mk(fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int]) -> dict[str, Image.Image]
  • changed: function read_png_or_jpeg2000(fobj, start_length, size) → function read_png_or_jpeg2000(fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int]) -> dict[str, Image.Image]
  • changed: method IcnsFile.bestsize() → method IcnsFile.bestsize() -> tuple[int, int, int]
  • changed: method IcnsFile.dataforsize(size) → method IcnsFile.dataforsize(size: tuple[int, int, int]) -> dict[str, Image.Image]
  • changed: method IcnsFile.getimage(size=…) → method IcnsFile.getimage(size: tuple[int, int] | tuple[int, int, int] | None=…) -> Image.Image
  • changed: method IcnsFile.itersizes() → method IcnsFile.itersizes() -> list[tuple[int, int, int]]
  • changed: method IcnsImageFile.load() → method IcnsImageFile.load(scale: int | None=…) -> Image.core.PixelAccess | None
  • added: property IcnsImageFile.size -> tuple[int, int] | tuple[int, int, int]
  • removed: property IcoImageFile.size
  • changed: constructor IcoFile(buf) → constructor IcoFile(buf: IO[bytes]) -> None
  • changed: method IcoFile.getentryindex(size, bpp=…) → method IcoFile.getentryindex(size: tuple[int, int], bpp: int | bool=…) -> int
  • changed: method IcoFile.getimage(size, bpp=…) → method IcoFile.getimage(size: tuple[int, int], bpp: int | bool=…) -> Image.Image
  • changed: method IcoFile.sizes() → method IcoFile.sizes() -> set[tuple[int, int]]
  • changed: method IcoImageFile.load() → method IcoImageFile.load() -> Image.core.PixelAccess | None
  • added: class IconHeader(NamedTuple)
  • added: field IconHeader.bpp: int
  • added: field IconHeader.color_depth: int
  • added: field IconHeader.dim: tuple[int, int]
  • added: field IconHeader.height: int
  • added: field IconHeader.nb_color: int
  • added: field IconHeader.offset: int
  • added: field IconHeader.planes: int
  • added: field IconHeader.reserved: int
  • added: field IconHeader.size: int
  • added: field IconHeader.square: int
  • added: field IconHeader.width: int
  • added: property IcoImageFile.size -> tuple[int, int]
  • removed: variable USE_CFFI_ACCESS
  • removed: variable cffi
  • removed: variable cffi: ModuleType | None
  • changed: class ImagePointHandler → class ImagePointHandler(abc.ABC)
  • changed: class ImageTransformHandler → class ImageTransformHandler(abc.ABC)
  • changed: constructor Exif() → constructor Exif() -> None
  • changed: constructor Image() → constructor Image() -> None
  • changed: field Exif.endian → field Exif.endian: str | None
  • changed: function eval(image, *args) → function eval(image: Image, *args: Callable[[int], float]) -> Image
  • changed: function frombuffer(mode: str, size: tuple[int, int], data, decoder_name: str=…, *args: Any) -> Image → function frombuffer(mode: str, size: tuple[int, int], data: bytes | SupportsArrayInterface, decoder_name: str=…, *args: Any) -> Image
  • changed: function frombytes(mode: str, size: tuple[int, int], data: bytes | bytearray, decoder_name: str=…, *args: Any) -> Image → function frombytes(mode: str, size: tuple[int, int], data: bytes | bytearray | SupportsArrayInterface, decoder_name: str=…, *args: Any) -> Image
  • changed: function fromqimage(im) → function fromqimage(im: ImageQt.QImage) -> ImageFile.ImageFile
  • changed: function fromqpixmap(im) → function fromqpixmap(im: ImageQt.QPixmap) -> ImageFile.ImageFile
  • changed: function register_open(id: str, factory: Callable[[IO[bytes], str | bytes], ImageFile.ImageFile], accept: Callable[[bytes], bool | str] | None=…) -> None → function register_open(id: str, factory: Callable[[IO[bytes], str | bytes], ImageFile.ImageFile] | type[ImageFile.ImageFile], accept: Callable[[bytes], bool | str] | None=…) -> None
  • changed: method Exif.get_ifd(tag) → method Exif.get_ifd(tag: int) -> dict[int, Any]
  • changed: method Exif.load(data) → method Exif.load(data: bytes) -> None
  • changed: method Exif.load_from_fp(fp, offset=…) → method Exif.load_from_fp(fp: IO[bytes], offset: int | None=…) -> None
  • changed: method Image.entropy(mask=…, extrema=…) → method Image.entropy(mask: Image | None=…, extrema: tuple[float, float] | None=…) -> float
  • changed: method Image.frombytes(data: bytes | bytearray, decoder_name: str=…, *args: Any) -> None → method Image.frombytes(data: bytes | bytearray | SupportsArrayInterface, decoder_name: str=…, *args: Any) -> None
  • changed: method Image.getcolors(maxcolors: int=…) → method Image.getcolors(maxcolors: int=…) -> list[tuple[int, tuple[int, ...]]] | list[tuple[int, float]] | None
  • changed: method Image.getdata(band: int | None=…) → method Image.getdata(band: int | None=…) -> core.ImagingCore
  • changed: method Image.getim() → method Image.getim() -> CapsuleType
  • changed: method Image.getxmp() → method Image.getxmp() -> dict[str, Any]
  • changed: method Image.histogram(mask: Image | None=…, extrema=…) -> list[int] → method Image.histogram(mask: Image | None=…, extrema: tuple[float, float] | None=…) -> list[int]
  • changed: method Image.load() -> core.PixelAccess | PyAccess.PyAccess | None → method Image.load() -> core.PixelAccess | None
  • changed: method Image.point(lut: Sequence[float] | Callable[[int], float] | ImagePointHandler, mode: str | None=…) -> Image → method Image.point(lut: Sequence[float] | NumpyArray | Callable[[int], float] | Callable[[ImagePointTransform], ImagePointTransform | float] | ImagePointHandler, mode: str | None=…) -> Image
  • changed: method Image.putdata(data: Sequence[float] | Sequence[Sequence[int]], scale: float=…, offset: float=…) -> None → method Image.putdata(data: Sequence[float] | Sequence[Sequence[int]] | core.ImagingCore | NumpyArray, scale: float=…, offset: float=…) -> None
  • changed: method Image.putpalette(data, rawmode=…) -> None → method Image.putpalette(data: ImagePalette.ImagePalette | bytes | Sequence[int], rawmode: str=…) -> None
  • changed: method Image.quantize(colors: int=…, method: int | None=…, kmeans: int=…, palette=…, dither: Dither=…) -> Image → method Image.quantize(colors: int=…, method: int | None=…, kmeans: int=…, palette: Image | None=…, dither: Dither=…) -> Image
  • changed: method Image.remap_palette(dest_map, source_palette=…) → method Image.remap_palette(dest_map: list[int], source_palette: bytes | bytearray | None=…) -> Image
  • changed: method Image.resize(size: tuple[int, int], resample: int | None=…, box: tuple[float, float, float, float] | None=…, reducing_gap: float | None=…) -> Image → method Image.resize(size: tuple[int, int] | list[int] | NumpyArray, resample: int | None=…, box: tuple[float, float, float, float] | None=…, reducing_gap: float | None=…) -> Image
  • changed: method Image.toqimage() → method Image.toqimage() -> ImageQt.ImageQt
  • changed: method Image.toqpixmap() → method Image.toqpixmap() -> ImageQt.QPixmap
  • added: class ImagePointTransform
  • added: class SupportsArrowArrayInterface(Protocol)
  • added: constructor ImagePointTransform(scale: float, offset: float) -> None
  • added: function fromarrow(obj: SupportsArrowArrayInterface, mode: str, size: tuple[int, int]) -> Image
  • added: property Image.im -> core.ImagingCore
  • added: property Image.readonly -> int
  • added: variable TYPE_CHECKING
  • removed: variable Outline: Callable[[], Image.core._Outline] | None
  • changed: method ImageDraw.multiline_text(xy: tuple[float, float], text: str, fill=…, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, anchor=…, spacing=…, align=…, direction=…, features=…, language=…, stroke_width=…, stroke_fill=…, embedded_color=…, *, font_size=…) -> None → method ImageDraw.multiline_text(xy: tuple[float, float], text: AnyStr, fill: _Ink | None=…, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, anchor: str | None=…, spacing: float=…, align: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, stroke_width: float=…, stroke_fill: _Ink | None=…, embedded_color: bool=…, *, font_siz…
  • changed: method ImageDraw.multiline_textbbox(xy, text, font=…, anchor=…, spacing=…, align=…, direction=…, features=…, language=…, stroke_width=…, embedded_color=…, *, font_size=…) -> tuple[int, int, int, int] → method ImageDraw.multiline_textbbox(xy: tuple[float, float], text: AnyStr, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, anchor: str | None=…, spacing: float=…, align: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, stroke_width: float=…, embedded_color: bool=…, *, font_size: float | None=…) -> tuple[float, float, flo…
  • changed: method ImageDraw.text(xy: tuple[float, float], text: str, fill=…, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, anchor=…, spacing=…, align=…, direction=…, features=…, language=…, stroke_width=…, stroke_fill=…, embedded_color=…, *args, **kwargs) -> None → method ImageDraw.text(xy: tuple[float, float], text: AnyStr, fill: _Ink | None=…, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, anchor: str | None=…, spacing: float=…, align: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, stroke_width: float=…, stroke_fill: _Ink | None=…, embedded_color: bool=…, *args: Any, **kwargs:…
  • changed: method ImageDraw.textbbox(xy, text, font=…, anchor=…, spacing=…, align=…, direction=…, features=…, language=…, stroke_width=…, embedded_color=…, *, font_size=…) -> tuple[int, int, int, int] → method ImageDraw.textbbox(xy: tuple[float, float], text: AnyStr, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, anchor: str | None=…, spacing: float=…, align: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, stroke_width: float=…, embedded_color: bool=…, *, font_size: float | None=…) -> tuple[float, float, float, float]
  • changed: method ImageDraw.textlength(text: str, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, direction=…, features=…, language=…, embedded_color=…, *, font_size=…) -> float → method ImageDraw.textlength(text: AnyStr, font: ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, embedded_color: bool=…, *, font_size: float | None=…) -> float
  • changed: variable Outline → variable Outline: Callable[[], Image.core._Outline]
  • added: variable TYPE_CHECKING
  • changed: method Draw.arc(xy, start, end, *options) → method Draw.arc(xy: Coords, pen: Pen | Brush | None, start: float, end: float, *options: Any) -> None
  • changed: method Draw.chord(xy, start, end, *options) → method Draw.chord(xy: Coords, pen: Pen | Brush | None, start: float, end: float, *options: Any) -> None
  • changed: method Draw.ellipse(xy, *options) → method Draw.ellipse(xy: Coords, pen: Pen | Brush | None, *options: Any) -> None
  • changed: method Draw.line(xy, *options) → method Draw.line(xy: Coords, pen: Pen | Brush | None, *options: Any) -> None
  • changed: method Draw.pieslice(xy, start, end, *options) → method Draw.pieslice(xy: Coords, pen: Pen | Brush | None, start: float, end: float, *options: Any) -> None
  • changed: method Draw.polygon(xy, *options) → method Draw.polygon(xy: Coords, pen: Pen | Brush | None, *options: Any) -> None
  • changed: method Draw.rectangle(xy, *options) → method Draw.rectangle(xy: Coords, pen: Pen | Brush | None, *options: Any) -> None
  • changed: method Draw.render(op, xy, pen, brush=…) → method Draw.render(op: str, xy: Coords, pen: Pen | Brush | None, brush: Brush | Pen | None=…, **kwargs: Any) -> None
  • changed: method Draw.settransform(offset) → method Draw.settransform(offset: tuple[float, float]) -> None
  • changed: method Draw.text(xy, text, font) → method Draw.text(xy: tuple[float, float], text: AnyStr, font: Font) -> None
  • changed: method Draw.textbbox(xy, text, font) → method Draw.textbbox(xy: tuple[float, float], text: AnyStr, font: Font) -> tuple[float, float, float, float]
  • changed: method Draw.textlength(text, font) → method Draw.textlength(text: AnyStr, font: Font) -> float
  • changed: class StubHandler → class StubHandler(abc.ABC)
  • changed: constructor ImageFile(fp=…, filename=…) → constructor ImageFile(fp: StrOrBytesPath | IO[bytes], filename: str | bytes | None=…) -> None
  • changed: constructor PyCodec(mode, *args) → constructor PyCodec(mode: str, *args: Any) -> None
  • changed: field Parser.data → field Parser.data: bytes | None
  • changed: field Parser.decoder → field Parser.decoder: Image.core.ImagingDecoder | PyDecoder | None
  • changed: method ImageFile.load() → method ImageFile.load() -> Image.core.PixelAccess | None
  • changed: method Parser.close() → method Parser.close() -> Image.Image
  • changed: method Parser.feed(data) → method Parser.feed(data: bytes) -> None
  • changed: method PyCodec.init(args) → method PyCodec.init(args: tuple[Any, ...]) -> None
  • changed: method PyCodec.setfd(fd) → method PyCodec.setfd(fd: IO[bytes]) -> None
  • changed: method PyCodec.setimage(im, extents: tuple[int, int, int, int] | None=…) -> None → method PyCodec.setimage(im: Image.core.ImagingCore, extents: tuple[int, int, int, int] | None=…) -> None
  • changed: method PyDecoder.decode(buffer: bytes) -> tuple[int, int] → method PyDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • changed: method PyDecoder.set_as_raw(data: bytes, rawmode=…) -> None → method PyDecoder.set_as_raw(data: bytes, rawmode: str | None=…, extra: tuple[Any, ...]=…) -> None
  • changed: method PyEncoder.encode_to_file(fh, bufsize) → method PyEncoder.encode_to_file(fh: int, bufsize: int) -> int
  • changed: method StubImageFile.load() → method StubImageFile.load() -> Image.core.PixelAccess | None
  • added: method ImageFile.close() -> None
  • added: method ImageFile.get_child_images() -> list[ImageFile]
  • added: variable TYPE_CHECKING
  • added: variable logger
  • changed: class Filter → class Filter(abc.ABC)
  • added: variable TYPE_CHECKING
  • changed: constructor FreeTypeFont(font: StrOrBytesPath | BinaryIO | None=…, size: float=…, index: int=…, encoding: str=…, layout_engine: Layout | None=…) -> None → constructor FreeTypeFont(font: StrOrBytesPath | BinaryIO, size: float=…, index: int=…, encoding: str=…, layout_engine: Layout | None=…) -> None
  • changed: constructor TransposedFont(font, orientation=…) → constructor TransposedFont(font: ImageFont | FreeTypeFont, orientation: Image.Transpose | None=…)
  • changed: function truetype(font: StrOrBytesPath | BinaryIO | None=…, size: float=…, index: int=…, encoding: str=…, layout_engine: Layout | None=…) -> FreeTypeFont → function truetype(font: StrOrBytesPath | BinaryIO, size: float=…, index: int=…, encoding: str=…, layout_engine: Layout | None=…) -> FreeTypeFont
  • changed: method FreeTypeFont.font_variant(font=…, size=…, index=…, encoding=…, layout_engine=…) → method FreeTypeFont.font_variant(font: StrOrBytesPath | BinaryIO | None=…, size: float | None=…, index: int | None=…, encoding: str | None=…, layout_engine: Layout | None=…) -> FreeTypeFont
  • changed: method FreeTypeFont.get_variation_axes() → method FreeTypeFont.get_variation_axes() -> list[Axis]
  • changed: method FreeTypeFont.getlength(text: str | bytes, mode=…, direction=…, features=…, language=…) -> float → method FreeTypeFont.getlength(text: str | bytes, mode: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…) -> float
  • changed: method FreeTypeFont.getmask(text, mode=…, direction=…, features=…, language=…, stroke_width=…, anchor=…, ink=…, start=…) → method FreeTypeFont.getmask(text: str | bytes, mode: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, stroke_width: float=…, anchor: str | None=…, ink: int=…, start: tuple[float, float] | None=…) -> Image.core.ImagingCore
  • changed: method FreeTypeFont.getmask2(text: str | bytes, mode=…, direction=…, features=…, language=…, stroke_width=…, anchor=…, ink=…, start=…, *args, **kwargs) → method FreeTypeFont.getmask2(text: str | bytes, mode: str=…, direction: str | None=…, features: list[str] | None=…, language: str | None=…, stroke_width: float=…, anchor: str | None=…, ink: int=…, start: tuple[float, float] | None=…, *args: Any, **kwargs: Any) -> tuple[Image.core.ImagingCore, tuple[int, int]]
  • changed: method FreeTypeFont.set_variation_by_name(name) → method FreeTypeFont.set_variation_by_name(name: str | bytes) -> None
  • changed: method ImageFont.getmask(text, mode=…, *args, **kwargs) → method ImageFont.getmask(text: str | bytes, mode: str=…, *args: Any, **kwargs: Any) -> Image.core.ImagingCore
  • changed: method TransposedFont.getbbox(text, *args, **kwargs) → method TransposedFont.getbbox(text: str | bytes, *args: Any, **kwargs: Any) -> tuple[int, int, float, float]
  • changed: method TransposedFont.getlength(text: str | bytes, *args, **kwargs) -> float → method TransposedFont.getlength(text: str | bytes, *args: Any, **kwargs: Any) -> float
  • changed: method TransposedFont.getmask(text, mode=…, *args, **kwargs) → method TransposedFont.getmask(text: str | bytes, mode: str=…, *args: Any, **kwargs: Any) -> Image.core.ImagingCore
  • added: class Axis(TypedDict)
  • added: field Axis.default: int | None
  • added: field Axis.maximum: int | None
  • added: field Axis.minimum: int | None
  • added: field Axis.name: bytes | None
  • added: variable TYPE_CHECKING
  • changed: function grab(bbox: tuple[int, int, int, int] | None=…, include_layered_windows: bool=…, all_screens: bool=…, xdisplay: str | None=…) -> Image.Image → function grab(bbox: tuple[int, int, int, int] | None=…, include_layered_windows: bool=…, all_screens: bool=…, xdisplay: str | None=…, window: int | ImageWin.HWND | None=…) -> Image.Image
  • added: variable TYPE_CHECKING
  • changed: function exif_transpose(image: Image.Image, *, in_place: bool=…) -> Image.Image | None → function exif_transpose(image: Image.Image, *, in_place: Literal[True]) -> None | (image: Image.Image, *, in_place: Literal[False]=…) -> Image.Image
  • changed: function raw(rawmode, data: Sequence[int] | bytes | bytearray) -> ImagePalette → function raw(rawmode: str, data: Sequence[int] | bytes | bytearray) -> ImagePalette
  • added: variable TYPE_CHECKING
  • changed: constructor ImageQt(im) → constructor ImageQt(im: Image.Image | str | QByteArray) -> None
  • changed: function align8to32(bytes, width, mode) → function align8to32(bytes: bytes, width: int, mode: str) -> bytes
  • changed: function fromqimage(im) → function fromqimage(im: QImage | QPixmap) -> ImageFile.ImageFile
  • changed: function fromqpixmap(im) → function fromqpixmap(im: QPixmap) -> ImageFile.ImageFile
  • changed: function rgb(r, g, b, a=…) → function rgb(r: int, g: int, b: int, a: int=…) -> int
  • changed: function toqimage(im) -> ImageQt → function toqimage(im: Image.Image | str | QByteArray) -> ImageQt
  • changed: function toqpixmap(im) → function toqpixmap(im: Image.Image | str | QByteArray) -> QPixmap
  • added: variable QBuffer: type
  • added: variable QByteArray
  • added: variable QIODevice
  • added: variable QImage
  • added: variable QPixmap
  • added: variable TYPE_CHECKING
  • changed: constructor Iterator(im: Image.Image) → constructor Iterator(im: Image.Image) -> None
  • changed: class UnixViewer(Viewer) → class UnixViewer(abc.ABC, Viewer)
  • changed: function register(viewer, order: int=…) -> None → function register(viewer: type[Viewer] | Viewer, order: int=…) -> None
  • changed: constructor BitmapImage(image=…, **kw) → constructor BitmapImage(image: Image.Image | None=…, **kw: Any) -> None
  • changed: constructor PhotoImage(image=…, size=…, **kw) → constructor PhotoImage(image: Image.Image | str | None=…, size: tuple[int, int] | None=…, **kw: Any) -> None
  • added: variable TYPE_CHECKING
  • changed: constructor Dib(image: Image.Image | str, size: tuple[int, int] | list[int] | None=…) -> None → constructor Dib(image: Image.Image | str, size: tuple[int, int] | None=…) -> None
  • changed: constructor ImageWindow(image, title=…) → constructor ImageWindow(image: Image.Image | Dib, title: str=…) -> None
  • changed: method Dib.draw(handle, dst, src=…) → method Dib.draw(handle: int | HDC | HWND, dst: tuple[int, int, int, int], src: tuple[int, int, int, int] | None=…) -> None
  • changed: method Dib.expose(handle) → method Dib.expose(handle: int | HDC | HWND) -> None
  • changed: method Dib.query_palette(handle) → method Dib.query_palette(handle: int | HDC | HWND) -> int
  • changed: method ImageWindow.ui_handle_repair(dc, x0, y0, x1, y1) → method ImageWindow.ui_handle_repair(dc: int, x0: int, y0: int, x1: int, y1: int) -> None
  • changed: method Window.ui_handle_clear(dc, x0, y0, x1, y1) → method Window.ui_handle_clear(dc: int, x0: int, y0: int, x1: int, y1: int) -> None
  • changed: method Window.ui_handle_damage(x0, y0, x1, y1) → method Window.ui_handle_damage(x0: int, y0: int, x1: int, y1: int) -> None
  • changed: method Window.ui_handle_repair(dc, x0, y0, x1, y1) → method Window.ui_handle_repair(dc: int, x0: int, y0: int, x1: int, y1: int) -> None
  • changed: method Window.ui_handle_resize(width, height) → method Window.ui_handle_resize(width: int, height: int) -> None
  • changed: function getiptcinfo(im) → function getiptcinfo(im: ImageFile.ImageFile) -> dict[tuple[int, int], bytes | list[bytes]] | None
  • changed: method IptcImageFile.load() → method IptcImageFile.load() -> Image.core.PixelAccess | None
  • removed: property Jpeg2KImageFile.reduce
  • changed: constructor BoxReader(fp, length=…) → constructor BoxReader(fp: IO[bytes], length: int=…) -> None
  • changed: method Jpeg2KImageFile.load() → method Jpeg2KImageFile.load() -> Image.core.PixelAccess | None
  • added: property Jpeg2KImageFile.reduce -> Callable[[int | tuple[int, int], tuple[int, int, int, int] | None], Image.Image] | int
  • changed: function APP(self, marker) → function APP(self: JpegImageFile, marker: int) -> None
  • changed: function get_sampling(im) → function get_sampling(im: Image.Image) -> int
  • changed: function jpeg_factory(fp=…, filename=…) → function jpeg_factory(fp: IO[bytes], filename: str | bytes | None=…) -> JpegImageFile | MpoImageFile
  • added: variable TYPE_CHECKING
  • changed: method MicImageFile.seek(frame) → method MicImageFile.seek(frame: int) -> None
  • changed: static method MpoImageFile.adopt(jpeg_instance, mpheader=…) → static method MpoImageFile.adopt(jpeg_instance: JpegImagePlugin.JpegImageFile, mpheader: dict[int, Any] | None=…) -> MpoImageFile
  • changed: method MspDecoder.decode(buffer: bytes) -> tuple[int, int] → method MspDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • changed: constructor PSDraw(fp=…) → constructor PSDraw(fp: IO[bytes] | None=…) -> None
  • added: variable TYPE_CHECKING
  • changed: class PdfArray(List[Any]) → class PdfArray(list[Any])
  • changed: constructor PdfBinary(data) → constructor PdfBinary(data: list[int] | bytes) -> None
  • changed: constructor PdfName(name) → constructor PdfName(name: PdfName | bytes | str) -> None
  • changed: constructor PdfParser(filename=…, f=…, buf=…, start_offset=…, mode=…) → constructor PdfParser(filename: str | None=…, f: IO[bytes] | None=…, buf: bytes | bytearray | None=…, start_offset: int=…, mode: str=…) -> None
  • changed: constructor PdfStream(dictionary, buf) → constructor PdfStream(dictionary: PdfDict, buf: bytes) -> None
  • changed: constructor XrefTable() → constructor XrefTable() -> None
  • changed: function decode_text(b) → function decode_text(b: bytes) -> str
  • changed: function pdf_repr(x) → function pdf_repr(x: Any) -> bytes
  • changed: method PdfParser.linearize_page_tree(node=…) → method PdfParser.linearize_page_tree(node: PdfDict | None=…) -> list[IndirectReference]
  • changed: method PdfParser.next_object_id(offset=…) → method PdfParser.next_object_id(offset: int | None=…) -> IndirectReference
  • changed: method PdfParser.read_indirect(ref, max_nesting=…) → method PdfParser.read_indirect(ref: IndirectReference, max_nesting: int=…) -> Any
  • changed: method PdfParser.read_prev_trailer(xref_section_offset) → method PdfParser.read_prev_trailer(xref_section_offset: int) -> None
  • changed: method PdfParser.read_trailer() → method PdfParser.read_trailer() -> None
  • changed: method PdfParser.read_xref_table(xref_section_offset) → method PdfParser.read_xref_table(xref_section_offset: int) -> int
  • changed: method PdfParser.write_comment(s) → method PdfParser.write_comment(s: str) -> None
  • changed: method PdfParser.write_obj(ref, *objs, **dict_obj) → method PdfParser.write_obj(ref: IndirectReference | None, *objs: Any, **dict_obj: Any) -> IndirectReference
  • changed: method PdfParser.write_page(ref, *objs, **dict_obj) → method PdfParser.write_page(ref: int | IndirectReference | None, *objs: Any, **dict_obj: Any) -> IndirectReference
  • changed: method PdfParser.write_xref_and_trailer(new_root_ref=…) → method PdfParser.write_xref_and_trailer(new_root_ref: IndirectReference | None=…) -> None
  • changed: method PdfStream.decode() → method PdfStream.decode() -> bytes
  • changed: method XrefTable.keys() → method XrefTable.keys() -> set[int]
  • changed: method XrefTable.write(f) → method XrefTable.write(f: IO[bytes]) -> int
  • changed: static method PdfName.from_pdf_stream(data) → static method PdfName.from_pdf_stream(data: bytes) -> PdfName
  • changed: static method PdfParser.get_buf_from_file(f) → static method PdfParser.get_buf_from_file(f: IO[bytes]) -> bytes | mmap.mmap
  • changed: static method PdfParser.get_literal_string(data, offset) → static method PdfParser.get_literal_string(data: bytes | bytearray | mmap.mmap, offset: int) -> tuple[bytes, int]
  • changed: static method PdfParser.get_value(data, offset, expect_indirect=…, max_nesting=…) → static method PdfParser.get_value(data: bytes | bytearray | mmap.mmap, offset: int, expect_indirect: IndirectReference | None=…, max_nesting: int=…) -> tuple[Any, int | None]
  • changed: static method PdfParser.interpret_name(raw, as_text=…) → static method PdfParser.interpret_name(raw: bytes, as_text: bool=…) -> str | bytes
  • changed: static method PdfParser.interpret_trailer(trailer_data) → static method PdfParser.interpret_trailer(trailer_data: bytes) -> dict[bytes, Any]
  • added: field PdfName.name: bytes
  • added: variable TYPE_CHECKING
  • removed: property PngImageFile.text
  • changed: constructor PngStream(fp) → constructor PngStream(fp: IO[bytes]) -> None
  • changed: function getchunks(im, **params) → function getchunks(im: Image.Image, **params: Any) -> list[tuple[bytes, bytes, bytes]]
  • changed: function putchunk(fp, cid, *data) → function putchunk(fp: IO[bytes], cid: bytes, *data: bytes) -> None
  • changed: method ChunkStream.call(cid, pos, length) → method ChunkStream.call(cid: bytes, pos: int, length: int) -> bytes
  • added: property PngImageFile.text -> dict[str, str | iTXt]
  • added: variable TYPE_CHECKING
  • changed: method PpmDecoder.decode(buffer: bytes) -> tuple[int, int] → method PpmDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • changed: method PpmPlainDecoder.decode(buffer: bytes) -> tuple[int, int] → method PpmPlainDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • removed: property PsdImageFile.layers
  • added: property PsdImageFile.layers -> list[tuple[str, str, tuple[int, int, int, int], list[ImageFile._Tile]]]
  • removed: class PyAccess
  • removed: constructor PyAccess(img: Image.Image, readonly: bool=…) -> None
  • removed: field PyAccess.getpixel
  • removed: field PyAccess.putpixel
  • removed: function new(img: Image.Image, readonly: bool=…) -> PyAccess | None
  • removed: method PyAccess.check_xy(xy: tuple[int, int]) -> tuple[int, int]
  • removed: method PyAccess.get_pixel(x: int, y: int) -> float | tuple[int, ...]
  • removed: method PyAccess.set_pixel(x: int, y: int, color: float | tuple[int, ...] | list[int]) -> None
  • removed: variable FFI
  • removed: variable FFI: type
  • removed: variable defs
  • removed: variable ffi
  • removed: variable logger
  • removed: variable mode_map
  • changed: method QoiDecoder.decode(buffer: bytes) -> tuple[int, int] → method QoiDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • added: class QoiEncoder(ImageFile.PyEncoder)
  • added: method QoiEncoder.encode(bufsize: int) -> tuple[int, int, bytes]
  • changed: method SGI16Decoder.decode(buffer: bytes) -> tuple[int, int] → method SGI16Decoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • changed: function loadImageSeries(filelist: list[str] | None=…) -> list[SpiderImageFile] | None → function loadImageSeries(filelist: list[str] | None=…) -> list[Image.Image] | None
  • added: variable TYPE_CHECKING
  • removed: method TarIO.close() -> None
  • removed: property IFDRational.denominator
  • removed: property IFDRational.numerator
  • removed: property TiffImageFile.n_frames
  • removed: variable IFD_LEGACY_API
  • changed: class AppendingTiffWriter → class AppendingTiffWriter(io.BytesIO)
  • changed: constructor AppendingTiffWriter(fn, new=…) → constructor AppendingTiffWriter(fn: StrOrBytesPath | IO[bytes], new: bool=…) -> None
  • changed: constructor IFDRational(value, denominator=…) → constructor IFDRational(value: float | Fraction | IFDRational, denominator: int=…) -> None
  • changed: constructor ImageFileDirectory_v1(*args, **kwargs) → constructor ImageFileDirectory_v1(*args: Any, **kwargs: Any) -> None
  • changed: constructor TiffImageFile(fp=…, filename=…) → constructor TiffImageFile(fp: StrOrBytesPath | IO[bytes], filename: str | bytes | None=…) -> None
  • changed: method AppendingTiffWriter.seek(offset, whence=…) → method AppendingTiffWriter.seek(offset: int, whence: int=…) -> int
  • changed: method AppendingTiffWriter.write(data: bytes) -> int | None → method AppendingTiffWriter.write(data: Buffer, /) -> int
  • changed: method IFDRational.limit_rational(max_denominator) → method IFDRational.limit_rational(max_denominator: int) -> tuple[IntegralLike, int]
  • changed: method ImageFileDirectory_v2.load(fp) → method ImageFileDirectory_v2.load(fp: IO[bytes]) -> None
  • changed: method ImageFileDirectory_v2.load_byte(data, legacy_api=…) → method ImageFileDirectory_v2.load_byte(data: bytes, legacy_api: bool=…) -> bytes
  • changed: method ImageFileDirectory_v2.load_rational(data, legacy_api=…) → method ImageFileDirectory_v2.load_rational(data: bytes, legacy_api: bool=…) -> tuple[tuple[int, int] | IFDRational, ...]
  • changed: method ImageFileDirectory_v2.load_signed_rational(data, legacy_api=…) → method ImageFileDirectory_v2.load_signed_rational(data: bytes, legacy_api: bool=…) -> tuple[tuple[int, int] | IFDRational, ...]
  • changed: method ImageFileDirectory_v2.load_string(data, legacy_api=…) → method ImageFileDirectory_v2.load_string(data: bytes, legacy_api: bool=…) -> str
  • changed: method ImageFileDirectory_v2.load_undefined(data, legacy_api=…) → method ImageFileDirectory_v2.load_undefined(data: bytes, legacy_api: bool=…) -> bytes
  • changed: method ImageFileDirectory_v2.named() → method ImageFileDirectory_v2.named() -> dict[str, Any]
  • changed: method ImageFileDirectory_v2.save(fp) → method ImageFileDirectory_v2.save(fp: IO[bytes]) -> int
  • changed: method ImageFileDirectory_v2.tobytes(offset=…) → method ImageFileDirectory_v2.tobytes(offset: int=…) -> bytes
  • changed: method ImageFileDirectory_v2.write_byte(data) → method ImageFileDirectory_v2.write_byte(data: bytes | int | IFDRational) -> bytes
  • changed: method ImageFileDirectory_v2.write_rational(*values) → method ImageFileDirectory_v2.write_rational(*values: IFDRational) -> bytes
  • changed: method ImageFileDirectory_v2.write_signed_rational(*values) → method ImageFileDirectory_v2.write_signed_rational(*values: IFDRational) -> bytes
  • changed: method ImageFileDirectory_v2.write_string(value) → method ImageFileDirectory_v2.write_string(value: str | bytes | int) -> bytes
  • changed: method ImageFileDirectory_v2.write_undefined(value) → method ImageFileDirectory_v2.write_undefined(value: bytes | int | IFDRational) -> bytes
  • changed: method TiffImageFile.get_photoshop_blocks() → method TiffImageFile.get_photoshop_blocks() -> dict[int, dict[str, bytes]]
  • changed: method TiffImageFile.load() → method TiffImageFile.load() -> Image.core.PixelAccess | None
  • changed: static method ImageFileDirectory_v1.from_v2(original) → static method ImageFileDirectory_v1.from_v2(original: ImageFileDirectory_v2) -> ImageFileDirectory_v1
  • added: method TiffImageFile.load_prepare() -> None
  • added: property IFDRational.denominator -> int
  • added: property IFDRational.numerator -> IntegralLike
  • added: property TiffImageFile.n_frames -> int
  • added: variable TYPE_CHECKING
  • changed: function lookup(tag, group=…) → function lookup(tag: int, group: int | None=…) -> TagInfo
  • changed: method TagInfo.cvt_enum(value) → method TagInfo.cvt_enum(value: str) -> int | str
  • changed: variable TAGS → variable TAGS: dict[int | tuple[int, int], str]
  • changed: variable TAGS_V2_GROUPS → variable TAGS_V2_GROUPS: dict[int, dict[int, TagInfo]]
  • changed: function open(filename) → function open(filename: StrOrBytesPath | IO[bytes]) -> WalImageFile
  • changed: method WalImageFile.load() → method WalImageFile.load() -> Image.core.PixelAccess | None
  • changed: method WebPImageFile.load() → method WebPImageFile.load() -> Image.core.PixelAccess | None
  • changed: method WmfStubImageFile.load(dpi=…) → method WmfStubImageFile.load(dpi: float | tuple[float, float] | None=…) -> Image.core.PixelAccess | None
  • added: class XpmDecoder(ImageFile.PyDecoder)
  • added: method XpmDecoder.decode(buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]
  • changed: variable features → variable features: dict[str, tuple[str, str | bool, str | None]]