Skip to content

hansalemaos/cv2_stack_images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stacks 2 images (horizontal/vertical)

$pip install cv2-stack-images
from cv2_stack_images import concat2images

# Allowed image formats: url/path/buffer/base64/PIL/np
# You must pass either width or height, but not both!
# save_path is optional

b1 = concat2images(
    img1=r"https://github.com/hansalemaos/screenshots/raw/main/colorfind3.png",
    img2=r"https://github.com/hansalemaos/screenshots/raw/main/pic4.png",
    width=300,
    save_path="f:\\concatimg\\vertical.png",
)
b2 = concat2images(
    img1=r"https://github.com/hansalemaos/screenshots/raw/main/colorfind3.png",
    img2=r"https://github.com/hansalemaos/screenshots/raw/main/pic4.png",
    height=300,
    save_path="f:\\concatimg\\horizontal.png",
)