Skip to content

Commit c4e316a

Browse files
committed
Image Crop By Ratio and resize added
1 parent 3c76ed0 commit c4e316a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nodes/image_nodes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def execute(self, image, width_ratio, height_ratio, position):
7171
width = ow
7272
height = target_ratio * width
7373

74+
width, height = int(width), int(height)
7475

7576
x = round((ow - width) / 2)
7677
y = round((oh - height) / 2)
@@ -157,6 +158,8 @@ def execute(self, image, width_ratio_size, height_ratio_size, position, interpol
157158
width = ow
158159
height = target_ratio * width
159160

161+
width, height = int(width), int(height)
162+
160163
# if "center" in position:
161164
x = round((ow - width) / 2)
162165
y = round((oh - height) / 2)

0 commit comments

Comments
 (0)