Un petit essai, rapidement écrit, et qui m'a permis de mettre le doigt sur un bug conceptuel assez délicat à corriger. Pour le moment sur une image fixe, pour bientôt sur des séquences animées.
#!/bin/bash SOURCE='cyber-laura.tga' NBR_FRAMES=25 K=$(( 10000 / NBR_FRAMES )) T_CDR="48 160" dstA=/tmp/dstA.tga dstB=/tmp/dstB.tga dstC=/tmp/dstC.tga tga_effects $SOURCE seuil $dstA 30 200 30 tga_equalize $dstA lumin $dstA 130 tga_equalize $SOURCE std $dstB tga_filtres $dstB sobel $dstB 4 tga_effects $dstB flatgray $dstB 200 tga_filtres $SOURCE lopass $dstC tga_effects $dstC cont2x2 $dstC numimg=0 for frame in $(seq 0 $NBR_FRAMES) do numimg=$(( numimg + 1 )) oname=/tmp/mixanim$(printf %03d $numimg).tga k=$(( frame * K )) tga_combine $dstB $dstA mix_gray $oname $k tga_cadre $oname filetg $oname $T_CDR done for frame in $(seq 0 $NBR_FRAMES) do numimg=$(( numimg + 1 )) oname=/tmp/mixanim$(printf %03d $numimg).tga k=$(( frame * K )) tga_combine $dstC $dstB mix_gray $oname $k tga_cadre $oname filetg $oname $T_CDR done for frame in $(seq 0 $NBR_FRAMES) do numimg=$(( numimg + 1 )) oname=/tmp/mixanim$(printf %03d $numimg).tga k=$(( frame * K )) tga_combine $dstA $dstC mix_gray $oname $k tga_cadre $oname filetg $oname $T_CDR done convert -delay 10 /tmp/mixanim*.tga mixanim.gif