Skip to content

Pillow 12.1.1

Version history | Download JSON

  • PyPI https://pypi.org/project/Pillow/
    Repository https://github.com/python-pillow/Pillow

  • py.typed

  • Coverage


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "Typed" : 2264
        "Any" : 87
        "Untyped" : 214
    • 91.7% coverage
    • 88.3% coverage (strict)
    • 2565 typable
      • 2264 typed
      • 214 untyped
      • 87 Any
  • Typables


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "functions" : 554
        "classes" : 1704
        "other" : 48
    • 190 functions (+1 overloads)
      • 364 parameters
    • 216 classes
      • 741 methods (+0 overloads)
        • 917 parameters
      • 38 properties
    • 87 modules
      • 48 attrs

Modules

Module Coverage Coverage (strict) Typables Ignores
PIL.AvifImagePlugin 100.0% 100.0% 9 0
PIL.BdfFontFile 100.0% 100.0% 4 0
PIL.BlpImagePlugin 100.0% 100.0% 16 0
PIL.BmpImagePlugin 100.0% 100.0% 7 0
PIL.BufrStubImagePlugin 100.0% 100.0% 4 0
PIL.ContainerIO 91.7% 91.7% 36 0
PIL.CurImagePlugin 100.0% 100.0% 1 0
PIL.DcxImagePlugin 100.0% 100.0% 4 0
PIL.DdsImagePlugin 100.0% 100.0% 6 0
PIL.EpsImagePlugin 88.9% 88.9% 18 0
PIL.ExifTags 0.0% 0.0% 0 0
PIL.FitsImagePlugin 100.0% 100.0% 8 0
PIL.FliImagePlugin 100.0% 100.0% 9 0
PIL.FontFile 100.0% 100.0% 12 0
PIL.FpxImagePlugin 100.0% 100.0% 10 0
PIL.FtexImagePlugin 100.0% 100.0% 3 0
PIL.GbrImagePlugin 100.0% 100.0% 2 0
PIL.GdImageFile 100.0% 100.0% 4 0
PIL.GifImagePlugin 100.0% 95.8% 24 0
PIL.GimpGradientFile 100.0% 100.0% 20 0
PIL.GimpPaletteFile 100.0% 100.0% 8 0
PIL.GribStubImagePlugin 100.0% 100.0% 4 0
PIL.Hdf5StubImagePlugin 100.0% 100.0% 4 0
PIL.IcnsImagePlugin 88.6% 88.6% 35 0
PIL.IcoImagePlugin 85.0% 85.0% 20 0
PIL.ImImagePlugin 88.9% 77.8% 9 0
PIL.Image 98.6% 95.3% 358 1
PIL.ImageChops 100.0% 100.0% 68 0
PIL.ImageCms 89.4% 88.2% 85 0
PIL.ImageColor 100.0% 100.0% 6 0
PIL.ImageDraw 95.8% 94.5% 165 0
PIL.ImageDraw2 90.9% 80.5% 77 0
PIL.ImageEnhance 88.9% 88.9% 9 0
PIL.ImageFile 87.5% 86.2% 80 0
PIL.ImageFilter 76.9% 75.6% 78 0
PIL.ImageFont 93.2% 81.2% 117 0
PIL.ImageGrab 100.0% 100.0% 7 0
PIL.ImageMath 100.0% 84.0% 25 2
PIL.ImageMode 100.0% 100.0% 3 0
PIL.ImageMorph 94.1% 94.1% 34 0
PIL.ImageOps 100.0% 100.0% 69 0
PIL.ImagePalette 95.1% 95.1% 41 0
PIL.ImageQt 100.0% 100.0% 22 1
PIL.ImageSequence 81.8% 81.8% 11 0
PIL.ImageShow 100.0% 71.8% 78 0
PIL.ImageStat 85.7% 85.7% 14 0
PIL.ImageText 75.0% 75.0% 32 0
PIL.ImageTk 95.0% 85.0% 20 0
PIL.ImageTransform 88.9% 77.8% 9 0
PIL.ImageWin 89.7% 89.7% 68 0
PIL.ImtImagePlugin 50.0% 50.0% 2 0
PIL.IptcImagePlugin 100.0% 100.0% 7 0
PIL.Jpeg2KImagePlugin 81.0% 81.0% 21 1
PIL.JpegImagePlugin 100.0% 100.0% 33 0
PIL.JpegPresets 0.0% 0.0% 0 0
PIL.McIdasImagePlugin 100.0% 100.0% 1 0
PIL.MicImagePlugin 100.0% 100.0% 7 0
PIL.MpegImagePlugin 76.9% 76.9% 13 0
PIL.MpoImagePlugin 100.0% 100.0% 11 0
PIL.MspImagePlugin 100.0% 100.0% 3 0
PIL.PSDraw 95.2% 95.2% 21 0
PIL.PaletteFile 75.0% 75.0% 4 0
PIL.PalmImagePlugin 50.0% 50.0% 2 0
PIL.PcdImagePlugin 100.0% 100.0% 3 0
PIL.PcfFontFile 72.2% 72.2% 18 0
PIL.PcxImagePlugin 50.0% 50.0% 2 0
PIL.PdfParser 73.8% 69.6% 168 0
PIL.PixarImagePlugin 100.0% 100.0% 1 0
PIL.PngImagePlugin 95.7% 94.9% 138 0
PIL.PpmImagePlugin 100.0% 100.0% 17 0
PIL.PsdImagePlugin 100.0% 100.0% 7 0
PIL.QoiImagePlugin 100.0% 100.0% 15 0
PIL.SgiImagePlugin 100.0% 100.0% 3 0
PIL.SpiderImagePlugin 95.5% 90.9% 22 0
PIL.SunImagePlugin 100.0% 100.0% 1 0
PIL.TarIO 75.0% 75.0% 4 0
PIL.TgaImagePlugin 100.0% 100.0% 2 0
PIL.TiffImagePlugin 81.0% 77.3% 211 1
PIL.TiffTags 100.0% 100.0% 15 0
PIL.WalImageFile 100.0% 100.0% 4 0
PIL.WebPImagePlugin 100.0% 100.0% 13 0
PIL.WmfImagePlugin 100.0% 100.0% 10 0
PIL.XVThumbImagePlugin 100.0% 100.0% 1 0
PIL.XbmImagePlugin 50.0% 50.0% 2 0
PIL.XpmImagePlugin 83.3% 83.3% 6 0
PIL 0.0% 0.0% 0 0
PIL.features 100.0% 100.0% 24 0

