Small python project to generate movies with a droste effect
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
Manhattanhenge.png
README.md
beach.gif
beach.jpg
manhattanhenge.gif
pydroste.py
pydroste_multiple.py
requirements.in
requirements.txt

README.md

PyDroste

Small python project to generate movies with a droste effect.

Installation

To setup a virtual environment with python3 and the dependencies installed, execute in a shell:

python3 -m venv venv3
source venv3/bin/activate
pip install -r requirements.txt

You can now run the main script:

python pydroste.py --input=beach.jpg \
                   --output=beach.mp4 \
                   --center=1904,1940 \
                   --scale=125

And it should create a zooming in movie:

Beach Movie

Beside the input and output parameters, the important flags are center and scale. center determines the point in the input picture to zoom in on. Scale is the scale of the sub-image compared to the main image. In other words, this is how far you need to zoom in to have the main image be replaced by the sub-image completely and which would complete one loop.

The two other flags you can pass are frames, which determines how many frames the output image will have and fps, which determines how many frames per seconds the output movie will play with.

The pydroste_multiple.py script can render loops with multiple zoom points. The basic pattern is the same, except that a parameter zoom_points needs to be supplied that contains a list of ; separated tuples specifying the various zoom point as center_x,center_y,scale

Manhattanhenge