Skip to content

Commit 9787733

Browse files
akxradarhere
authored andcommitted
Blend: shortcut to copy when same image pointer is passed in twice
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
1 parent 80ac5e3 commit 9787733

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libImaging/Blend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ImagingBlend(Imaging imIn1, Imaging imIn2, float alpha) {
3535
}
3636

3737
/* Shortcuts */
38-
if (alpha == 0.0) {
38+
if (imIn1 == imIn2 || alpha == 0.0) {
3939
return ImagingCopy(imIn1);
4040
} else if (alpha == 1.0) {
4141
return ImagingCopy(imIn2);

0 commit comments

Comments
 (0)