Incomplete Annotations

PIL.ContainerIO (3 missing, 0 any)

Symbol Typable Typed Any
attr ContainerIO.pos 1 0 0
attr ContainerIO.offset 1 0 0
attr ContainerIO.length 1 0 0

PIL.EpsImagePlugin (2 missing, 0 any)

Symbol Typable Typed Any
attr split 1 0 0
attr field 1 0 0

PIL.GifImagePlugin (0 missing, 1 any)

Symbol Typable Typed Any
func getdata 4 4 1

PIL.IcnsImagePlugin (4 missing, 0 any)

Symbol Typable Typed Any
attr enable_jpeg2k 1 0 0
attr imf 1 0 0
attr IcnsFile.dct 1 0 0
attr IcnsFile.fobj 1 0 0

PIL.IcoImagePlugin (3 missing, 0 any)

Symbol Typable Typed Any
attr IcoFile.buf 1 0 0
attr IcoFile.entry 1 0 0
attr IcoFile.nb_items 1 0 0

PIL.ImImagePlugin (1 missing, 1 any)

Symbol Typable Typed Any
func number 2 2 1
attr split 1 0 0

PIL.Image (5 missing, 12 any)

Symbol Typable Typed Any
meth ImageTransformHandler.transform 4 4 1
attr ImagePointTransform.scale 1 0 0
attr ImagePointTransform.offset 1 0 0
attr msg 1 0 0
meth Exif._fixup 2 2 2
meth Exif.getitem 2 2 1
meth Exif.setitem 3 3 1
meth Image._dump 4 4 1
meth Image._repr_image 3 3 1
meth Image.tobytes 3 3 1
meth Image.frombytes 4 4 1
meth Image.save 4 4 1
attr Image.readonly 1 0 0
func frombuffer 6 6 1
func frombytes 6 6 1
attr logger 1 0 0

