You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
\chapter{Image} |
|
\label{chap:image} |
|
|
|
% ------------------------------------------------------------------- |
|
|
|
\section{ImageMagick}\index{ImageMagick} |
|
|
|
Attention, ça va devenir \textsl{hardu}% |
|
\footnote{Nous attendons tous avec impatience l'ouvrage de Brunus}, |
|
l'abondance d'options |
|
des outils imagemagick est vraiment énorme, et leurs |
|
interactions parfois troublantes\dots |
|
|
|
\subsection{Écrire du texte} |
|
|
|
Voici un exemple concret |
|
(tiré du script d'encodage du \textsc{cloître}\index{cloître}) |
|
qui montre l'essentiel pour bien débuter. C'est une fonction |
|
écrite en bash\index{bash} qui rajoute un texte sur une image : |
|
|
|
\begin{verbatim} |
|
function tagpic |
|
{ |
|
infile="$1" |
|
outfile="$2" |
|
texte="$3" |
|
|
|
txtfont=" -font Utopia " |
|
fontsize=" -pointsize 96 -kerning 6 " |
|
color=" -fill Gray20 -stroke White " |
|
txtopts=" -antialias -alpha off $txtfont " |
|
|
|
convert $infile \ |
|
${txtopts} \ |
|
${txtfont} ${fontsize} \ |
|
${color} \ |
|
-gravity South \ |
|
-annotate +0+85 "${texte}" \ |
|
$outfile |
|
} |
|
\end{verbatim} |
|
|
|
Quelques explications... |
|
|
|
|
|
% ------------------------------------------------------------------- |
|
|
|
\section{Gmic}\index{Gmic} |
|
|
|
|
|
|
|
% ------------------------------------------------------------------- |
|
|
|
|
|
|