Commit ChannelShake node

This commit is contained in:
chflame163
2024-01-28 21:32:13 +08:00
committed by GitHub
parent 3d6539d121
commit ca98cfea64
5 changed files with 71 additions and 2 deletions
-2
View File
@@ -153,11 +153,9 @@ def __rotate_expand(image:Image, angle:float, SSAA:int=0, method:str="lanczos")
img_us_scaled = img.resize((width * SSAA, height * SSAA), resize_sampler)
img_rotated = img_us_scaled.rotate(angle, rotate_sampler, expand == "true", fillcolor=(0, 0, 0, 0))
img_down_scaled = img_rotated.resize((img_rotated.width // SSAA, img_rotated.height // SSAA), resize_sampler)
# result = img_down_scaled.image_to_tensor()
result = pil2tensor(img_down_scaled)
else:
img_rotated = img.rotate(angle, rotate_sampler, expand == "true", fillcolor=(0, 0, 0, 0))
# result = img_rotated.image_to_tensor()
result = pil2tensor(img_rotated)
return result