PIL.ImageCms (9 missing, 1 any)

Symbol Typable Typed Any
meth ImageCmsTransform.init 9 8 0
attr ImageCmsTransform.input_mode 1 0 0
attr ImageCmsTransform.inputMode 1 0 0
attr ImageCmsTransform.output_mode 1 0 0
attr ImageCmsTransform.outputMode 1 0 0
attr ImageCmsTransform.output_profile 1 0 0
attr ImageCmsTransform.transform 1 0 0
attr core 1 0 0
meth ImageCmsProfile.getattr 2 2 1
attr ImageCmsProfile.profile 1 0 0

PIL.ImageDraw (7 missing, 2 any)

Symbol Typable Typed Any
meth ImageDraw.text 16 16 2
attr ImageDraw.im 1 0 0
attr ImageDraw.draw 1 0 0
attr ImageDraw.mode 1 0 0
attr ImageDraw.fill 1 0 0
attr ImageDraw.palette 1 0 0
attr ImageDraw.ink 1 0 0
attr ImageDraw.fontmode 1 0 0

PIL.ImageDraw2 (7 missing, 8 any)

Symbol Typable Typed Any
attr Pen.color 1 0 0
attr Pen.width 1 0 0
attr Brush.color 1 0 0
meth Draw.render 6 6 1
meth Draw.arc 6 6 1
meth Draw.chord 6 6 1
meth Draw.ellipse 4 4 1
meth Draw.line 4 4 1
meth Draw.pieslice 6 6 1
meth Draw.polygon 4 4 1
meth Draw.rectangle 4 4 1
attr Draw.draw 1 0 0
attr Draw.image 1 0 0
attr Font.color 1 0 0
attr Font.font 1 0 0

PIL.ImageEnhance (1 missing, 0 any)

Symbol Typable Typed Any
attr Color.intermediate_mode 1 0 0

PIL.ImageFile (10 missing, 1 any)

Symbol Typable Typed Any
attr ImageFile.readonly 1 0 0
attr ImageFile.decodermaxblock 1 0 0
attr ImageFile.filename 1 0 0
meth PyCodec.init 3 3 1
attr PyCodec.state 1 0 0
attr PyCodec.mode 1 0 0
attr PyCodecState.xsize 1 0 0
attr PyCodecState.ysize 1 0 0
attr PyCodecState.xoff 1 0 0
attr PyCodecState.yoff 1 0 0
attr logger 1 0 0

PIL.ImageFilter (18 missing, 1 any)

Symbol Typable Typed Any
attr UnsharpMask.radius 1 0 0
attr UnsharpMask.percent 1 0 0
attr UnsharpMask.threshold 1 0 0
attr MinFilter.size 1 0 0
attr MinFilter.rank 1 0 0
attr GaussianBlur.radius 1 0 0
attr RankFilter.size 1 0 0
attr RankFilter.rank 1 0 0
attr BoxBlur.radius 1 0 0
attr MaxFilter.size 1 0 0
attr MaxFilter.rank 1 0 0
meth Color3DLUT._check_size 2 2 1
attr Color3DLUT.size 1 0 0
attr Color3DLUT.channels 1 0 0
attr Color3DLUT.mode 1 0 0
attr Color3DLUT.table 1 0 0
attr ModeFilter.size 1 0 0
attr MedianFilter.size 1 0 0
attr MedianFilter.rank 1 0 0

