Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
michaelj
/
testlcm
like
4
Running
App
Files
Files
Community
9706c89
testlcm
/
image_ops.py
michaelj
Upload folder using huggingface_hub
44a51c4
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,
)