Skip to content

simonsanchezart/parallax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallax

Made with Love MIT License

Parallax is a simple CLI tool to join multiple .png's and output a layered .gif parallax animation.

Demo

parallax.py -i l1.png l2.png l3.png l4.png -os 2.0 -ls 1 2 4 8 -o forest

Output:

Loading l1.png
Loading l2.png
Loading l3.png
Loading l4.png
Layer speeds: [1, 2, 4, 8]
Saving 'forest.gif', 180 frames, (360, 180) px
Done!

Output

Installation

To use this tool, ensure you have Python installed. You can install the required dependencies using pip:

pip install -r requirements.txt

Usage

Fastest way to use it is parallax.py. This will get all .png's in cwd and set layer speeds automatically.

usage: parallax.py [-h] [-i [INPUT ...]] [-fd FRAME_DURATION] [-os OUTPUT_SCALE] [-ls [LAYER_SPEEDS ...]] [-d DIRECTION] [-o OUTPUT]

Takes multiple .png's and creates a scrolling parallax animation with them.

options:
  -h, --help            show this help message and exit
  -i [INPUT ...], --input [INPUT ...]
                        Paths to the .png layer files to use in the animation, if not specified, it will use all .png's in current folder.
  -fd FRAME_DURATION, --frame-duration FRAME_DURATION
                        Length of the animation in frames, default to the width in pixels.
  -os OUTPUT_SCALE, --output-scale OUTPUT_SCALE
                        Scale factor for output image, defaults to 1.0.
  -ls [LAYER_SPEEDS ...], --layer-speeds [LAYER_SPEEDS ...]
                        Sets the speed in pixels per frame for each layer. Number of elements needs to be the same as the amount of layers. Leave empty for automatic speeds.
  -d DIRECTION, --direction DIRECTION
                        Sets the movement direction of the animation. (1) - Left (default) (-1) - Right
  -o OUTPUT, --output OUTPUT
                        Sets the output filename.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages