pil_resize
Project description
pil_resize
Description
Resize/paste images easily keeping their aspect ratio
Install
pip install pil_resize_aspect_ratio
# or
pip3 install pil_resize_aspect_ratio
Usage
from pil_resize_aspect_ratio import Resizer, FillType
p_org_img_bg = 'bg.png'
p_overlay_img = 'fg.png'
path_out = 'final.png'
resized_bg_image = Resizer.resize_keep_aspect_ratio(
image=p_org_img_bg,
fill_type=FillType.Fill,
target_size=(1920, 1080),
return_image_instead_of_success=False
)
print(
Resizer.paste_and_fit(
background_image=resized_bg_image,
foreground_image=p_overlay_img,
path_out=path_out
)
)
Dependencies
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pil_resize_aspect_ratio-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fad3b2d3cd0b627fc7d0cd8f4cb8f4f10b9e785ac6b8e3dc635374b6d82bc37 |
|
MD5 | e34bbe8ce8bbda436d73a22644942ff3 |
|
BLAKE2b-256 | 568dfede3420dd3c0ca7677da1cd66d7d3bb1254ff2764cae4b4d362711610b3 |
Close
Hashes for pil_resize_aspect_ratio-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f981265f9830830e85cf768cf93a9a3bbf5db7c4ea3e6337b43541973983267e |
|
MD5 | efd5ab0f67d07140fc1942c43e755b28 |
|
BLAKE2b-256 | 63d7e8147e5406fcc4a1c436a7a330d975f7dba0451c32126e885ac4561d485e |