diff --git a/doc/the_floatimg_hack.tex b/doc/the_floatimg_hack.tex index 2b5efd6..e338bbd 100644 --- a/doc/the_floatimg_hack.tex +++ b/doc/the_floatimg_hack.tex @@ -884,7 +884,7 @@ pas vraiment compte du contenu de l'image. \begin{verbatim} tth@daubian:~/Devel/FloatImg/tools$ ./fimgfx -v -h --- fimg special effects --- - cos01 cos010 pow2 sqrt gray0 xper + cos01 cos010 pow2 sqrt gray0 cmixa xper desat \end{verbatim} Certaines de ces opérations ont besoin d'un paramètre flottant. @@ -955,9 +955,34 @@ avoir plusieurs plans de réalité. Il ne faut en négliger aucun. Il faut quand même deviner que pour passer de l'espace RGB\index{RGB} à une abstraction linéaire mono-dimensionnelle, il existe une foultitude de méthodes, toutes plus légitimes que les autres. +\index{procrastination} +Et face à l'incertitude du choix, j'ai reporté l'écriture de ce +logiciel aux calendes grecques, voire même plus tard. + +\subsection{cumulfimgs}\index{cumulfimgs}\label{cumulfimgs} + +Cet outil accumule\index{cumul} une quantité d'images flottantes +(même taille et même type) afin d'obtenir +un flou de meilleure qualité. Aucune mise à l'échelle n'etant +effctuée, les pixels de sortie peuvent atteindre des valeurs +considérables\footnote{Prévoir une gestion des \textsf{overflows} ?} + +\begin{verbatim} +tth@delirium:~/Devel/FloatImg/tools$ ./cumulfimgs -h +usage : + cumulfimgs a.fimg b.fimg c-fimg ... +cumulator options : + -v increase verbosity + -o name of output file + -g convert to gray level +\end{verbatim} + +Le nom par défaut du fichier résultant est \texttt{out.fimg}. +L'exportation "multiformat" est pour bientôt. % ------------------------------------------------------------------- -\section{TODO}\index{TODO}\label{TODO} +\section{TODO}\index{TODO}\label{TODO}\ + \index{XXX} Il reste plein de choses à faire pour que ce soit vraiment utilisable, surtout dans un contexte artistique à grande porosité. @@ -971,7 +996,8 @@ choses seront acquises. \item Compléter les traitements mathémathiques (eg le gamma\index{gamma}). \item Formaliser les codes d'erreur. \textbf{Urgent}. \item Faire une passe complète de Valgrind\index{valgrind}. -\item Integrer la fonderie et l'interpolator. +\item Intégrer la fonderie et l'interpolator. +\item Vérifier le gestion des images mono-canal. \end{itemize} % ------------------------------------------------------------------- diff --git a/tools/cumulfimgs.c b/tools/cumulfimgs.c index 2baa54b..51277cc 100644 --- a/tools/cumulfimgs.c +++ b/tools/cumulfimgs.c @@ -36,11 +36,13 @@ return 0; /* --------------------------------------------------------------------- */ void help(int v) { +puts(""); +puts("$ cumulfimgs a.fimg b.fimg c-fimg ..."); puts("cumulator options :"); puts("\t-v\tincrease verbosity"); puts("\t-o\tname of output file"); puts("\t-g\tconvert to gray level"); - +puts(""); if (verbosity) { puts(""); fimg_print_version(1); } exit(0); } @@ -71,10 +73,6 @@ if (verbosity) fprintf(stderr, "------ cumulfimgs ------\n"); fprintf(stderr, "argc = %d, optind = %d\n", argc, optind); #endif -// foo = testfile(output_file); -// fprintf(stderr, "Output %s -> %d\n", output_file, foo); - - for (idx=optind; idx %d\n", argv[idx],foo); + exit(1); } if ( ! src_loaded ) { @@ -112,6 +111,10 @@ if (to_gray) { } foo = fimg_dump_to_file(&accu, output_file, 0); +if (foo) { + fprintf(stderr, "error %d while saving '%s'\n", foo, output_file); + exit(1); + } return 0; } diff --git a/tools/essai.sh b/tools/essai.sh index d0c69d1..e711c63 100755 --- a/tools/essai.sh +++ b/tools/essai.sh @@ -36,8 +36,10 @@ D=" 800 600 " ./mkfimg -v -t hdeg hdeg.fimg $D ./mkfimg -v -t vdeg vdeg.fimg $D ./mkfimg -v -t drand48 rand.fimg $D +./mkfimg -v -t tpat0 pat0.fimg $D -./cumulfimgs -v -g -o foo.fimg hdeg.fimg rand.fimg vdeg.fimg +./cumulfimgs -v -g -o foo.fimg \ + hdeg.fimg pat0.fimg rand.fimg vdeg.fimg } # -----------------------------------------------------