Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
rupeshs
/
fastsdcpu
like
11
Running
App
Files
Files
Community
1
main
fastsdcpu
/
image_ops.py
rupeshs
added files
ef20d79
10 months ago
raw
Copy download link
history
blame
contribute
delete
Safe
262 Bytes
from
PIL
import
Image
def
resize_pil_image
(
pil_image: Image,
image_width,
image_height,
):
return
pil_image.convert(
"RGB"
).resize(
(
image_width,
image_height,
),
Image.Resampling.LANCZOS,
)