#!/bin/bash

SRC="$HOME/share/math/talk/mappe rigide/Levico"
XML="dewslider.xml"
total=19

cat > $XML <<EOF
<?xml version="1.0" ?>
<!-- this file is automatically generated by createImages.sh do NOT edit -->
  <album 
    showbuttons="no"
    showtitles="yes"
    randomstart="no"
    timer="3"
    aligntitles="bottom"
    alignbuttons="bottom"
    transition="fade"
    speed="20"
  >

EOF


for n in $( seq -w 1 $total ) ; do
  echo "$n/$total"
  echo "<img src='slides/cubeFolding/cubeFolding$n.png' />" >> $XML
  fig2dev -L png -m 0.3 -S 4 "$SRC"/cubeFolding$n.fig tmp.png
#  convert tmp.png -negate tmp2.png
  convert tmp.png -recolor '0.37 0 0   0 0.75 0  0 0 1' cubeFolding$n.png
done

rm tmp.png

echo "</album>" >> $XML


