mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add missing Pillow stubs (#5626)
These were generated with stubgen and then slightly hand edited, mostly by fixing imports and a few other bits and bobs.
This commit is contained in:
11
stubs/Pillow/PIL/BdfFontFile.pyi
Normal file
11
stubs/Pillow/PIL/BdfFontFile.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
from .FontFile import FontFile
|
||||
|
||||
bdf_slant: Any
|
||||
bdf_spacing: Any
|
||||
|
||||
def bdf_char(f): ...
|
||||
|
||||
class BdfFontFile(FontFile):
|
||||
def __init__(self, fp) -> None: ...
|
||||
29
stubs/Pillow/PIL/BlpImagePlugin.pyi
Normal file
29
stubs/Pillow/PIL/BlpImagePlugin.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile, PyDecoder
|
||||
|
||||
BLP_FORMAT_JPEG: int
|
||||
BLP_ENCODING_UNCOMPRESSED: int
|
||||
BLP_ENCODING_DXT: int
|
||||
BLP_ENCODING_UNCOMPRESSED_RAW_BGRA: int
|
||||
BLP_ALPHA_ENCODING_DXT1: int
|
||||
BLP_ALPHA_ENCODING_DXT3: int
|
||||
BLP_ALPHA_ENCODING_DXT5: int
|
||||
|
||||
def unpack_565(i): ...
|
||||
def decode_dxt1(data, alpha: bool = ...): ...
|
||||
def decode_dxt3(data): ...
|
||||
def decode_dxt5(data): ...
|
||||
|
||||
class BLPFormatError(NotImplementedError): ...
|
||||
|
||||
class BlpImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
class _BLPBaseDecoder(PyDecoder):
|
||||
magic: Any
|
||||
def decode(self, buffer): ...
|
||||
|
||||
class BLP1Decoder(_BLPBaseDecoder): ...
|
||||
class BLP2Decoder(_BLPBaseDecoder): ...
|
||||
16
stubs/Pillow/PIL/BmpImagePlugin.pyi
Normal file
16
stubs/Pillow/PIL/BmpImagePlugin.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
BIT2MODE: Any
|
||||
|
||||
class BmpImageFile(ImageFile):
|
||||
format_description: str
|
||||
format: str
|
||||
COMPRESSIONS: Any
|
||||
|
||||
class DibImageFile(BmpImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
SAVE: Any
|
||||
7
stubs/Pillow/PIL/BufrStubImagePlugin.pyi
Normal file
7
stubs/Pillow/PIL/BufrStubImagePlugin.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class BufrStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
14
stubs/Pillow/PIL/ContainerIO.pyi
Normal file
14
stubs/Pillow/PIL/ContainerIO.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import Any
|
||||
|
||||
class ContainerIO:
|
||||
fh: Any
|
||||
pos: int
|
||||
offset: Any
|
||||
length: Any
|
||||
def __init__(self, file, offset, length) -> None: ...
|
||||
def isatty(self): ...
|
||||
def seek(self, offset, mode=...) -> None: ...
|
||||
def tell(self): ...
|
||||
def read(self, n: int = ...): ...
|
||||
def readline(self): ...
|
||||
def readlines(self): ...
|
||||
5
stubs/Pillow/PIL/CurImagePlugin.pyi
Normal file
5
stubs/Pillow/PIL/CurImagePlugin.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from .BmpImagePlugin import BmpImageFile
|
||||
|
||||
class CurImageFile(BmpImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
13
stubs/Pillow/PIL/DcxImagePlugin.pyi
Normal file
13
stubs/Pillow/PIL/DcxImagePlugin.pyi
Normal file
@@ -0,0 +1,13 @@
|
||||
from typing import Any
|
||||
|
||||
from .PcxImagePlugin import PcxImageFile
|
||||
|
||||
MAGIC: int
|
||||
|
||||
class DcxImageFile(PcxImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
frame: Any
|
||||
fp: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
70
stubs/Pillow/PIL/DdsImagePlugin.pyi
Normal file
70
stubs/Pillow/PIL/DdsImagePlugin.pyi
Normal file
@@ -0,0 +1,70 @@
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
DDS_MAGIC: int
|
||||
DDSD_CAPS: int
|
||||
DDSD_HEIGHT: int
|
||||
DDSD_WIDTH: int
|
||||
DDSD_PITCH: int
|
||||
DDSD_PIXELFORMAT: int
|
||||
DDSD_MIPMAPCOUNT: int
|
||||
DDSD_LINEARSIZE: int
|
||||
DDSD_DEPTH: int
|
||||
DDSCAPS_COMPLEX: int
|
||||
DDSCAPS_TEXTURE: int
|
||||
DDSCAPS_MIPMAP: int
|
||||
DDSCAPS2_CUBEMAP: int
|
||||
DDSCAPS2_CUBEMAP_POSITIVEX: int
|
||||
DDSCAPS2_CUBEMAP_NEGATIVEX: int
|
||||
DDSCAPS2_CUBEMAP_POSITIVEY: int
|
||||
DDSCAPS2_CUBEMAP_NEGATIVEY: int
|
||||
DDSCAPS2_CUBEMAP_POSITIVEZ: int
|
||||
DDSCAPS2_CUBEMAP_NEGATIVEZ: int
|
||||
DDSCAPS2_VOLUME: int
|
||||
|
||||
DDPF_ALPHAPIXELS: Literal[0x1]
|
||||
DDPF_ALPHA: Literal[0x2]
|
||||
DDPF_FOURCC: Literal[0x4]
|
||||
DDPF_PALETTEINDEXED8: Literal[0x20]
|
||||
DDPF_RGB: Literal[0x40]
|
||||
DDPF_LUMINANCE: Literal[0x20000]
|
||||
|
||||
DDS_FOURCC: Literal[0x4]
|
||||
DDS_RGB: Literal[0x40]
|
||||
DDS_RGBA: Literal[0x41]
|
||||
DDS_LUMINANCE: Literal[0x20000]
|
||||
DDS_LUMINANCEA: Literal[0x20001]
|
||||
DDS_ALPHA: Literal[0x2]
|
||||
DDS_PAL8: Literal[0x20]
|
||||
|
||||
DDS_HEADER_FLAGS_TEXTURE: int
|
||||
DDS_HEADER_FLAGS_MIPMAP: int
|
||||
DDS_HEADER_FLAGS_VOLUME: int
|
||||
DDS_HEADER_FLAGS_PITCH: int
|
||||
DDS_HEADER_FLAGS_LINEARSIZE: int
|
||||
DDS_HEIGHT: int
|
||||
DDS_WIDTH: int
|
||||
DDS_SURFACE_FLAGS_TEXTURE: int
|
||||
DDS_SURFACE_FLAGS_MIPMAP: int
|
||||
DDS_SURFACE_FLAGS_CUBEMAP: int
|
||||
DDS_CUBEMAP_POSITIVEX: int
|
||||
DDS_CUBEMAP_NEGATIVEX: int
|
||||
DDS_CUBEMAP_POSITIVEY: int
|
||||
DDS_CUBEMAP_NEGATIVEY: int
|
||||
DDS_CUBEMAP_POSITIVEZ: int
|
||||
DDS_CUBEMAP_NEGATIVEZ: int
|
||||
DXT1_FOURCC: int
|
||||
DXT3_FOURCC: int
|
||||
DXT5_FOURCC: int
|
||||
DXGI_FORMAT_R8G8B8A8_TYPELESS: int
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM: int
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: int
|
||||
DXGI_FORMAT_BC7_TYPELESS: int
|
||||
DXGI_FORMAT_BC7_UNORM: int
|
||||
DXGI_FORMAT_BC7_UNORM_SRGB: int
|
||||
|
||||
class DdsImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def load_seek(self, pos) -> None: ...
|
||||
27
stubs/Pillow/PIL/EpsImagePlugin.pyi
Normal file
27
stubs/Pillow/PIL/EpsImagePlugin.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
split: Any
|
||||
field: Any
|
||||
gs_windows_binary: Any
|
||||
|
||||
def has_ghostscript(): ...
|
||||
def Ghostscript(tile, size, fp, scale: int = ...): ...
|
||||
|
||||
class PSFile:
|
||||
fp: Any
|
||||
char: Any
|
||||
def __init__(self, fp) -> None: ...
|
||||
def seek(self, offset, whence=...) -> None: ...
|
||||
def readline(self): ...
|
||||
|
||||
class EpsImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
mode_map: Any
|
||||
im: Any
|
||||
mode: Any
|
||||
tile: Any
|
||||
def load(self, scale: int = ...) -> None: ...
|
||||
def load_seek(self, *args, **kwargs) -> None: ...
|
||||
4
stubs/Pillow/PIL/ExifTags.pyi
Normal file
4
stubs/Pillow/PIL/ExifTags.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from typing import Any
|
||||
|
||||
TAGS: Any
|
||||
GPSTAGS: Any
|
||||
7
stubs/Pillow/PIL/FitsStubImagePlugin.pyi
Normal file
7
stubs/Pillow/PIL/FitsStubImagePlugin.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class FITSStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
7
stubs/Pillow/PIL/FliImagePlugin.pyi
Normal file
7
stubs/Pillow/PIL/FliImagePlugin.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class FliImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
16
stubs/Pillow/PIL/FontFile.pyi
Normal file
16
stubs/Pillow/PIL/FontFile.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Any
|
||||
|
||||
WIDTH: int
|
||||
|
||||
def puti16(fp, values) -> None: ...
|
||||
|
||||
class FontFile:
|
||||
bitmap: Any
|
||||
info: Any
|
||||
glyph: Any
|
||||
def __init__(self) -> None: ...
|
||||
def __getitem__(self, ix): ...
|
||||
ysize: Any
|
||||
metrics: Any
|
||||
def compile(self): ...
|
||||
def save(self, filename) -> None: ...
|
||||
11
stubs/Pillow/PIL/FpxImagePlugin.pyi
Normal file
11
stubs/Pillow/PIL/FpxImagePlugin.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MODES: Any
|
||||
|
||||
class FpxImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
fp: Any
|
||||
def load(self): ...
|
||||
10
stubs/Pillow/PIL/FtexImagePlugin.pyi
Normal file
10
stubs/Pillow/PIL/FtexImagePlugin.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MAGIC: bytes
|
||||
FORMAT_DXT1: int
|
||||
FORMAT_UNCOMPRESSED: int
|
||||
|
||||
class FtexImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def load_seek(self, pos) -> None: ...
|
||||
9
stubs/Pillow/PIL/GbrImagePlugin.pyi
Normal file
9
stubs/Pillow/PIL/GbrImagePlugin.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class GbrImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
im: Any
|
||||
def load(self) -> None: ...
|
||||
7
stubs/Pillow/PIL/GdImageFile.pyi
Normal file
7
stubs/Pillow/PIL/GdImageFile.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class GdImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
def open(fp, mode: str = ...): ...
|
||||
22
stubs/Pillow/PIL/GifImagePlugin.pyi
Normal file
22
stubs/Pillow/PIL/GifImagePlugin.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class GifImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
global_palette: Any
|
||||
def data(self): ...
|
||||
@property
|
||||
def n_frames(self): ...
|
||||
@property
|
||||
def is_animated(self): ...
|
||||
im: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
|
||||
RAWMODE: Any
|
||||
|
||||
def get_interlace(im): ...
|
||||
def getheader(im, palette: Any | None = ..., info: Any | None = ...): ...
|
||||
def getdata(im, offset=..., **params): ...
|
||||
19
stubs/Pillow/PIL/GimpGradientFile.pyi
Normal file
19
stubs/Pillow/PIL/GimpGradientFile.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import Any
|
||||
|
||||
EPSILON: float
|
||||
|
||||
def linear(middle, pos): ...
|
||||
def curved(middle, pos): ...
|
||||
def sine(middle, pos): ...
|
||||
def sphere_increasing(middle, pos): ...
|
||||
def sphere_decreasing(middle, pos): ...
|
||||
|
||||
SEGMENTS: Any
|
||||
|
||||
class GradientFile:
|
||||
gradient: Any
|
||||
def getpalette(self, entries: int = ...): ...
|
||||
|
||||
class GimpGradientFile(GradientFile):
|
||||
gradient: Any
|
||||
def __init__(self, fp) -> None: ...
|
||||
7
stubs/Pillow/PIL/GimpPaletteFile.pyi
Normal file
7
stubs/Pillow/PIL/GimpPaletteFile.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Any
|
||||
|
||||
class GimpPaletteFile:
|
||||
rawmode: str
|
||||
palette: Any
|
||||
def __init__(self, fp) -> None: ...
|
||||
def getpalette(self): ...
|
||||
7
stubs/Pillow/PIL/GribStubImagePlugin.pyi
Normal file
7
stubs/Pillow/PIL/GribStubImagePlugin.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class GribStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
7
stubs/Pillow/PIL/Hdf5StubImagePlugin.pyi
Normal file
7
stubs/Pillow/PIL/Hdf5StubImagePlugin.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class HDF5StubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
34
stubs/Pillow/PIL/IcnsImagePlugin.pyi
Normal file
34
stubs/Pillow/PIL/IcnsImagePlugin.pyi
Normal file
@@ -0,0 +1,34 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
enable_jpeg2k: Any
|
||||
HEADERSIZE: int
|
||||
|
||||
def nextheader(fobj): ...
|
||||
def read_32t(fobj, start_length, size): ...
|
||||
def read_32(fobj, start_length, size): ...
|
||||
def read_mk(fobj, start_length, size): ...
|
||||
def read_png_or_jpeg2000(fobj, start_length, size): ...
|
||||
|
||||
class IcnsFile:
|
||||
SIZES: Any
|
||||
dct: Any
|
||||
fobj: Any
|
||||
def __init__(self, fobj) -> None: ...
|
||||
def itersizes(self): ...
|
||||
def bestsize(self): ...
|
||||
def dataforsize(self, size): ...
|
||||
def getimage(self, size: Any | None = ...): ...
|
||||
|
||||
class IcnsImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
@property
|
||||
def size(self): ...
|
||||
@size.setter
|
||||
def size(self, value) -> None: ...
|
||||
best_size: Any
|
||||
im: Any
|
||||
mode: Any
|
||||
def load(self) -> None: ...
|
||||
25
stubs/Pillow/PIL/IcoImagePlugin.pyi
Normal file
25
stubs/Pillow/PIL/IcoImagePlugin.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class IcoFile:
|
||||
buf: Any
|
||||
entry: Any
|
||||
nb_items: Any
|
||||
def __init__(self, buf): ...
|
||||
def sizes(self): ...
|
||||
def getentryindex(self, size, bpp: bool = ...): ...
|
||||
def getimage(self, size, bpp: bool = ...): ...
|
||||
def frame(self, idx): ...
|
||||
|
||||
class IcoImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
@property
|
||||
def size(self): ...
|
||||
@size.setter
|
||||
def size(self, value) -> None: ...
|
||||
im: Any
|
||||
mode: Any
|
||||
def load(self) -> None: ...
|
||||
def load_seek(self) -> None: ...
|
||||
33
stubs/Pillow/PIL/ImImagePlugin.pyi
Normal file
33
stubs/Pillow/PIL/ImImagePlugin.pyi
Normal file
@@ -0,0 +1,33 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
COMMENT: str
|
||||
DATE: str
|
||||
EQUIPMENT: str
|
||||
FRAMES: str
|
||||
LUT: str
|
||||
NAME: str
|
||||
SCALE: str
|
||||
SIZE: str
|
||||
MODE: str
|
||||
TAGS: Any
|
||||
OPEN: Any
|
||||
split: Any
|
||||
|
||||
def number(s): ...
|
||||
|
||||
class ImImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
@property
|
||||
def n_frames(self): ...
|
||||
@property
|
||||
def is_animated(self): ...
|
||||
frame: Any
|
||||
fp: Any
|
||||
tile: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
|
||||
SAVE: Any
|
||||
23
stubs/Pillow/PIL/ImageChops.pyi
Normal file
23
stubs/Pillow/PIL/ImageChops.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
from typing import Any
|
||||
|
||||
def constant(image, value): ...
|
||||
def duplicate(image): ...
|
||||
def invert(image): ...
|
||||
def lighter(image1, image2): ...
|
||||
def darker(image1, image2): ...
|
||||
def difference(image1, image2): ...
|
||||
def multiply(image1, image2): ...
|
||||
def screen(image1, image2): ...
|
||||
def soft_light(image1, image2): ...
|
||||
def hard_light(image1, image2): ...
|
||||
def overlay(image1, image2): ...
|
||||
def add(image1, image2, scale: float = ..., offset: int = ...): ...
|
||||
def subtract(image1, image2, scale: float = ..., offset: int = ...): ...
|
||||
def add_modulo(image1, image2): ...
|
||||
def subtract_modulo(image1, image2): ...
|
||||
def logical_and(image1, image2): ...
|
||||
def logical_or(image1, image2): ...
|
||||
def logical_xor(image1, image2): ...
|
||||
def blend(image1, image2, alpha): ...
|
||||
def composite(image1, image2, mask): ...
|
||||
def offset(image, xoffset, yoffset: Any | None = ...): ...
|
||||
59
stubs/Pillow/PIL/ImageCms.pyi
Normal file
59
stubs/Pillow/PIL/ImageCms.pyi
Normal file
@@ -0,0 +1,59 @@
|
||||
from typing import Any
|
||||
|
||||
from .Image import ImagePointHandler
|
||||
|
||||
DESCRIPTION: str
|
||||
VERSION: str
|
||||
core: Any
|
||||
INTENT_PERCEPTUAL: int
|
||||
INTENT_RELATIVE_COLORIMETRIC: int
|
||||
INTENT_SATURATION: int
|
||||
INTENT_ABSOLUTE_COLORIMETRIC: int
|
||||
DIRECTION_INPUT: int
|
||||
DIRECTION_OUTPUT: int
|
||||
DIRECTION_PROOF: int
|
||||
FLAGS: Any
|
||||
|
||||
class ImageCmsProfile:
|
||||
def __init__(self, profile) -> None: ...
|
||||
def tobytes(self): ...
|
||||
|
||||
class ImageCmsTransform(ImagePointHandler):
|
||||
transform: Any
|
||||
input_mode: Any
|
||||
output_mode: Any
|
||||
output_profile: Any
|
||||
def __init__(
|
||||
self, input, output, input_mode, output_mode, intent=..., proof: Any | None = ..., proof_intent=..., flags: int = ...
|
||||
) -> None: ...
|
||||
def point(self, im): ...
|
||||
def apply(self, im, imOut: Any | None = ...): ...
|
||||
def apply_in_place(self, im): ...
|
||||
|
||||
def get_display_profile(handle: Any | None = ...): ...
|
||||
|
||||
class PyCMSError(Exception): ...
|
||||
|
||||
def profileToProfile(
|
||||
im, inputProfile, outputProfile, renderingIntent=..., outputMode: Any | None = ..., inPlace: bool = ..., flags: int = ...
|
||||
): ...
|
||||
def getOpenProfile(profileFilename): ...
|
||||
def buildTransform(inputProfile, outputProfile, inMode, outMode, renderingIntent=..., flags: int = ...): ...
|
||||
def buildProofTransform(
|
||||
inputProfile, outputProfile, proofProfile, inMode, outMode, renderingIntent=..., proofRenderingIntent=..., flags=...
|
||||
): ...
|
||||
|
||||
buildTransformFromOpenProfiles = buildTransform
|
||||
buildProofTransformFromOpenProfiles = buildProofTransform
|
||||
|
||||
def applyTransform(im, transform, inPlace: bool = ...): ...
|
||||
def createProfile(colorSpace, colorTemp: int = ...): ...
|
||||
def getProfileName(profile): ...
|
||||
def getProfileInfo(profile): ...
|
||||
def getProfileCopyright(profile): ...
|
||||
def getProfileManufacturer(profile): ...
|
||||
def getProfileModel(profile): ...
|
||||
def getProfileDescription(profile): ...
|
||||
def getDefaultIntent(profile): ...
|
||||
def isIntentSupported(profile, intent, direction): ...
|
||||
def versions(): ...
|
||||
6
stubs/Pillow/PIL/ImageColor.pyi
Normal file
6
stubs/Pillow/PIL/ImageColor.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
def getrgb(color): ...
|
||||
def getcolor(color, mode): ...
|
||||
|
||||
colormap: Any
|
||||
33
stubs/Pillow/PIL/ImageDraw2.pyi
Normal file
33
stubs/Pillow/PIL/ImageDraw2.pyi
Normal file
@@ -0,0 +1,33 @@
|
||||
from typing import Any
|
||||
|
||||
class Pen:
|
||||
color: Any
|
||||
width: Any
|
||||
def __init__(self, color, width: int = ..., opacity: int = ...) -> None: ...
|
||||
|
||||
class Brush:
|
||||
color: Any
|
||||
def __init__(self, color, opacity: int = ...) -> None: ...
|
||||
|
||||
class Font:
|
||||
color: Any
|
||||
font: Any
|
||||
def __init__(self, color, file, size: int = ...) -> None: ...
|
||||
|
||||
class Draw:
|
||||
draw: Any
|
||||
image: Any
|
||||
transform: Any
|
||||
def __init__(self, image, size: Any | None = ..., color: Any | None = ...) -> None: ...
|
||||
def flush(self): ...
|
||||
def render(self, op, xy, pen, brush: Any | None = ...) -> None: ...
|
||||
def settransform(self, offset) -> None: ...
|
||||
def arc(self, xy, start, end, *options) -> None: ...
|
||||
def chord(self, xy, start, end, *options) -> None: ...
|
||||
def ellipse(self, xy, *options) -> None: ...
|
||||
def line(self, xy, *options) -> None: ...
|
||||
def pieslice(self, xy, start, end, *options) -> None: ...
|
||||
def polygon(self, xy, *options) -> None: ...
|
||||
def rectangle(self, xy, *options) -> None: ...
|
||||
def text(self, xy, text, font) -> None: ...
|
||||
def textsize(self, text, font): ...
|
||||
25
stubs/Pillow/PIL/ImageEnhance.pyi
Normal file
25
stubs/Pillow/PIL/ImageEnhance.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from typing import Any
|
||||
|
||||
class _Enhance:
|
||||
def enhance(self, factor): ...
|
||||
|
||||
class Color(_Enhance):
|
||||
image: Any
|
||||
intermediate_mode: str
|
||||
degenerate: Any
|
||||
def __init__(self, image) -> None: ...
|
||||
|
||||
class Contrast(_Enhance):
|
||||
image: Any
|
||||
degenerate: Any
|
||||
def __init__(self, image) -> None: ...
|
||||
|
||||
class Brightness(_Enhance):
|
||||
image: Any
|
||||
degenerate: Any
|
||||
def __init__(self, image) -> None: ...
|
||||
|
||||
class Sharpness(_Enhance):
|
||||
image: Any
|
||||
degenerate: Any
|
||||
def __init__(self, image) -> None: ...
|
||||
@@ -1,8 +1,70 @@
|
||||
from typing import Any
|
||||
from typing import Any, NoReturn, TypeVar
|
||||
|
||||
from .Image import Image
|
||||
|
||||
class ImageFile(Image):
|
||||
def __getattr__(self, __item: str) -> Any: ... # incomplete
|
||||
_T = TypeVar("_T")
|
||||
|
||||
def __getattr__(__name: str) -> Any: ... # incomplete
|
||||
MAXBLOCK: int
|
||||
SAFEBLOCK: Any
|
||||
LOAD_TRUNCATED_IMAGES: bool
|
||||
ERRORS: Any
|
||||
|
||||
def raise_oserror(error) -> NoReturn: ...
|
||||
def raise_ioerror(error) -> NoReturn: ...
|
||||
|
||||
class ImageFile(Image):
|
||||
custom_mimetype: Any
|
||||
tile: Any
|
||||
readonly: int
|
||||
decoderconfig: Any
|
||||
decodermaxblock: Any
|
||||
fp: Any
|
||||
filename: Any
|
||||
def __init__(self, fp: Any | None = ..., filename: Any | None = ...) -> None: ...
|
||||
def get_format_mimetype(self): ...
|
||||
def verify(self) -> None: ...
|
||||
map: Any
|
||||
im: Any
|
||||
def load(self): ...
|
||||
def load_prepare(self) -> None: ...
|
||||
def load_end(self) -> None: ...
|
||||
|
||||
class StubImageFile(ImageFile):
|
||||
def load(self) -> None: ...
|
||||
|
||||
class Parser:
|
||||
incremental: Any | None
|
||||
image: Any | None
|
||||
data: Any | None
|
||||
decoder: Any | None
|
||||
offset: int
|
||||
finished: bool
|
||||
def reset(self) -> None: ...
|
||||
decode: Any
|
||||
def feed(self, data) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def close(self): ...
|
||||
|
||||
class PyCodecState:
|
||||
xsize: int
|
||||
ysize: int
|
||||
xoff: int
|
||||
yoff: int
|
||||
def extents(self) -> tuple[int, int, int, int]: ...
|
||||
|
||||
class PyDecoder:
|
||||
im: Any
|
||||
state: Any
|
||||
fd: Any
|
||||
mode: Any
|
||||
def __init__(self, mode, *args) -> None: ...
|
||||
args: Any
|
||||
def init(self, args) -> None: ...
|
||||
@property
|
||||
def pulls_fd(self): ...
|
||||
def decode(self, buffer) -> None: ...
|
||||
def cleanup(self) -> None: ...
|
||||
def setfd(self, fd) -> None: ...
|
||||
def setimage(self, im, extents: Any | None = ...) -> None: ...
|
||||
def set_as_raw(self, data, rawmode: Any | None = ...) -> None: ...
|
||||
|
||||
115
stubs/Pillow/PIL/ImageFilter.pyi
Normal file
115
stubs/Pillow/PIL/ImageFilter.pyi
Normal file
@@ -0,0 +1,115 @@
|
||||
from typing import Any
|
||||
|
||||
class Filter: ...
|
||||
class MultibandFilter(Filter): ...
|
||||
|
||||
class BuiltinFilter(MultibandFilter):
|
||||
def filter(self, image): ...
|
||||
|
||||
class Kernel(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
def __init__(self, size, kernel, scale: Any | None = ..., offset: int = ...): ...
|
||||
|
||||
class RankFilter(Filter):
|
||||
name: str
|
||||
size: Any
|
||||
rank: Any
|
||||
def __init__(self, size, rank) -> None: ...
|
||||
def filter(self, image): ...
|
||||
|
||||
class MedianFilter(RankFilter):
|
||||
name: str
|
||||
size: Any
|
||||
rank: Any
|
||||
def __init__(self, size: int = ...) -> None: ...
|
||||
|
||||
class MinFilter(RankFilter):
|
||||
name: str
|
||||
size: Any
|
||||
rank: int
|
||||
def __init__(self, size: int = ...) -> None: ...
|
||||
|
||||
class MaxFilter(RankFilter):
|
||||
name: str
|
||||
size: Any
|
||||
rank: Any
|
||||
def __init__(self, size: int = ...) -> None: ...
|
||||
|
||||
class ModeFilter(Filter):
|
||||
name: str
|
||||
size: Any
|
||||
def __init__(self, size: int = ...) -> None: ...
|
||||
def filter(self, image): ...
|
||||
|
||||
class GaussianBlur(MultibandFilter):
|
||||
name: str
|
||||
radius: Any
|
||||
def __init__(self, radius: int = ...) -> None: ...
|
||||
def filter(self, image): ...
|
||||
|
||||
class BoxBlur(MultibandFilter):
|
||||
name: str
|
||||
radius: Any
|
||||
def __init__(self, radius) -> None: ...
|
||||
def filter(self, image): ...
|
||||
|
||||
class UnsharpMask(MultibandFilter):
|
||||
name: str
|
||||
radius: Any
|
||||
percent: Any
|
||||
threshold: Any
|
||||
def __init__(self, radius: int = ..., percent: int = ..., threshold: int = ...) -> None: ...
|
||||
def filter(self, image): ...
|
||||
|
||||
class BLUR(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class CONTOUR(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class DETAIL(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class EDGE_ENHANCE(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class EDGE_ENHANCE_MORE(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class EMBOSS(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class FIND_EDGES(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class SHARPEN(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class SMOOTH(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class SMOOTH_MORE(BuiltinFilter):
|
||||
name: str
|
||||
filterargs: Any
|
||||
|
||||
class Color3DLUT(MultibandFilter):
|
||||
name: str
|
||||
size: Any
|
||||
channels: Any
|
||||
mode: Any
|
||||
table: Any
|
||||
def __init__(self, size, table, channels: int = ..., target_mode: Any | None = ..., **kwargs) -> None: ...
|
||||
@classmethod
|
||||
def generate(cls, size, callback, channels: int = ..., target_mode: Any | None = ...): ...
|
||||
def transform(self, callback, with_normals: bool = ..., channels: Any | None = ..., target_mode: Any | None = ...): ...
|
||||
def filter(self, image): ...
|
||||
4
stubs/Pillow/PIL/ImageGrab.pyi
Normal file
4
stubs/Pillow/PIL/ImageGrab.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from typing import Any
|
||||
|
||||
def grab(bbox: Any | None = ..., include_layered_windows: bool = ..., all_screens: bool = ..., xdisplay: Any | None = ...): ...
|
||||
def grabclipboard(): ...
|
||||
51
stubs/Pillow/PIL/ImageMath.pyi
Normal file
51
stubs/Pillow/PIL/ImageMath.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
from typing import Any
|
||||
|
||||
VERBOSE: int
|
||||
|
||||
class _Operand:
|
||||
im: Any
|
||||
def __init__(self, im) -> None: ...
|
||||
def apply(self, op, im1, im2: Any | None = ..., mode: Any | None = ...): ...
|
||||
def __bool__(self): ...
|
||||
def __abs__(self): ...
|
||||
def __pos__(self): ...
|
||||
def __neg__(self): ...
|
||||
def __add__(self, other): ...
|
||||
def __radd__(self, other): ...
|
||||
def __sub__(self, other): ...
|
||||
def __rsub__(self, other): ...
|
||||
def __mul__(self, other): ...
|
||||
def __rmul__(self, other): ...
|
||||
def __truediv__(self, other): ...
|
||||
def __rtruediv__(self, other): ...
|
||||
def __mod__(self, other): ...
|
||||
def __rmod__(self, other): ...
|
||||
def __pow__(self, other): ...
|
||||
def __rpow__(self, other): ...
|
||||
def __invert__(self): ...
|
||||
def __and__(self, other): ...
|
||||
def __rand__(self, other): ...
|
||||
def __or__(self, other): ...
|
||||
def __ror__(self, other): ...
|
||||
def __xor__(self, other): ...
|
||||
def __rxor__(self, other): ...
|
||||
def __lshift__(self, other): ...
|
||||
def __rshift__(self, other): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
|
||||
def imagemath_int(self): ...
|
||||
def imagemath_float(self): ...
|
||||
def imagemath_equal(self, other): ...
|
||||
def imagemath_notequal(self, other): ...
|
||||
def imagemath_min(self, other): ...
|
||||
def imagemath_max(self, other): ...
|
||||
def imagemath_convert(self, mode): ...
|
||||
|
||||
ops: Any
|
||||
|
||||
def eval(expression, _dict=..., **kw): ...
|
||||
10
stubs/Pillow/PIL/ImageMode.pyi
Normal file
10
stubs/Pillow/PIL/ImageMode.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any
|
||||
|
||||
class ModeDescriptor:
|
||||
mode: Any
|
||||
bands: Any
|
||||
basemode: Any
|
||||
basetype: Any
|
||||
def __init__(self, mode, bands, basemode, basetype) -> None: ...
|
||||
|
||||
def getmode(mode): ...
|
||||
24
stubs/Pillow/PIL/ImageMorph.pyi
Normal file
24
stubs/Pillow/PIL/ImageMorph.pyi
Normal file
@@ -0,0 +1,24 @@
|
||||
from typing import Any
|
||||
|
||||
LUT_SIZE: Any
|
||||
ROTATION_MATRIX: Any
|
||||
MIRROR_MATRIX: Any
|
||||
|
||||
class LutBuilder:
|
||||
patterns: Any
|
||||
lut: Any
|
||||
def __init__(self, patterns: Any | None = ..., op_name: Any | None = ...) -> None: ...
|
||||
def add_patterns(self, patterns) -> None: ...
|
||||
def build_default_lut(self) -> None: ...
|
||||
def get_lut(self): ...
|
||||
def build_lut(self): ...
|
||||
|
||||
class MorphOp:
|
||||
lut: Any
|
||||
def __init__(self, lut: Any | None = ..., op_name: Any | None = ..., patterns: Any | None = ...) -> None: ...
|
||||
def apply(self, image): ...
|
||||
def match(self, image): ...
|
||||
def get_on_pixels(self, image): ...
|
||||
def load_lut(self, filename) -> None: ...
|
||||
def save_lut(self, filename) -> None: ...
|
||||
def set_lut(self, lut) -> None: ...
|
||||
18
stubs/Pillow/PIL/ImageOps.pyi
Normal file
18
stubs/Pillow/PIL/ImageOps.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from typing import Any
|
||||
|
||||
def autocontrast(image, cutoff: int = ..., ignore: Any | None = ..., mask: Any | None = ..., preserve_tone: bool = ...): ...
|
||||
def colorize(image, black, white, mid: Any | None = ..., blackpoint: int = ..., whitepoint: int = ..., midpoint: int = ...): ...
|
||||
def pad(image, size, method=..., color: Any | None = ..., centering=...): ...
|
||||
def crop(image, border: int = ...): ...
|
||||
def scale(image, factor, resample=...): ...
|
||||
def deform(image, deformer, resample=...): ...
|
||||
def equalize(image, mask: Any | None = ...): ...
|
||||
def expand(image, border: int = ..., fill: int = ...): ...
|
||||
def fit(image, size, method=..., bleed: float = ..., centering=...): ...
|
||||
def flip(image): ...
|
||||
def grayscale(image): ...
|
||||
def invert(image): ...
|
||||
def mirror(image): ...
|
||||
def posterize(image, bits): ...
|
||||
def solarize(image, threshold: int = ...): ...
|
||||
def exif_transpose(image): ...
|
||||
24
stubs/Pillow/PIL/ImagePalette.pyi
Normal file
24
stubs/Pillow/PIL/ImagePalette.pyi
Normal file
@@ -0,0 +1,24 @@
|
||||
from typing import Any
|
||||
|
||||
class ImagePalette:
|
||||
mode: Any
|
||||
rawmode: Any
|
||||
palette: Any
|
||||
colors: Any
|
||||
dirty: Any
|
||||
def __init__(self, mode: str = ..., palette: Any | None = ..., size: int = ...) -> None: ...
|
||||
def copy(self): ...
|
||||
def getdata(self): ...
|
||||
def tobytes(self): ...
|
||||
tostring: Any
|
||||
def getcolor(self, color): ...
|
||||
def save(self, fp) -> None: ...
|
||||
|
||||
def raw(rawmode, data): ...
|
||||
def make_linear_lut(black, white): ...
|
||||
def make_gamma_lut(exp): ...
|
||||
def negative(mode: str = ...): ...
|
||||
def random(mode: str = ...): ...
|
||||
def sepia(white: str = ...): ...
|
||||
def wedge(mode: str = ...): ...
|
||||
def load(filename): ...
|
||||
3
stubs/Pillow/PIL/ImagePath.pyi
Normal file
3
stubs/Pillow/PIL/ImagePath.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
from ._imaging import path
|
||||
|
||||
Path = path
|
||||
18
stubs/Pillow/PIL/ImageQt.pyi
Normal file
18
stubs/Pillow/PIL/ImageQt.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from typing import Any
|
||||
|
||||
QImage = Any # imported from either of {PyQt6,PySide6,PyQt5,PySide2}.QtGui
|
||||
|
||||
qt_versions: Any
|
||||
qt_is_installed: bool
|
||||
qt_version: Any
|
||||
|
||||
def rgb(r, g, b, a: int = ...): ...
|
||||
def fromqimage(im): ...
|
||||
def fromqpixmap(im): ...
|
||||
def align8to32(bytes, width, mode): ...
|
||||
|
||||
class ImageQt(QImage): # type: ignore
|
||||
def __init__(self, im) -> None: ...
|
||||
|
||||
def toqimage(im): ...
|
||||
def toqpixmap(im): ...
|
||||
11
stubs/Pillow/PIL/ImageSequence.pyi
Normal file
11
stubs/Pillow/PIL/ImageSequence.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
class Iterator:
|
||||
im: Any
|
||||
position: Any
|
||||
def __init__(self, im) -> None: ...
|
||||
def __getitem__(self, ix): ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
def all_frames(im, func: Any | None = ...): ...
|
||||
46
stubs/Pillow/PIL/ImageShow.pyi
Normal file
46
stubs/Pillow/PIL/ImageShow.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from typing import Any
|
||||
|
||||
def register(viewer, order: int = ...) -> None: ...
|
||||
def show(image, title: Any | None = ..., **options): ...
|
||||
|
||||
class Viewer:
|
||||
def show(self, image, **options): ...
|
||||
format: Any
|
||||
options: Any
|
||||
def get_format(self, image): ...
|
||||
def get_command(self, file, **options) -> None: ...
|
||||
def save_image(self, image): ...
|
||||
def show_image(self, image, **options): ...
|
||||
def show_file(self, file, **options): ...
|
||||
|
||||
class WindowsViewer(Viewer):
|
||||
format: str
|
||||
options: Any
|
||||
def get_command(self, file, **options): ...
|
||||
|
||||
class MacViewer(Viewer):
|
||||
format: str
|
||||
options: Any
|
||||
def get_command(self, file, **options): ...
|
||||
def show_file(self, file, **options): ...
|
||||
|
||||
class UnixViewer(Viewer):
|
||||
format: str
|
||||
options: Any
|
||||
def get_command(self, file, **options): ...
|
||||
def show_file(self, file, **options): ...
|
||||
|
||||
class DisplayViewer(UnixViewer):
|
||||
def get_command_ex(self, file, **options): ...
|
||||
|
||||
class GmDisplayViewer(UnixViewer):
|
||||
def get_command_ex(self, file, **options): ...
|
||||
|
||||
class EogViewer(UnixViewer):
|
||||
def get_command_ex(self, file, **options): ...
|
||||
|
||||
class XVViewer(UnixViewer):
|
||||
def get_command_ex(self, file, title: Any | None = ..., **options): ...
|
||||
|
||||
class IPythonViewer(Viewer):
|
||||
def show_image(self, image, **options): ...
|
||||
9
stubs/Pillow/PIL/ImageStat.pyi
Normal file
9
stubs/Pillow/PIL/ImageStat.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
class Stat:
|
||||
h: Any
|
||||
bands: Any
|
||||
def __init__(self, image_or_list, mask: Any | None = ...) -> None: ...
|
||||
def __getattr__(self, id): ...
|
||||
|
||||
Global = Stat
|
||||
17
stubs/Pillow/PIL/ImageTk.pyi
Normal file
17
stubs/Pillow/PIL/ImageTk.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
class PhotoImage:
|
||||
tk: Any
|
||||
def __init__(self, image: Any | None = ..., size: Any | None = ..., **kw) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
def width(self): ...
|
||||
def height(self): ...
|
||||
def paste(self, im, box: Any | None = ...) -> None: ...
|
||||
|
||||
class BitmapImage:
|
||||
def __init__(self, image: Any | None = ..., **kw) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
def width(self): ...
|
||||
def height(self): ...
|
||||
|
||||
def getimage(photo): ...
|
||||
21
stubs/Pillow/PIL/ImageTransform.pyi
Normal file
21
stubs/Pillow/PIL/ImageTransform.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Any
|
||||
|
||||
from .Image import ImageTransformHandler
|
||||
|
||||
class Transform(ImageTransformHandler):
|
||||
data: Any
|
||||
def __init__(self, data) -> None: ...
|
||||
def getdata(self): ...
|
||||
def transform(self, size, image, **options): ...
|
||||
|
||||
class AffineTransform(Transform):
|
||||
method: Any
|
||||
|
||||
class ExtentTransform(Transform):
|
||||
method: Any
|
||||
|
||||
class QuadTransform(Transform):
|
||||
method: Any
|
||||
|
||||
class MeshTransform(Transform):
|
||||
method: Any
|
||||
38
stubs/Pillow/PIL/ImageWin.pyi
Normal file
38
stubs/Pillow/PIL/ImageWin.pyi
Normal file
@@ -0,0 +1,38 @@
|
||||
from typing import Any
|
||||
|
||||
class HDC:
|
||||
dc: Any
|
||||
def __init__(self, dc) -> None: ...
|
||||
def __int__(self): ...
|
||||
|
||||
class HWND:
|
||||
wnd: Any
|
||||
def __init__(self, wnd) -> None: ...
|
||||
def __int__(self): ...
|
||||
|
||||
class Dib:
|
||||
image: Any
|
||||
mode: Any
|
||||
size: Any
|
||||
def __init__(self, image, size: Any | None = ...) -> None: ...
|
||||
def expose(self, handle): ...
|
||||
def draw(self, handle, dst, src: Any | None = ...): ...
|
||||
def query_palette(self, handle): ...
|
||||
def paste(self, im, box: Any | None = ...) -> None: ...
|
||||
def frombytes(self, buffer): ...
|
||||
def tobytes(self): ...
|
||||
|
||||
class Window:
|
||||
hwnd: Any
|
||||
def __init__(self, title: str = ..., width: Any | None = ..., height: Any | None = ...) -> None: ...
|
||||
def ui_handle_clear(self, dc, x0, y0, x1, y1) -> None: ...
|
||||
def ui_handle_damage(self, x0, y0, x1, y1) -> None: ...
|
||||
def ui_handle_destroy(self) -> None: ...
|
||||
def ui_handle_repair(self, dc, x0, y0, x1, y1) -> None: ...
|
||||
def ui_handle_resize(self, width, height) -> None: ...
|
||||
def mainloop(self) -> None: ...
|
||||
|
||||
class ImageWindow(Window):
|
||||
image: Any
|
||||
def __init__(self, image, title: str = ...) -> None: ...
|
||||
def ui_handle_repair(self, dc, x0, y0, x1, y1) -> None: ...
|
||||
9
stubs/Pillow/PIL/ImtImagePlugin.pyi
Normal file
9
stubs/Pillow/PIL/ImtImagePlugin.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
field: Any
|
||||
|
||||
class ImtImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
19
stubs/Pillow/PIL/IptcImagePlugin.pyi
Normal file
19
stubs/Pillow/PIL/IptcImagePlugin.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
COMPRESSION: Any
|
||||
PAD: Any
|
||||
|
||||
def i(c): ...
|
||||
def dump(c) -> None: ...
|
||||
|
||||
class IptcImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def getint(self, key): ...
|
||||
def field(self): ...
|
||||
im: Any
|
||||
def load(self): ...
|
||||
|
||||
def getiptcinfo(im): ...
|
||||
10
stubs/Pillow/PIL/Jpeg2KImagePlugin.pyi
Normal file
10
stubs/Pillow/PIL/Jpeg2KImagePlugin.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class Jpeg2KImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
reduce: Any
|
||||
tile: Any
|
||||
def load(self): ...
|
||||
31
stubs/Pillow/PIL/JpegImagePlugin.pyi
Normal file
31
stubs/Pillow/PIL/JpegImagePlugin.pyi
Normal file
@@ -0,0 +1,31 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
def Skip(self, marker) -> None: ...
|
||||
def APP(self, marker) -> None: ...
|
||||
def COM(self, marker) -> None: ...
|
||||
def SOF(self, marker) -> None: ...
|
||||
def DQT(self, marker) -> None: ...
|
||||
|
||||
MARKER: Any
|
||||
|
||||
class JpegImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def load_read(self, read_bytes): ...
|
||||
mode: Any
|
||||
tile: Any
|
||||
decoderconfig: Any
|
||||
def draft(self, mode, size): ...
|
||||
im: Any
|
||||
def load_djpeg(self) -> None: ...
|
||||
def getxmp(self): ...
|
||||
|
||||
RAWMODE: Any
|
||||
zigzag_index: Any
|
||||
samplings: Any
|
||||
|
||||
def convert_dict_qtables(qtables): ...
|
||||
def get_sampling(im): ...
|
||||
def jpeg_factory(fp: Any | None = ..., filename: Any | None = ...): ...
|
||||
3
stubs/Pillow/PIL/JpegPresets.pyi
Normal file
3
stubs/Pillow/PIL/JpegPresets.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
from typing import Any
|
||||
|
||||
presets: Any
|
||||
5
stubs/Pillow/PIL/McIdasImagePlugin.pyi
Normal file
5
stubs/Pillow/PIL/McIdasImagePlugin.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class McIdasImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
11
stubs/Pillow/PIL/MicImagePlugin.pyi
Normal file
11
stubs/Pillow/PIL/MicImagePlugin.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
from .TiffImagePlugin import TiffImageFile
|
||||
|
||||
class MicImageFile(TiffImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
fp: Any
|
||||
frame: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
17
stubs/Pillow/PIL/MpegImagePlugin.pyi
Normal file
17
stubs/Pillow/PIL/MpegImagePlugin.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class BitStream:
|
||||
fp: Any
|
||||
bits: int
|
||||
bitbuffer: int
|
||||
def __init__(self, fp) -> None: ...
|
||||
def next(self): ...
|
||||
def peek(self, bits): ...
|
||||
def skip(self, bits) -> None: ...
|
||||
def read(self, bits): ...
|
||||
|
||||
class MpegImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
15
stubs/Pillow/PIL/MpoImagePlugin.pyi
Normal file
15
stubs/Pillow/PIL/MpoImagePlugin.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Any
|
||||
|
||||
from .JpegImagePlugin import JpegImageFile
|
||||
|
||||
class MpoImageFile(JpegImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def load_seek(self, pos) -> None: ...
|
||||
fp: Any
|
||||
offset: Any
|
||||
tile: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
@staticmethod
|
||||
def adopt(jpeg_instance, mpheader: Any | None = ...): ...
|
||||
8
stubs/Pillow/PIL/MspImagePlugin.pyi
Normal file
8
stubs/Pillow/PIL/MspImagePlugin.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
from .ImageFile import ImageFile, PyDecoder
|
||||
|
||||
class MspImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
class MspDecoder(PyDecoder):
|
||||
def decode(self, buffer): ...
|
||||
17
stubs/Pillow/PIL/PSDraw.pyi
Normal file
17
stubs/Pillow/PIL/PSDraw.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
class PSDraw:
|
||||
fp: Any
|
||||
def __init__(self, fp: Any | None = ...) -> None: ...
|
||||
isofont: Any
|
||||
def begin_document(self, id: Any | None = ...) -> None: ...
|
||||
def end_document(self) -> None: ...
|
||||
def setfont(self, font, size) -> None: ...
|
||||
def line(self, xy0, xy1) -> None: ...
|
||||
def rectangle(self, box) -> None: ...
|
||||
def text(self, xy, text) -> None: ...
|
||||
def image(self, box, im, dpi: Any | None = ...) -> None: ...
|
||||
|
||||
EDROFF_PS: str
|
||||
VDI_PS: str
|
||||
ERROR_PS: str
|
||||
7
stubs/Pillow/PIL/PaletteFile.pyi
Normal file
7
stubs/Pillow/PIL/PaletteFile.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Any
|
||||
|
||||
class PaletteFile:
|
||||
rawmode: str
|
||||
palette: Any
|
||||
def __init__(self, fp) -> None: ...
|
||||
def getpalette(self): ...
|
||||
5
stubs/Pillow/PIL/PalmImagePlugin.pyi
Normal file
5
stubs/Pillow/PIL/PalmImagePlugin.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from typing import Any
|
||||
|
||||
def build_prototype_image(): ...
|
||||
|
||||
Palm8BitColormapImage: Any
|
||||
9
stubs/Pillow/PIL/PcdImagePlugin.pyi
Normal file
9
stubs/Pillow/PIL/PcdImagePlugin.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class PcdImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
im: Any
|
||||
def load_end(self) -> None: ...
|
||||
25
stubs/Pillow/PIL/PcfFontFile.pyi
Normal file
25
stubs/Pillow/PIL/PcfFontFile.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from typing import Any
|
||||
|
||||
from .FontFile import FontFile
|
||||
|
||||
PCF_MAGIC: int
|
||||
PCF_PROPERTIES: Any
|
||||
PCF_ACCELERATORS: Any
|
||||
PCF_METRICS: Any
|
||||
PCF_BITMAPS: Any
|
||||
PCF_INK_METRICS: Any
|
||||
PCF_BDF_ENCODINGS: Any
|
||||
PCF_SWIDTHS: Any
|
||||
PCF_GLYPH_NAMES: Any
|
||||
PCF_BDF_ACCELERATORS: Any
|
||||
BYTES_PER_ROW: Any
|
||||
|
||||
def sz(s, o): ...
|
||||
|
||||
class PcfFontFile(FontFile):
|
||||
name: str
|
||||
charset_encoding: Any
|
||||
toc: Any
|
||||
fp: Any
|
||||
info: Any
|
||||
def __init__(self, fp, charset_encoding: str = ...) -> None: ...
|
||||
11
stubs/Pillow/PIL/PcxImagePlugin.pyi
Normal file
11
stubs/Pillow/PIL/PcxImagePlugin.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
logger: Any
|
||||
|
||||
class PcxImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
SAVE: Any
|
||||
0
stubs/Pillow/PIL/PdfImagePlugin.pyi
Normal file
0
stubs/Pillow/PIL/PdfImagePlugin.pyi
Normal file
158
stubs/Pillow/PIL/PdfParser.pyi
Normal file
158
stubs/Pillow/PIL/PdfParser.pyi
Normal file
@@ -0,0 +1,158 @@
|
||||
import collections
|
||||
from typing import Any, List
|
||||
|
||||
def encode_text(s: str) -> bytes: ...
|
||||
|
||||
PDFDocEncoding: dict[int, str]
|
||||
|
||||
def decode_text(b: bytes) -> str: ...
|
||||
|
||||
class PdfFormatError(RuntimeError): ...
|
||||
|
||||
def check_format_condition(condition, error_message) -> None: ...
|
||||
|
||||
class IndirectReference:
|
||||
def __bytes__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class IndirectObjectDef(IndirectReference): ...
|
||||
|
||||
class XrefTable:
|
||||
existing_entries: Any
|
||||
new_entries: Any
|
||||
deleted_entries: Any
|
||||
reading_finished: bool
|
||||
def __init__(self) -> None: ...
|
||||
def __setitem__(self, key, value) -> None: ...
|
||||
def __getitem__(self, key): ...
|
||||
def __delitem__(self, key) -> None: ...
|
||||
def __contains__(self, key): ...
|
||||
def __len__(self): ...
|
||||
def keys(self): ...
|
||||
def write(self, f): ...
|
||||
|
||||
class PdfName:
|
||||
name: Any
|
||||
def __init__(self, name) -> None: ...
|
||||
def name_as_str(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
@classmethod
|
||||
def from_pdf_stream(cls, data): ...
|
||||
allowed_chars: Any
|
||||
def __bytes__(self): ...
|
||||
|
||||
class PdfArray(List[Any]):
|
||||
def __bytes__(self): ...
|
||||
|
||||
class PdfDict(collections.UserDict):
|
||||
def __setattr__(self, key, value) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __bytes__(self): ...
|
||||
|
||||
class PdfBinary:
|
||||
data: Any
|
||||
def __init__(self, data) -> None: ...
|
||||
def __bytes__(self): ...
|
||||
|
||||
class PdfStream:
|
||||
dictionary: Any
|
||||
buf: Any
|
||||
def __init__(self, dictionary, buf) -> None: ...
|
||||
def decode(self): ...
|
||||
|
||||
def pdf_repr(x: Any) -> bytes: ...
|
||||
|
||||
class PdfParser:
|
||||
filename: Any
|
||||
buf: Any
|
||||
f: Any
|
||||
start_offset: Any
|
||||
should_close_buf: bool
|
||||
should_close_file: bool
|
||||
cached_objects: Any
|
||||
file_size_total: int
|
||||
root: Any
|
||||
root_ref: Any
|
||||
info: Any
|
||||
info_ref: Any
|
||||
page_tree_root: Any
|
||||
pages: Any
|
||||
orig_pages: Any
|
||||
pages_ref: Any
|
||||
last_xref_section_offset: Any
|
||||
trailer_dict: Any
|
||||
xref_table: Any
|
||||
def __init__(
|
||||
self, filename: Any | None = ..., f: Any | None = ..., buf: Any | None = ..., start_offset: int = ..., mode: str = ...
|
||||
) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||
def start_writing(self) -> None: ...
|
||||
def close_buf(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def seek_end(self) -> None: ...
|
||||
def write_header(self) -> None: ...
|
||||
def write_comment(self, s) -> None: ...
|
||||
def write_catalog(self): ...
|
||||
def rewrite_pages(self) -> None: ...
|
||||
def write_xref_and_trailer(self, new_root_ref: Any | None = ...) -> None: ...
|
||||
def write_page(self, ref, *objs, **dict_obj): ...
|
||||
def write_obj(self, ref, *objs, **dict_obj): ...
|
||||
def del_root(self) -> None: ...
|
||||
@staticmethod
|
||||
def get_buf_from_file(f): ...
|
||||
file_size_this: Any
|
||||
def read_pdf_info(self) -> None: ...
|
||||
def next_object_id(self, offset: Any | None = ...): ...
|
||||
delimiter: bytes
|
||||
delimiter_or_ws: bytes
|
||||
whitespace: bytes
|
||||
whitespace_or_hex: bytes
|
||||
whitespace_optional: Any
|
||||
whitespace_mandatory: Any
|
||||
whitespace_optional_no_nl: bytes
|
||||
newline_only: bytes
|
||||
newline: Any
|
||||
re_trailer_end: Any
|
||||
re_trailer_prev: Any
|
||||
def read_trailer(self) -> None: ...
|
||||
def read_prev_trailer(self, xref_section_offset) -> None: ...
|
||||
re_whitespace_optional: Any
|
||||
re_name: Any
|
||||
re_dict_start: Any
|
||||
re_dict_end: Any
|
||||
@classmethod
|
||||
def interpret_trailer(cls, trailer_data): ...
|
||||
re_hashes_in_name: Any
|
||||
@classmethod
|
||||
def interpret_name(cls, raw, as_text: bool = ...): ...
|
||||
re_null: Any
|
||||
re_true: Any
|
||||
re_false: Any
|
||||
re_int: Any
|
||||
re_real: Any
|
||||
re_array_start: Any
|
||||
re_array_end: Any
|
||||
re_string_hex: Any
|
||||
re_string_lit: Any
|
||||
re_indirect_reference: Any
|
||||
re_indirect_def_start: Any
|
||||
re_indirect_def_end: Any
|
||||
re_comment: Any
|
||||
re_stream_start: Any
|
||||
re_stream_end: Any
|
||||
@classmethod
|
||||
def get_value(cls, data, offset, expect_indirect: Any | None = ..., max_nesting: int = ...): ...
|
||||
re_lit_str_token: Any
|
||||
escaped_chars: Any
|
||||
@classmethod
|
||||
def get_literal_string(cls, data, offset): ...
|
||||
re_xref_section_start: Any
|
||||
re_xref_subsection_start: Any
|
||||
re_xref_entry: Any
|
||||
def read_xref_table(self, xref_section_offset): ...
|
||||
def read_indirect(self, ref, max_nesting: int = ...): ...
|
||||
def linearize_page_tree(self, node: Any | None = ...): ...
|
||||
5
stubs/Pillow/PIL/PixarImagePlugin.pyi
Normal file
5
stubs/Pillow/PIL/PixarImagePlugin.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class PixarImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
110
stubs/Pillow/PIL/PngImagePlugin.pyi
Normal file
110
stubs/Pillow/PIL/PngImagePlugin.pyi
Normal file
@@ -0,0 +1,110 @@
|
||||
from typing import Any
|
||||
|
||||
from ._binary import o8 as o8
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
logger: Any
|
||||
is_cid: Any
|
||||
MAX_TEXT_CHUNK: Any
|
||||
MAX_TEXT_MEMORY: Any
|
||||
APNG_DISPOSE_OP_NONE: int
|
||||
APNG_DISPOSE_OP_BACKGROUND: int
|
||||
APNG_DISPOSE_OP_PREVIOUS: int
|
||||
APNG_BLEND_OP_SOURCE: int
|
||||
APNG_BLEND_OP_OVER: int
|
||||
|
||||
class ChunkStream:
|
||||
fp: Any
|
||||
queue: Any
|
||||
def __init__(self, fp) -> None: ...
|
||||
def read(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def push(self, cid, pos, length) -> None: ...
|
||||
def call(self, cid, pos, length): ...
|
||||
def crc(self, cid, data) -> None: ...
|
||||
def crc_skip(self, cid, data) -> None: ...
|
||||
def verify(self, endchunk: bytes = ...): ...
|
||||
|
||||
class iTXt(str):
|
||||
lang: Any
|
||||
tkey: Any
|
||||
@staticmethod
|
||||
def __new__(cls, text, lang: Any | None = ..., tkey: Any | None = ...): ...
|
||||
|
||||
class PngInfo:
|
||||
chunks: Any
|
||||
def __init__(self) -> None: ...
|
||||
def add(self, cid, data, after_idat: bool = ...) -> None: ...
|
||||
def add_itxt(self, key, value, lang: str = ..., tkey: str = ..., zip: bool = ...) -> None: ...
|
||||
def add_text(self, key, value, zip: bool = ...): ...
|
||||
|
||||
class PngStream(ChunkStream):
|
||||
im_info: Any
|
||||
im_text: Any
|
||||
im_size: Any
|
||||
im_mode: Any
|
||||
im_tile: Any
|
||||
im_palette: Any
|
||||
im_custom_mimetype: Any
|
||||
im_n_frames: Any
|
||||
rewind_state: Any
|
||||
text_memory: int
|
||||
def __init__(self, fp) -> None: ...
|
||||
def check_text_memory(self, chunklen) -> None: ...
|
||||
def save_rewind(self) -> None: ...
|
||||
def rewind(self) -> None: ...
|
||||
def chunk_iCCP(self, pos, length): ...
|
||||
def chunk_IHDR(self, pos, length): ...
|
||||
im_idat: Any
|
||||
def chunk_IDAT(self, pos, length) -> None: ...
|
||||
def chunk_IEND(self, pos, length) -> None: ...
|
||||
def chunk_PLTE(self, pos, length): ...
|
||||
def chunk_tRNS(self, pos, length): ...
|
||||
def chunk_gAMA(self, pos, length): ...
|
||||
def chunk_cHRM(self, pos, length): ...
|
||||
def chunk_sRGB(self, pos, length): ...
|
||||
def chunk_pHYs(self, pos, length): ...
|
||||
def chunk_tEXt(self, pos, length): ...
|
||||
def chunk_zTXt(self, pos, length): ...
|
||||
def chunk_iTXt(self, pos, length): ...
|
||||
def chunk_eXIf(self, pos, length): ...
|
||||
def chunk_acTL(self, pos, length): ...
|
||||
def chunk_fcTL(self, pos, length): ...
|
||||
def chunk_fdAT(self, pos, length): ...
|
||||
|
||||
class PngImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
@property
|
||||
def text(self): ...
|
||||
fp: Any
|
||||
def verify(self) -> None: ...
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
decoderconfig: Any
|
||||
def load_prepare(self) -> None: ...
|
||||
def load_read(self, read_bytes): ...
|
||||
png: Any
|
||||
im: Any
|
||||
pyaccess: Any
|
||||
def load_end(self) -> None: ...
|
||||
def getexif(self): ...
|
||||
|
||||
def putchunk(fp, cid, *data) -> None: ...
|
||||
|
||||
class _idat:
|
||||
fp: Any
|
||||
chunk: Any
|
||||
def __init__(self, fp, chunk) -> None: ...
|
||||
def write(self, data) -> None: ...
|
||||
|
||||
class _fdat:
|
||||
fp: Any
|
||||
chunk: Any
|
||||
seq_num: Any
|
||||
def __init__(self, fp, chunk, seq_num) -> None: ...
|
||||
def write(self, data) -> None: ...
|
||||
|
||||
def getchunks(im, **params): ...
|
||||
10
stubs/Pillow/PIL/PpmImagePlugin.pyi
Normal file
10
stubs/Pillow/PIL/PpmImagePlugin.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
b_whitespace: bytes
|
||||
MODES: Any
|
||||
|
||||
class PpmImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
17
stubs/Pillow/PIL/PsdImagePlugin.pyi
Normal file
17
stubs/Pillow/PIL/PsdImagePlugin.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MODES: Any
|
||||
|
||||
class PsdImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
mode: Any
|
||||
tile: Any
|
||||
frame: Any
|
||||
fp: Any
|
||||
def seek(self, layer): ...
|
||||
def tell(self): ...
|
||||
im: Any
|
||||
def load_prepare(self) -> None: ...
|
||||
62
stubs/Pillow/PIL/PyAccess.pyi
Normal file
62
stubs/Pillow/PIL/PyAccess.pyi
Normal file
@@ -0,0 +1,62 @@
|
||||
from typing import Any
|
||||
|
||||
defs: str
|
||||
ffi: Any
|
||||
logger: Any
|
||||
|
||||
class PyAccess:
|
||||
readonly: Any
|
||||
image8: Any
|
||||
image32: Any
|
||||
image: Any
|
||||
def __init__(self, img, readonly: bool = ...) -> None: ...
|
||||
def __setitem__(self, xy, color): ...
|
||||
def __getitem__(self, xy): ...
|
||||
putpixel: Any
|
||||
getpixel: Any
|
||||
def check_xy(self, xy): ...
|
||||
|
||||
class _PyAccess32_2(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccess32_3(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccess32_4(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccess8(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccessI16_N(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccessI16_L(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccessI16_B(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccessI32_N(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccessI32_Swap(PyAccess):
|
||||
def reverse(self, i): ...
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
class _PyAccessF(PyAccess):
|
||||
def get_pixel(self, x, y): ...
|
||||
def set_pixel(self, x, y, color) -> None: ...
|
||||
|
||||
mode_map: Any
|
||||
|
||||
def new(img, readonly: bool = ...): ...
|
||||
12
stubs/Pillow/PIL/SgiImagePlugin.pyi
Normal file
12
stubs/Pillow/PIL/SgiImagePlugin.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile, PyDecoder
|
||||
|
||||
MODES: Any
|
||||
|
||||
class SgiImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
class SGI16Decoder(PyDecoder):
|
||||
def decode(self, buffer): ...
|
||||
28
stubs/Pillow/PIL/SpiderImagePlugin.pyi
Normal file
28
stubs/Pillow/PIL/SpiderImagePlugin.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
def isInt(f: object) -> Literal[0, 1]: ...
|
||||
|
||||
iforms: Any
|
||||
|
||||
def isSpiderHeader(t): ...
|
||||
def isSpiderImage(filename): ...
|
||||
|
||||
class SpiderImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
@property
|
||||
def n_frames(self): ...
|
||||
@property
|
||||
def is_animated(self): ...
|
||||
def tell(self): ...
|
||||
stkoffset: Any
|
||||
fp: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def convert2byte(self, depth: int = ...): ...
|
||||
def tkPhotoImage(self): ...
|
||||
|
||||
def loadImageSeries(filelist: Any | None = ...): ...
|
||||
def makeSpiderHeader(im): ...
|
||||
5
stubs/Pillow/PIL/SunImagePlugin.pyi
Normal file
5
stubs/Pillow/PIL/SunImagePlugin.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class SunImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
10
stubs/Pillow/PIL/TarIO.pyi
Normal file
10
stubs/Pillow/PIL/TarIO.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any
|
||||
|
||||
from .ContainerIO import ContainerIO
|
||||
|
||||
class TarIO(ContainerIO):
|
||||
fh: Any
|
||||
def __init__(self, tarfile, file) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
11
stubs/Pillow/PIL/TgaImagePlugin.pyi
Normal file
11
stubs/Pillow/PIL/TgaImagePlugin.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MODES: Any
|
||||
|
||||
class TgaImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
|
||||
SAVE: Any
|
||||
189
stubs/Pillow/PIL/TiffImagePlugin.pyi
Normal file
189
stubs/Pillow/PIL/TiffImagePlugin.pyi
Normal file
@@ -0,0 +1,189 @@
|
||||
from collections.abc import MutableMapping
|
||||
from numbers import Rational
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
logger: Any
|
||||
READ_LIBTIFF: bool
|
||||
WRITE_LIBTIFF: bool
|
||||
IFD_LEGACY_API: bool
|
||||
II: bytes
|
||||
MM: bytes
|
||||
IMAGEWIDTH: int
|
||||
IMAGELENGTH: int
|
||||
BITSPERSAMPLE: int
|
||||
COMPRESSION: int
|
||||
PHOTOMETRIC_INTERPRETATION: int
|
||||
FILLORDER: int
|
||||
IMAGEDESCRIPTION: int
|
||||
STRIPOFFSETS: int
|
||||
SAMPLESPERPIXEL: int
|
||||
ROWSPERSTRIP: int
|
||||
STRIPBYTECOUNTS: int
|
||||
X_RESOLUTION: int
|
||||
Y_RESOLUTION: int
|
||||
PLANAR_CONFIGURATION: int
|
||||
RESOLUTION_UNIT: int
|
||||
TRANSFERFUNCTION: int
|
||||
SOFTWARE: int
|
||||
DATE_TIME: int
|
||||
ARTIST: int
|
||||
PREDICTOR: int
|
||||
COLORMAP: int
|
||||
TILEOFFSETS: int
|
||||
SUBIFD: int
|
||||
EXTRASAMPLES: int
|
||||
SAMPLEFORMAT: int
|
||||
JPEGTABLES: int
|
||||
REFERENCEBLACKWHITE: int
|
||||
COPYRIGHT: int
|
||||
IPTC_NAA_CHUNK: int
|
||||
PHOTOSHOP_CHUNK: int
|
||||
ICCPROFILE: int
|
||||
EXIFIFD: int
|
||||
XMP: int
|
||||
JPEGQUALITY: int
|
||||
IMAGEJ_META_DATA_BYTE_COUNTS: int
|
||||
IMAGEJ_META_DATA: int
|
||||
COMPRESSION_INFO: Any
|
||||
COMPRESSION_INFO_REV: Any
|
||||
OPEN_INFO: Any
|
||||
PREFIXES: Any
|
||||
|
||||
class IFDRational(Rational):
|
||||
def __init__(self, value, denominator: int = ...) -> None: ...
|
||||
@property
|
||||
def numerator(a): ...
|
||||
@property
|
||||
def denominator(a): ...
|
||||
def limit_rational(self, max_denominator): ...
|
||||
def __hash__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
__add__: Any
|
||||
__radd__: Any
|
||||
__sub__: Any
|
||||
__rsub__: Any
|
||||
__mul__: Any
|
||||
__rmul__: Any
|
||||
__truediv__: Any
|
||||
__rtruediv__: Any
|
||||
__floordiv__: Any
|
||||
__rfloordiv__: Any
|
||||
__mod__: Any
|
||||
__rmod__: Any
|
||||
__pow__: Any
|
||||
__rpow__: Any
|
||||
__pos__: Any
|
||||
__neg__: Any
|
||||
__abs__: Any
|
||||
__trunc__: Any
|
||||
__lt__: Any
|
||||
__gt__: Any
|
||||
__le__: Any
|
||||
__ge__: Any
|
||||
__bool__: Any
|
||||
__ceil__: Any
|
||||
__floor__: Any
|
||||
__round__: Any
|
||||
|
||||
class ImageFileDirectory_v2(MutableMapping[int, Any]):
|
||||
tagtype: dict[int, int]
|
||||
def __init__(self, ifh: bytes = ..., prefix: Any | None = ...) -> None: ...
|
||||
prefix: Any
|
||||
offset: Any
|
||||
@property
|
||||
def legacy_api(self) -> bool: ...
|
||||
def reset(self) -> None: ...
|
||||
def named(self): ...
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, tag): ...
|
||||
def __contains__(self, tag): ...
|
||||
def __setitem__(self, tag, value) -> None: ...
|
||||
def __delitem__(self, tag) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def load_byte(self, data, legacy_api: bool = ...): ...
|
||||
def write_byte(self, data): ...
|
||||
def load_string(self, data, legacy_api: bool = ...): ...
|
||||
def write_string(self, value): ...
|
||||
def load_rational(self, data, legacy_api: bool = ...): ...
|
||||
def write_rational(self, *values): ...
|
||||
def load_undefined(self, data, legacy_api: bool = ...): ...
|
||||
def write_undefined(self, value): ...
|
||||
def load_signed_rational(self, data, legacy_api: bool = ...): ...
|
||||
def write_signed_rational(self, *values): ...
|
||||
def load(self, fp) -> None: ...
|
||||
def tobytes(self, offset: int = ...): ...
|
||||
def save(self, fp): ...
|
||||
|
||||
name: Any
|
||||
|
||||
class ImageFileDirectory_v1(ImageFileDirectory_v2):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
tags: Any
|
||||
tagdata: Any
|
||||
tagtype: dict[int, int]
|
||||
@classmethod
|
||||
def from_v2(cls, original): ...
|
||||
def to_v2(self): ...
|
||||
def __contains__(self, tag): ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __setitem__(self, tag, value) -> None: ...
|
||||
def __getitem__(self, tag): ...
|
||||
|
||||
ImageFileDirectory = ImageFileDirectory_v1
|
||||
|
||||
class TiffImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
tag_v2: Any
|
||||
tag: Any
|
||||
def __init__(self, fp: Any | None = ..., filename: Any | None = ...) -> None: ...
|
||||
@property
|
||||
def n_frames(self): ...
|
||||
im: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
def load(self): ...
|
||||
def load_end(self) -> None: ...
|
||||
|
||||
SAVE_INFO: Any
|
||||
|
||||
class AppendingTiffWriter:
|
||||
fieldSizes: Any
|
||||
Tags: Any
|
||||
f: Any
|
||||
close_fp: bool
|
||||
name: Any
|
||||
beginning: Any
|
||||
def __init__(self, fn, new: bool = ...) -> None: ...
|
||||
whereToWriteNewIFDOffset: Any
|
||||
offsetOfNewPage: int
|
||||
IIMM: Any
|
||||
isFirst: bool
|
||||
def setup(self) -> None: ...
|
||||
def finalize(self) -> None: ...
|
||||
def newFrame(self) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||
def tell(self): ...
|
||||
def seek(self, offset, whence=...): ...
|
||||
def goToEnd(self) -> None: ...
|
||||
endian: Any
|
||||
longFmt: Any
|
||||
shortFmt: Any
|
||||
tagFormat: Any
|
||||
def setEndian(self, endian) -> None: ...
|
||||
def skipIFDs(self) -> None: ...
|
||||
def write(self, data): ...
|
||||
def readShort(self): ...
|
||||
def readLong(self): ...
|
||||
def rewriteLastShortToLong(self, value) -> None: ...
|
||||
def rewriteLastShort(self, value) -> None: ...
|
||||
def rewriteLastLong(self, value) -> None: ...
|
||||
def writeShort(self, value) -> None: ...
|
||||
def writeLong(self, value) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def fixIFD(self) -> None: ...
|
||||
def fixOffsets(self, count, isShort: bool = ..., isLong: bool = ...) -> None: ...
|
||||
27
stubs/Pillow/PIL/TiffTags.pyi
Normal file
27
stubs/Pillow/PIL/TiffTags.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
from typing import Any
|
||||
|
||||
class TagInfo:
|
||||
def __new__(
|
||||
cls, value: Any | None = ..., name: str = ..., type: Any | None = ..., length: Any | None = ..., enum: Any | None = ...
|
||||
): ...
|
||||
def cvt_enum(self, value): ...
|
||||
|
||||
def lookup(tag): ...
|
||||
|
||||
BYTE: int
|
||||
ASCII: int
|
||||
SHORT: int
|
||||
LONG: int
|
||||
RATIONAL: int
|
||||
SIGNED_BYTE: int
|
||||
UNDEFINED: int
|
||||
SIGNED_SHORT: int
|
||||
SIGNED_LONG: int
|
||||
SIGNED_RATIONAL: int
|
||||
FLOAT: int
|
||||
DOUBLE: int
|
||||
IFD: int
|
||||
TAGS_V2: Any
|
||||
TAGS: Any
|
||||
TYPES: Any
|
||||
LIBTIFF_CORE: Any
|
||||
3
stubs/Pillow/PIL/WalImageFile.pyi
Normal file
3
stubs/Pillow/PIL/WalImageFile.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
def open(filename): ...
|
||||
|
||||
quake2palette: bytes
|
||||
14
stubs/Pillow/PIL/WebPImagePlugin.pyi
Normal file
14
stubs/Pillow/PIL/WebPImagePlugin.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
SUPPORTED: bool
|
||||
|
||||
class WebPImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def seek(self, frame) -> None: ...
|
||||
fp: Any
|
||||
tile: Any
|
||||
def load(self): ...
|
||||
def tell(self): ...
|
||||
15
stubs/Pillow/PIL/WmfImagePlugin.pyi
Normal file
15
stubs/Pillow/PIL/WmfImagePlugin.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class WmfHandler:
|
||||
bbox: Any
|
||||
def open(self, im) -> None: ...
|
||||
def load(self, im): ...
|
||||
|
||||
class WmfStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def load(self, dpi: Any | None = ...) -> None: ...
|
||||
7
stubs/Pillow/PIL/XVThumbImagePlugin.pyi
Normal file
7
stubs/Pillow/PIL/XVThumbImagePlugin.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
PALETTE: bytes
|
||||
|
||||
class XVThumbImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
9
stubs/Pillow/PIL/XbmImagePlugin.pyi
Normal file
9
stubs/Pillow/PIL/XbmImagePlugin.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
xbm_head: Any
|
||||
|
||||
class XbmImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
10
stubs/Pillow/PIL/XpmImagePlugin.pyi
Normal file
10
stubs/Pillow/PIL/XpmImagePlugin.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
xpm_head: Any
|
||||
|
||||
class XpmImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
def load_read(self, bytes): ...
|
||||
@@ -1,8 +1,3 @@
|
||||
from typing import Any
|
||||
|
||||
__version__: str
|
||||
|
||||
class UnidentifiedImageError(OSError): ...
|
||||
|
||||
# Submodules are missing, __init__.pyi itself is complete.
|
||||
def __getattr__(__name: str) -> Any: ... # incomplete
|
||||
|
||||
0
stubs/Pillow/PIL/__main__.pyi
Normal file
0
stubs/Pillow/PIL/__main__.pyi
Normal file
12
stubs/Pillow/PIL/_binary.pyi
Normal file
12
stubs/Pillow/PIL/_binary.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
def i8(c): ...
|
||||
def o8(i): ...
|
||||
def i16le(c, o: int = ...): ...
|
||||
def si16le(c, o: int = ...): ...
|
||||
def i32le(c, o: int = ...): ...
|
||||
def si32le(c, o: int = ...): ...
|
||||
def i16be(c, o: int = ...): ...
|
||||
def i32be(c, o: int = ...): ...
|
||||
def o16le(i): ...
|
||||
def o32le(i): ...
|
||||
def o16be(i): ...
|
||||
def o32be(i): ...
|
||||
@@ -1,3 +1,4 @@
|
||||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
@@ -7,4 +8,8 @@ HUFFMAN_ONLY: Literal[2]
|
||||
RLE: Literal[3]
|
||||
FIXED: Literal[4]
|
||||
|
||||
class _Path:
|
||||
def __getattr__(self, item: str) -> Any: ... # incomplete
|
||||
|
||||
def path(__x: Sequence[tuple[float, float]] | Sequence[float]) -> _Path: ...
|
||||
def __getattr__(__name: str) -> Any: ... # incomplete
|
||||
|
||||
2
stubs/Pillow/PIL/_tkinter_finder.pyi
Normal file
2
stubs/Pillow/PIL/_tkinter_finder.pyi
Normal file
@@ -0,0 +1,2 @@
|
||||
TKINTER_LIB: str
|
||||
tk_version: str
|
||||
9
stubs/Pillow/PIL/_util.pyi
Normal file
9
stubs/Pillow/PIL/_util.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import NoReturn
|
||||
|
||||
def isPath(f: object) -> bool: ...
|
||||
def isDirectory(f: object) -> bool: ...
|
||||
|
||||
class deferred_error:
|
||||
ex: BaseException
|
||||
def __init__(self, ex: BaseException) -> None: ...
|
||||
def __getattr__(self, elt: str) -> NoReturn: ...
|
||||
23
stubs/Pillow/PIL/features.pyi
Normal file
23
stubs/Pillow/PIL/features.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
from typing import Any
|
||||
|
||||
modules: Any
|
||||
|
||||
def check_module(feature): ...
|
||||
def version_module(feature): ...
|
||||
def get_supported_modules(): ...
|
||||
|
||||
codecs: Any
|
||||
|
||||
def check_codec(feature): ...
|
||||
def version_codec(feature): ...
|
||||
def get_supported_codecs(): ...
|
||||
|
||||
features: Any
|
||||
|
||||
def check_feature(feature): ...
|
||||
def version_feature(feature): ...
|
||||
def get_supported_features(): ...
|
||||
def check(feature): ...
|
||||
def version(feature): ...
|
||||
def get_supported(): ...
|
||||
def pilinfo(out: Any | None = ..., supported_formats: bool = ...) -> None: ...
|
||||
Reference in New Issue
Block a user