Executes command line for each PNG from standard input and forwards their output to stdout.
Project description
eachpng
Executes command line for each PNG from standard input and forwards their output to stdout. This can be useful if you are want to generate an animated GIF (e.g. which gifsicle) but coming from a stream of of PNGs (which cannot be converted via ImageMagick as such).
Installing
$ pip install .
Running tests
$ nosetests tests
Usage
Here’s an example how to convert a stream of PNGs to an animated GIF. This example uses:
seq to create a sequence of numbers (stream: many lines with a number each line), uses
xargs to call a fictitious program ./tool that produces a PNG for each call (stream: sequence of PNGs)
eachpng calling ImageMagick convert for each PNG to convert it to GIF (stream: sequence if GIFs)
gifsicle operating taking the sequence of GIFs to produce an animated GIF
$ seq 0 33 12000 | \
xargs -L 1 -I TC ./tool -t TC -o - | \
eachpng convert - GIF:- | \
gifsicle --multifile --delay 3 -O3 >out.gif
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file eachpng-0.0.2.tar.gz
.
File metadata
- Download URL: eachpng-0.0.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57d7bd147464a8d0680e77c8af310d7451e429659567da52e2fa948f5a3f7125 |
|
MD5 | 5bf24da6ceffa9820462cae600ab651a |
|
BLAKE2b-256 | 61309b1a94d52f03a2a0215b6b84872f77c96570528f91a02eccdc8395569d89 |