PIL.ImageFont (8 missing, 14 any)

Symbol Typable Typed Any
meth FreeTypeFont.getmask2 12 12 2
attr FreeTypeFont.path 1 0 0
attr FreeTypeFont.size 1 0 0
attr FreeTypeFont.index 1 0 0
attr FreeTypeFont.encoding 1 0 0
attr FreeTypeFont.layout_engine 1 0 0
meth TransposedFont.init 3 2 0
meth TransposedFont.getmask 5 5 2
meth TransposedFont.getbbox 4 4 2
meth TransposedFont.getlength 4 4 2
attr TransposedFont.font 1 0 0
attr TransposedFont.orientation 1 0 0
meth ImageFont.getmask 5 5 2
meth ImageFont.getbbox 4 4 2
meth ImageFont.getlength 4 4 2

PIL.ImageMath (0 missing, 4 any)

Symbol Typable Typed Any
func lambda_eval 3 3 2
func unsafe_eval 3 3 2

PIL.ImageMorph (2 missing, 0 any)

Symbol Typable Typed Any
attr MorphOp.lut 1 0 0
attr LutBuilder.patterns 1 0 0

PIL.ImagePalette (2 missing, 0 any)

Symbol Typable Typed Any
attr ImagePalette.mode 1 0 0
attr ImagePalette.palette 1 0 0

PIL.ImageSequence (2 missing, 0 any)

Symbol Typable Typed Any
attr Iterator.im 1 0 0
attr Iterator.position 1 0 0

PIL.ImageShow (0 missing, 22 any)

Symbol Typable Typed Any
meth Viewer.show 3 3 1
meth Viewer.get_command 3 3 1
meth Viewer.show_image 3 3 1
meth Viewer.show_file 3 3 1
meth EogViewer.get_command_ex 3 3 1
meth EogViewer.show_file 3 3 1
meth XDGViewer.get_command_ex 3 3 1
meth XDGViewer.show_file 3 3 1
func show 4 4 1
meth XVViewer.get_command_ex 4 4 1
meth XVViewer.show_file 3 3 1
meth GmDisplayViewer.get_command_ex 3 3 1
meth GmDisplayViewer.show_file 3 3 1
meth WindowsViewer.get_command 3 3 1
meth WindowsViewer.show_file 3 3 1
meth IPythonViewer.show_image 3 3 1
meth MacViewer.get_command 3 3 1
meth MacViewer.show_file 3 3 1
meth DisplayViewer.get_command_ex 4 4 1
meth DisplayViewer.show_file 3 3 1
meth UnixViewer.get_command_ex 3 3 1
meth UnixViewer.get_command 3 3 1

PIL.ImageStat (2 missing, 0 any)

Symbol Typable Typed Any
attr Stat.bands 1 0 0
attr Stat.h 1 0 0

PIL.ImageText (8 missing, 0 any)

Symbol Typable Typed Any
attr Text.text 1 0 0
attr Text.font 1 0 0
attr Text.mode 1 0 0
attr Text.spacing 1 0 0
attr Text.direction 1 0 0
attr Text.features 1 0 0
attr Text.language 1 0 0
attr Text.embedded_color 1 0 0

PIL.ImageTk (1 missing, 2 any)

Symbol Typable Typed Any
meth PhotoImage.init 4 4 1
attr PhotoImage.tk 1 0 0
meth BitmapImage.init 3 3 1

PIL.ImageTransform (1 missing, 1 any)

Symbol Typable Typed Any
meth Transform.transform 4 4 1
attr Transform.data 1 0 0

PIL.ImageWin (7 missing, 0 any)

