diff --git a/src/PIL/Image.py b/src/PIL/Image.py index e1418c5ca8b..cdc31e8711e 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -3342,7 +3342,7 @@ def _open_core(fp, filename, prefix, formats): # Image processing. -def alpha_composite(im1, im2): +def alpha_composite(im1: Image, im2: Image) -> Image: """ Alpha composite im2 over im1. @@ -3357,7 +3357,7 @@ def alpha_composite(im1, im2): return im1._new(core.alpha_composite(im1.im, im2.im)) -def blend(im1, im2, alpha): +def blend(im1: Image, im2: Image, alpha: float) -> Image: """ Creates a new image by interpolating between two input images, using a constant alpha:: @@ -3380,7 +3380,7 @@ def blend(im1, im2, alpha): return im1._new(core.blend(im1.im, im2.im, alpha)) -def composite(image1, image2, mask): +def composite(image1: Image, image2: Image, mask: Image) -> Image: """ Create composite image by blending images using a transparency mask.