Fix missing color with IM7
[fgen.git] / fgen.sh
diff --git a/fgen.sh b/fgen.sh
index 019e662..fcc1678 100755 (executable)
--- a/fgen.sh
+++ b/fgen.sh
@@ -9,7 +9,7 @@ PROG_NAME=$(basename $0)
 main_layer="Layer 558"
 
 # Pour conversion vidéo:
-fps=3
+fps=8
 
 debug=0
 
@@ -88,14 +88,18 @@ print_usage()
     echo
     echo "Options:"
     echo "  -d   affiche les informations de debug"
+    echo "  -r   nombre de trames par seconde (FPS)"
     echo "  -h   affiche ce message d'aide"
 }
 
-while getopts "dh" flag ;do
+while getopts "dhr:" flag ;do
     case ${flag} in
         d)
             debug="1"
             ;;
+        r)
+            fps="${OPTARG}"
+            ;;
        h)
            print_usage
             exit 0
@@ -155,8 +159,6 @@ size=$(get_size "${main_layer}")
 
 log_dbg "CANVAS SIZE=${size}"
 
-rm -f ${dest}/frame*.png
-
 # Create background frame:
 convert -size ${size} xc:none ${dest}/background.png
 
@@ -188,7 +190,7 @@ while read l; do
 
     if [ x"${nf}" != x"" ]; then
         log_dbg "New frame ID: ${nf}"
-        convert -page +0+0 ${dest}/background.png ${files} -background none -layers merge ${dest}/f${nf}.png
+        convert -colorspace sRGB -page +0+0 ${dest}/background.png ${files} -background none -layers merge ${dest}/f${nf}.png
         files=""
     fi