Symbol Typable Typed Any
attr ImageWindow.image 1 0 0
attr Dib.image 1 0 0
attr Dib.mode 1 0 0
attr Dib.size 1 0 0
attr HDC.dc 1 0 0
attr Window.hwnd 1 0 0
attr HWND.wnd 1 0 0

PIL.ImtImagePlugin (1 missing, 0 any)

Symbol Typable Typed Any
attr field 1 0 0

PIL.Jpeg2KImagePlugin (4 missing, 0 any)

Symbol Typable Typed Any
attr BoxReader.fp 1 0 0
attr BoxReader.has_length 1 0 0
attr BoxReader.length 1 0 0
attr BoxReader.remaining_in_box 1 0 0

PIL.MpegImagePlugin (3 missing, 0 any)

Symbol Typable Typed Any
attr BitStream.fp 1 0 0
attr BitStream.bits 1 0 0
attr BitStream.bitbuffer 1 0 0

PIL.PSDraw (1 missing, 0 any)

Symbol Typable Typed Any
attr PSDraw.fp 1 0 0

PIL.PaletteFile (1 missing, 0 any)

Symbol Typable Typed Any
attr PaletteFile.palette 1 0 0

PIL.PalmImagePlugin (1 missing, 0 any)

Symbol Typable Typed Any
attr Palm8BitColormapImage 1 0 0

PIL.PcfFontFile (5 missing, 0 any)

Symbol Typable Typed Any
meth PcfFontFile.init 3 2 0
attr PcfFontFile.charset_encoding 1 0 0
attr PcfFontFile.toc 1 0 0
attr PcfFontFile.fp 1 0 0
attr PcfFontFile.info 1 0 0

PIL.PcxImagePlugin (1 missing, 0 any)

Symbol Typable Typed Any
attr logger 1 0 0

PIL.PdfParser (44 missing, 7 any)

Symbol Typable Typed Any
attr XrefTable.deleted_entries 1 0 0
attr XrefTable.reading_finished 1 0 0
attr PdfBinary.data 1 0 0
attr PdfName.allowed_chars 1 0 0
func pdf_repr 2 2 1
attr PdfStream.dictionary 1 0 0
attr PdfStream.buf 1 0 0
meth PdfParser.write_page 4 4 2
meth PdfParser.write_obj 4 4 2
meth PdfParser.read_indirect 3 3 1
attr PdfParser.filename 1 0 0
attr PdfParser.f 1 0 0
attr PdfParser.start_offset 1 0 0
attr PdfParser.should_close_buf 1 0 0
attr PdfParser.should_close_file 1 0 0
attr PdfParser.file_size_total 1 0 0
attr PdfParser.file_size_this 1 0 0
attr PdfParser.root 1 0 0
attr PdfParser.info 1 0 0
attr PdfParser.page_tree_root 1 0 0
attr PdfParser.xref_table 1 0 0
attr PdfParser.re_trailer_end 1 0 0
attr PdfParser.re_trailer_prev 1 0 0
attr PdfParser.re_whitespace_optional 1 0 0
attr PdfParser.re_name 1 0 0
attr PdfParser.re_dict_start 1 0 0
attr PdfParser.re_dict_end 1 0 0
attr PdfParser.re_hashes_in_name 1 0 0
attr PdfParser.re_null 1 0 0
attr PdfParser.re_true 1 0 0
attr PdfParser.re_false 1 0 0
attr PdfParser.re_int 1 0 0
attr PdfParser.re_real 1 0 0
attr PdfParser.re_array_start 1 0 0
attr PdfParser.re_array_end 1 0 0
attr PdfParser.re_string_hex 1 0 0
attr PdfParser.re_string_lit 1 0 0
attr PdfParser.re_indirect_reference 1 0 0
attr PdfParser.re_indirect_def_start 1 0 0
attr PdfParser.re_indirect_def_end 1 0 0
attr PdfParser.re_comment 1 0 0
attr PdfParser.re_stream_start 1 0 0
attr PdfParser.re_stream_end 1 0 0
attr PdfParser.re_lit_str_token 1 0 0
attr PdfParser.escaped_chars 1 0 0
attr PdfParser.re_xref_section_start 1 0 0
attr PdfParser.re_xref_subsection_start 1 0 0
attr PdfParser.re_xref_entry 1 0 0
meth PdfDict.setattr 3 3 1

