pil-resize-aspect-ratio 0.0.8

Last updated:

0 purchases

pil-resize-aspect-ratio 0.0.8 Image
pil-resize-aspect-ratio 0.0.8 Images
Add to Cart

Description:

pilresizeaspectratio 0.0.8

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
noraise, Pillow

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.