fix bug
This commit is contained in:
+4
-2
@@ -153,10 +153,12 @@ 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 = 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 = img_rotated.image_to_tensor()
|
||||
result = pil2tensor(img_rotated)
|
||||
return result
|
||||
|
||||
if angle == 0.0 or angle == 360.0:
|
||||
|
||||
Reference in New Issue
Block a user