PIL.PngImagePlugin (6 missing, 1 any)

Symbol Typable Typed Any
attr logger 1 0 0
meth iTXt.new 5 4 0
func getchunks 3 3 1
attr PngStream.im_size 1 0 0
attr PngStream.im_mode 1 0 0
attr PngStream.rewind_state 1 0 0
attr PngStream.text_memory 1 0 0

PIL.SpiderImagePlugin (1 missing, 1 any)

Symbol Typable Typed Any
func isInt 2 2 1
attr transposed_im 1 0 0

PIL.TarIO (1 missing, 0 any)

Symbol Typable Typed Any
attr TarIO.fh 1 0 0

PIL.TiffImagePlugin (40 missing, 8 any)

Symbol Typable Typed Any
meth ImageFileDirectory_v2.getitem 2 2 1
meth ImageFileDirectory_v2.setitem 3 3 1
meth ImageFileDirectory_v2._setitem 4 4 1
meth ImageFileDirectory_v2._pack 3 3 1
attr ImageFileDirectory_v2.group 1 0 0
attr ImageFileDirectory_v2.next 1 0 0
attr ImageFileDirectory_v2.prefix 1 0 0
attr ImageFileDirectory_v2.offset 1 0 0
attr IFDRational.add 1 0 0
attr IFDRational.radd 1 0 0
attr IFDRational.sub 1 0 0
attr IFDRational.rsub 1 0 0
attr IFDRational.mul 1 0 0
attr IFDRational.rmul 1 0 0
attr IFDRational.truediv 1 0 0
attr IFDRational.rtruediv 1 0 0
attr IFDRational.floordiv 1 0 0
attr IFDRational.rfloordiv 1 0 0
attr IFDRational.mod 1 0 0
attr IFDRational.rmod 1 0 0
attr IFDRational.pow 1 0 0
attr IFDRational.rpow 1 0 0
attr IFDRational.pos 1 0 0
attr IFDRational.neg 1 0 0
attr IFDRational.abs 1 0 0
attr IFDRational.trunc 1 0 0
attr IFDRational.lt 1 0 0
attr IFDRational.gt 1 0 0
attr IFDRational.le 1 0 0
attr IFDRational.ge 1 0 0
attr IFDRational.bool 1 0 0
attr IFDRational.ceil 1 0 0
attr IFDRational.floor 1 0 0
attr IFDRational.round 1 0 0
attr IFDRational.int 1 0 0
meth ImageFileDirectory_v1.init 3 3 2
meth ImageFileDirectory_v1.setitem 3 3 1
meth ImageFileDirectory_v1.getitem 2 2 1
attr ImageFileDirectory_v1.tags 1 0 0
attr ImageFileDirectory_v1.tagdata 1 0 0
attr AppendingTiffWriter.beginning 1 0 0
attr AppendingTiffWriter.name 1 0 0
attr AppendingTiffWriter.close_fp 1 0 0
attr MAX_SAMPLESPERPIXEL 1 0 0
attr name 1 0 0
attr COMPRESSION_INFO_REV 1 0 0
attr logger 1 0 0

PIL.XbmImagePlugin (1 missing, 0 any)

Symbol Typable Typed Any
attr xbm_head 1 0 0

PIL.XpmImagePlugin (1 missing, 0 any)

Symbol Typable Typed Any
attr xpm_head 1 0 0

Type-Ignore Comments

Flavor Count
type: ignore[override] 4
type: ignore[assignment] 1
type: ignore[name-defined] 1