streamlit_drawable_canvas/__init__.py
def _resize_img(img: Image, new_height: int = 700, new_width: int = 700) -> Image:
    """Resize the image to the provided resolution."""
    h_ratio = new_height / img.height
    w_ratio = new_width / img.width
    img = img.resize((int(img.width * w_ratio), int(img.height * h_ratio)))
    return img
Resize the image to the provided resolution.
Resize the image to the provided resolution.
Resize the image to the provided resolution .
def _resize_img(img: Image, new_height: int = 700, new_width: int = 700) -> Image:
    h_ratio = new_height / img.height
    w_ratio = new_width / img.width
    img = img.resize((int(img.width * w_ratio), int(img.height * h_ratio)))
    return img
def _resize_img ( img : Image , new_height : int = 700 , new_width : int = 700 ) -> Image : h_ratio = new_height / img . height w_ratio = new_width / img . width img = img . resize ( ( int ( img . width * w_ratio ) , int ( img . height * h_ratio ) ) ) return img
Resize the image to the provided resolution.
Resize the image to the provided resolution .
"""Resize the image to the provided resolution."""
img
Image
new_height
int
new_width
int