convert pixel back to int
This commit is contained in:
parent
47df0ecaff
commit
5c3d42876f
|
@ -105,9 +105,9 @@ def get_latents_from_seed(seed: int, width: int, height: int) -> np.ndarray:
|
|||
def blend_pixel(source: Tuple[int, int, int], mask: Tuple[int, int, int], noise: int) -> Tuple[int, int, int]:
|
||||
offset = (float(noise) / 256) - 0.25
|
||||
return (
|
||||
source[0] + (mask[0] * offset),
|
||||
source[1] + (mask[1] * offset),
|
||||
source[2] + (mask[2] * offset),
|
||||
int(source[0] + (mask[0] * offset)),
|
||||
int(source[1] + (mask[1] * offset)),
|
||||
int(source[2] + (mask[2] * offset)),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue