1
0
Fork 0

convert pixel back to int

This commit is contained in:
Sean Sube 2023-01-14 14:24:36 -06:00
parent 47df0ecaff
commit 5c3d42876f
1 changed files with 3 additions and 3 deletions

View File

@ -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)),
)