Spaces:
Runtime error
Runtime error
Update texture_transfer.py
Browse files- texture_transfer.py +3 -3
texture_transfer.py
CHANGED
@@ -9,7 +9,7 @@ def create_layover(background_image, layer_image, opacity):
|
|
9 |
background_img_raw = background_image.convert("RGBA")
|
10 |
background_img = np.array(background_img_raw)
|
11 |
background_img_float = background_img.astype(float)
|
12 |
-
|
13 |
foreground_img_raw = layer_image.convert("RGBA")
|
14 |
foreground_img = np.array(foreground_img_raw)
|
15 |
foreground_img_float = foreground_img.astype(float)
|
@@ -22,8 +22,8 @@ def create_layover(background_image, layer_image, opacity):
|
|
22 |
|
23 |
|
24 |
def create_image_tile(input_patch, x_dim, y_dim):
|
25 |
-
input_image = Image.open(input_patch)
|
26 |
-
input_image =
|
27 |
width, height = input_image.size
|
28 |
output_image = Image.new("RGB", (x_dim, y_dim))
|
29 |
for y in range(0, y_dim, height):
|
|
|
9 |
background_img_raw = background_image.convert("RGBA")
|
10 |
background_img = np.array(background_img_raw)
|
11 |
background_img_float = background_img.astype(float)
|
12 |
+
foreground_img_raw = Image.open(layer_image)
|
13 |
foreground_img_raw = layer_image.convert("RGBA")
|
14 |
foreground_img = np.array(foreground_img_raw)
|
15 |
foreground_img_float = foreground_img.astype(float)
|
|
|
22 |
|
23 |
|
24 |
def create_image_tile(input_patch, x_dim, y_dim):
|
25 |
+
# input_image = Image.open(input_patch)
|
26 |
+
input_image = input_patch.convert("RGB")
|
27 |
width, height = input_image.size
|
28 |
output_image = Image.new("RGB", (x_dim, y_dim))
|
29 |
for y in range(0, y_dim, height):
|