Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
michaelj
/
testlcm
like
4
Running
App
Files
Files
Community
17e6751
testlcm
/
image_ops.py
michaelj
Upload folder using huggingface_hub
360d274
about 1 year 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,
)