Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
michaelj
/
testlcm
like
4
Sleeping
App
Files
Files
Community
fa732fd
testlcm
/
image_ops.py
michaelj
Upload folder using huggingface_hub
360d274
12 months ago
raw
Copy download link
history
blame
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,
)