cv2multizoom

Fast multiple zooms on a picture using cv2 and ffmpeg


Keywords
zoom, ffmpeg, cv2, python
License
MIT
Install
pip install cv2multizoom==0.10

Documentation

Fast multiple zooms on a picture using cv2 and ffmpeg

# Allowed image formats: url/path/buffer/base64/PIL/np
# ffmpeg must be installed 
from cv2multizoom import multizoom
multizoom(
    img=r"https://github.com/hansalemaos/screenshots/raw/main/splitted1.png",
    howmanyzooms=10,  # number of output pictures might be a little less than howmanyzooms
    outputfolder=r"F:\cv2mergepics\tt4",  # will be created if it does not exist
    zoomfactor_start=1,
    zoom_speed=2.5,
    framerate=29.97,
    zfill=7,  # 0000001.png instead of 1.png
    prefix="zoompics_",
    threads=5,
)