Fix blend if the target image has been upscaled

This commit is contained in:
Sean McLellan 2022-08-26 00:45:19 -04:00
parent 4f1664ec4f
commit f1ffb5b51b

View File

@ -529,6 +529,9 @@ The vast majority of these arguments default to reasonable values.
res = Image.fromarray(restored_img)
if strength < 1.0:
# Resize the image to the new image if the sizes have changed
if restored_img.size != image.size:
res = res.resize(image.size)
res = Image.blend(image, res, strength)
return res