This project creates animated GIFs of a doll dancing from a segment of the film Mechanical Doll. The output GIF files consist of bilevel images so that they can be shown in quick succession on an e-paper display using the animation (A2) waveform mode, which works only with pure black and white pixels.
See the associated JavaFX project for a video of the animation on an e-paper display.
Mechanical Doll, also known by the title The Dresden Doll, is a short American animated film produced by Max Fleischer and directed by Dave Fleischer. It was released in 1922 by Inkwell Studios as part of the series Out of the Inkwell. Max Fleischer drew the dancing sequence using his recently invented rotoscoping technique on a film of his daughter Ruth, who was 16 years old at the time.
The source video file is in the public domain in the United States.
The other content of this project is licensed under the GNU General Public License v3.0.
The animated GIF files produced by this project are licensed under the Creative Commons Attribution Share Alike 4.0 International license.
The Makefile requires the following programs on your PATH environment variable. Note that ffmpeg is launched from /snap/bin/ffmpeg to use the latest version in the Snap Store.
- ffmpeg – a video converter
- convert – converts between image formats and edits images
- mkbitmap – transforms images into bitmaps with scaling and filtering
- potrace – transforms bitmaps into vector graphics
- inkscape – an SVG editing program
By default, the make
command builds only doll-dancing.gif. To build doll-traced.gif, you must specify it as a target. If you have multiple processor cores on your computer, the build process can go much faster if you pass the jobs option to specify the number of cores. For example:
$ make -j 4 doll-traced.gif
This project creates animated GIF images from the sequence of 360 frames in which the mechanical doll dances, as described below.
-
doll-dancing.gif – the 360-frame sequence created by appending the 180 odd frames with the 180 even frames in reverse, creating a loop with matching endpoints. Uses thresholding with no dithering to create the bilevel images.
-
doll-traced.gif – the same sequence as the previous animation except that the frames are created by tracing each one into a vector graphics format before rendering them into their final size.
The source video is 30 frames per second, but the original animation consists of 24 frames per second, so every 5th frame is a duplicate and removed. The final sequence of odd and even frames runs at 12 frames per second to match the speed of the original animation.
A single frame in the original video is converted as shown in the samples below.
Frame Conversion Samples |
---|
A frame in the original video (480 × 360 px) |
The same frame in doll-dancing.gif (800 × 600 px) |
The same frame in doll-traced.gif (800 × 600 px) |