@@ -45,6 +45,9 @@ def normal(
4545
4646 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#normal
4747 """
48+ if abs (opacity ) < 1e-6 :
49+ return
50+
4851 pos_x , pos_y = _calculate_position (
4952 base .width , base .height ,
5053 overlay .width , overlay .height ,
@@ -75,6 +78,9 @@ def multiply(
7578
7679 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#multiply
7780 """
81+ if abs (opacity ) < 1e-6 :
82+ return
83+
7884 pos_x , pos_y = _calculate_position (
7985 base .width , base .height ,
8086 overlay .width , overlay .height ,
@@ -105,6 +111,9 @@ def screen(
105111
106112 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#screen
107113 """
114+ if abs (opacity ) < 1e-6 :
115+ return
116+
108117 pos_x , pos_y = _calculate_position (
109118 base .width , base .height ,
110119 overlay .width , overlay .height ,
@@ -135,6 +144,9 @@ def add(
135144
136145 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#add
137146 """
147+ if abs (opacity ) < 1e-6 :
148+ return
149+
138150 pos_x , pos_y = _calculate_position (
139151 base .width , base .height ,
140152 overlay .width , overlay .height ,
@@ -165,6 +177,9 @@ def overlay(
165177
166178 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#overlay
167179 """
180+ if abs (opacity ) < 1e-6 :
181+ return
182+
168183 pos_x , pos_y = _calculate_position (
169184 base .width , base .height ,
170185 overlay .width , overlay .height ,
@@ -195,6 +210,9 @@ def soft_light(
195210
196211 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#soft-light
197212 """
213+ if abs (opacity ) < 1e-6 :
214+ return
215+
198216 pos_x , pos_y = _calculate_position (
199217 base .width , base .height ,
200218 overlay .width , overlay .height ,
@@ -225,6 +243,9 @@ def hard_light(
225243
226244 Docs & Examples: https://offerrall.github.io/pyimagecuda/blend/#hard-light
227245 """
246+ if abs (opacity ) < 1e-6 :
247+ return
248+
228249 pos_x , pos_y = _calculate_position (
229250 base .width , base .height ,
230251 overlay .width , overlay .height ,
0 commit comments