#!/bin/sh
# Webcam Bild mit Pi Cam erstellen und auf FTP hochalden
# (c) Sebastian Hemel

OPTIONS='-w 1920 -h 1080 -q 95 -x'
DATE=$(date +"%d.%m.%Y")
HOUR=$(date +"%R")

#cd /tmp
raspistill -o cam.jpg $OPTIONS
#composite -gravity center overlay.png  cam.jpg  result1.jpg

convert cam.jpg -font Arial \
   -pointsize 14 -fill white -annotate +670+590  \
   $DATE \
   -pointsize 14 -fill white -annotate +750+590  \
   $HOUR \
   -pointsize 14 -draw "gravity southwest \
   fill white text 15,6 'www.webcam-ingolstadt.de | 85051 Ingolstadt' " \
cam.jpg

#/usr/local/bin/send-ftp cam.jpg
#done
