| Latest discussions |
|---|
|
Hintergrund ändern bei Makro Aufnahmen (Photoshop)
Updated 6 months ago 2 replies |
|
Links zu Tutorials etc. / Links for tutorials
Updated 10 months ago 1 reply |
|
PDF-Präsentatio n in Photoshop
Updated 10 months ago |
|
Self frame
Updated 10 months ago |
| Kalender with ImageMagick |
|
GIF-Animation mit ImageMagick
Updated 11 months ago |
|
Veränderung mit Photoshop Elements
Updated 11 months ago 6 replies |
|
Rahmen
Updated 11 months ago 1 reply |
|
macrostudio im Eimer
Updated 12 months ago 4 replies |
|
"Available Light" Portrait
Updated 12 months ago 1 reply |
| ... view all the discussions |
|
Kalender with ImageMagickposted by Byggvir of BarleyPosted on Friday December 19, 2008 at 16:37. 52 visits. ( permalink ) |
To create the calender-page I used the followin script, which creates the ImageMagick "convert"-command. The picture is created with following command:
convert 2009 1 bild.jpg | sh
#!/bin/sh
[ $# -lt 3 ] && echo "usage calender YEAR MONTH PICTURE" && exit 1
YEAR=${1}
MONTH=${2}
PICTURE=${3}
# Get width and height of the picture
W=`identify -format "%w" ${PICTURE}`
H=`identify -format "%h" ${PICTURE}`
# Define the number of days in a mmonth
DINM=(31 28 31 30 31 30 31 31 30 31 30 31)
# Define the names ot the days
NOFD=(So Mo Di Mi Do Fr Sa)
NOFM=(Januar Februar März April Mai Juni Juli August September Oktober November Dezember)
PREFIX="ip"
FONT="Andy MT"
PTSIZE=$((H/40))
SIGN="© 2008,2009 by Byggvir of Barley"
echo -e "convert \\"
echo -e "-gravity North \\"
echo -e "-pointsize 128 -family \"$FONT\" \\"
echo -e "-fill Black -draw 'text 32,8 \"${NOFM[$((MONTH-1))]} $YEAR\"' \\"
echo -e "-fill Lightgrey -draw 'text 31,7 \"${NOFM[$((MONTH-1))]} $YEAR\"' \\"
echo -e "-gravity SouthEast \\"
echo -e "-pointsize 16 -family \"$FONT\" \\"
echo -e "-fill Black -draw 'text 32,8 \"$SIGN\"' \\"
echo -e "-fill Lightgrey -draw 'text 31,7 \"$SIGN\"' \\"
echo -e "-gravity NorthWest \\"
echo -e "-pointsize $PTSIZE -family \"$FONT\" \\"
for (( d=1 ; d <= DINM[MONTH-1] ; d++ ))
do
X=$((W*(2*d-1)/2/(DINM[MONTH-1]+1)))
Y=$((H-3*PTSIZE-5))
WDAY=${NOFD[`date +%w -d "$YEAR-$MONTH-$d"`]}
case "$WDAY" in
So) COLOR=Red ;;
Sa) COLOR=MediumVioletRed ;;
* ) COLOR=Lightgrey ;;
esac
echo "-fill Black -draw 'text $X,$Y \"$WDAY\"' \\"
echo "-fill $COLOR -draw " "'text $(($X-1)),$(($Y-1)) \"$WDAY\"' \\"
Y=$((H-2*PTSIZE))
echo "-fill Black -draw 'text $X,$Y \"$d\"' \\"
echo "-fill $COLOR -draw 'text $(($X-1)),$(($Y-1)) \"$d\"' \\"
done
echo "${PICTURE} ${PREFIX}-${PICTURE}"
This topic has been edited by Byggvir of Barley 10 months ago.
You must be logged on to post a reply. Sign in now?
Latest comments
–
Subscribe to the comment feed for this topic.
Gartenfreuden (Wolfgang) pro says: