Latest discussions
Hintergrund ändern bei Makro Aufnahmen (Photoshop)
Updated 5 months ago
2 replies
Links zu Tutorials etc. / Links for tutorials
Updated 9 months ago
1 reply
PDF-Präsentatio n in Photoshop
Updated 10 months ago
Self frame
Updated 10 months ago
Kalender with ImageMagick
Updated 10 months ago
1 reply
GIF-Animation mit ImageMagick
Veränderung mit Photoshop Elements
Updated 11 months ago
6 replies
Rahmen
Updated 11 months ago
1 reply
macrostudio im Eimer
Updated 11 months ago
4 replies
"Available Light" Portrait
Updated 11 months ago
1 reply
... view all the discussions

GIF-Animation mit ImageMagick

posted by Byggvir of Barley
Posted on Wednesday December 17, 2008 at 22:38. 51 visits. ( permalink )

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.


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 r g b
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 r g b
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
(translate into English)

You must be logged on to post a reply. Sign in now?


rss Latest comments – Subscribe to the comment feed for this topic.

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...