Eine kleine GIF Spielerei, die leider nur mit dem Original funktioniert, weil die anderen Größen nach jpg konvertiert werden.
Wie es gemacht wurde?
Mit einem kleinen Programm Zufallszahlen für die Rechteck erzeugt, daraus s/w Masken mit ImageMagic erstellt. Die einzelnen Masken über das Original gelegt, und die Einzelbilder zur GIF-Animation zusammengefügt. (Die Originale ware 1200x800 Pixel groß.)
Also etwa folgende Schritte
C-Programm für die Zufallszahlen
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <time.h> int main(int argc, char *argv[ ]) { int zahl , anzahl, i , j; int max[256]; if (argc > 1 ) { anzahl = atoi(argv[1]); for (j=2;j<argc;j++) { max[j-2]=atoi(argv[j]); } } else { anzahl = 1; } srand(time(NULL)); for (i=0;i<anzahl; i++ ) { for (j=0;j<argc-2;j++) { zahl = rand() % max[j]; printf("%d ", zahl); } printf("\n"); } }
Script zur Maskenerzeugung
#!/bin/sh DRAW="" W=1200 H=800 J=0 read x y w h while [ $x ] do DRAW=" -fill white -draw 'rectangle ${x},${y} $((x+w+300)),$((y+h+300))'" echo convert -size ${W}x${H} xc:black $DRAW fenster-`printf %4.4d $J`.png read x y w h J=$((J+1)) done
Befehle an der Unix-Shell
zufallszahl 10 300 200 140 100 | fenster | sh for B in fenster*.png; do convert -composite -compose multiply $B back.jpg x-$B; done convert -delay 100 x-*.png -loop 0 x.gif
Thomas Arend aka Byg… has replied to Daniela clubYou get ImageMagick for Mac and a bash (don't know if there is a bash for mac ).
On MS Windows I installed cygwin (ImageMagick is included) but I have trouble with the font in ImageMagick.
You can always install a virtual amchine (VMWare / VirtualBox / Virtual PC) and use a Linux Live-CD which includes bash and ImageMagick (KNOPPIX should do).
Sign-in to write a comment.