diff --git a/chap/C.tex b/chap/C.tex index 27c9586..20cb8be 100644 --- a/chap/C.tex +++ b/chap/C.tex @@ -508,6 +508,7 @@ any strictly conforming program in which the use of the features specified in the header , except the following functions: strdup , strndup , strcoll , strxfrm , strerror ." (4p6) +https://devblogs.microsoft.com/oldnewthing/20230109-00/?p=107685 % ========================================================= diff --git a/chap/gif89a.tex b/chap/gif89a.tex index 6dccfce..7f9a738 100644 --- a/chap/gif89a.tex +++ b/chap/gif89a.tex @@ -46,21 +46,43 @@ convert -delay 20 -loop 0 a.png b.png c.png foo.gif \end{verbatim} Le \textsl{delay} est exprimé en millisecondes. On peut aussi -rajouter l'option \texttt{-loop nnn}\footnote{ add Netscape loop +rajouter l'option \texttt{-loop nnn}\footnote{aka: add Netscape loop extension to your GIF animation} avec nnn qui est le nombre de boucle que doit faire l'animation. La valeur 0 demandant une -boucle infinie. +boucle infinie. Deux fois\index{Vous connaissez Chuck Norris ?}. Et ensuite, vouv pouvez voir votre logo en flamme avec la commande \texttt{animate foo.gif} sur votre super écran -(s)vga\index{VGA}. +(s)vga\index{VGA} 14 pouces. + +Je pense\footnote{Avis personnel d'après ma louche.} que la compression +de cette commande n'est pas optimale, peut-être parce qu'elle +n'utilise pas les \textsl{subblocs} que permet ce format. % ================================================================== \section{Manipulation} +XXX\index{XXX} + % ================================================================== \section{Exemples pratiques} +Dans un Makefile~: + +\begin{verbatim} +indoor.gif: $(DEPS) + convert \ + `ls -rt1 frames/indoor/????.png | tail -99` \ + -delay 120 \ + -resize 28% \ + -normalize \ + -colorspace gray \ + -colors 31 \ + -dither none \ + $@ +\end{verbatim} + + % ================================================================== diff --git a/chap/image.tex b/chap/image.tex index 76ff936..72cba72 100644 --- a/chap/image.tex +++ b/chap/image.tex @@ -104,16 +104,18 @@ Code & Signification \\ \end{tabular} Pour avoir la liste des couleurs disponibles : \texttt{convert -list color} -et celles des fontes : \texttt{convert -list color}. +et celles des fontes : \texttt{convert -list font}. - -\subsection{Questions...} +\subsubsection{Questions...} \begin{itemize} \item{Comment mettre une couleur de fond à ce texte ?} +\item{Et un texte semi-transparent ?} \end{itemize} -\subsection{montage} +% ------------------------------------------ +% faire des affiches +\subsection{montage}\index{montage} \begin{quote} create a composite image by combining several separate images. The images are @@ -123,11 +125,14 @@ image name, and more. Krkrkr\dots +% ------------------------------------------ + \subsection{Faire des GIFs animées}\index{gif89a} Ces petites images clignotantes sont l'essence même du Web\index{web} moderne depuis 1992 malgré leurs limitations, -et \texttt{convert} sait très bien les générer. +et \texttt{convert} sait très bien\footnote{modulo un taux de +compression pas génial.} les générer. Encore un grand merci à Compuserve\index{Compuserve} pour cette création essentielle à l'art graphique moderne. @@ -136,7 +141,8 @@ convert -delay 20 -loop 0 a.png b.png c.png foo.gif \end{verbatim} Ce sujet pertinent est abordé plus en détails en -page \pageref{chap:gif89a} +page \pageref{chap:gif89a} avec, nous l'espérons, un exemple +de dithering avec la palette de couleur \texttt{EGA}\index{EGA}. % ------------------------------------------ @@ -188,12 +194,35 @@ pngtopnm \$negatif | ppmtotga -rgb -norle > \$picz % ------------------------------------------ +\subsection{identify}\index{identify} + +Cette commande nous fournit un ensemble d'informations\footnote{aka metadata} +pertinentes sur un fichier image~: format, résolution, couleur ou n/b, +nombre de bits par pixel\dots + +\begin{verbatim} +tth@konrad:~/GravityField $ identify WS/nanim//00000.pgm graph.png +WS/nanim//00000.pgm PGM 2048x2048 2048x2048+0+0 16-bit Grayscale + Gray 20.5765MiB 0.690u 0:00.690 +graph.png PNG 640x640 640x640+0+0 8-bit sRGB 102c 18165B 0.000u 0:00.000 +\end{verbatim} + +https://imagemagick.org/script/escape.php + +Et ces données peuvent être utilisé pour rajouter une simili +\textsc{IA}\footnote{Sorry, private joke inside\dots} + +% ------------------------------------------ + \subsection{Trucs} \begin{itemize} \item{convert -average frame*.png output.png} \end{itemize} +Il y en plein d'autres, des tricks \textsl{àlc} à découvrir. +Ce sera, pour vous amis lecteurs, une dure mission à assumer. + % ------------------------------------------