Skip to content

Commit d2ec75a

Browse files
committed
Add type hints
1 parent 95e35f5 commit d2ec75a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PIL/Image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3342,7 +3342,7 @@ def _open_core(fp, filename, prefix, formats):
33423342
# Image processing.
33433343

33443344

3345-
def alpha_composite(im1, im2):
3345+
def alpha_composite(im1: Image, im2: Image) -> Image:
33463346
"""
33473347
Alpha composite im2 over im1.
33483348
@@ -3357,7 +3357,7 @@ def alpha_composite(im1, im2):
33573357
return im1._new(core.alpha_composite(im1.im, im2.im))
33583358

33593359

3360-
def blend(im1, im2, alpha):
3360+
def blend(im1: Image, im2: Image, alpha: float) -> Image:
33613361
"""
33623362
Creates a new image by interpolating between two input images, using
33633363
a constant alpha::
@@ -3380,7 +3380,7 @@ def blend(im1, im2, alpha):
33803380
return im1._new(core.blend(im1.im, im2.im, alpha))
33813381

33823382

3383-
def composite(image1, image2, mask):
3383+
def composite(image1: Image, image2: Image, mask: Image) -> Image:
33843384
"""
33853385
Create composite image by blending images using a transparency mask.
33863386

0 commit comments

Comments
 (0)