Blog du grouik - Mot-clé - photographie
Le blog du grouik. Memos d'un Admin sys linux windows, logiciels libres, imprimante 3D
2024-01-16T12:12:27+00:00
Gnieark
urn:md5:87c2396a7331cd5cd18f8751d216ec7b
Dotclear
Tutoriels Gimp
urn:md5:3cedf5b07eb83e32652198919fc7fec0
2011-02-10T21:29:00+01:00
2011-02-10T21:31:45+01:00
gnieark
breves
gimp
Logiciel-libre
photographie
<p>Gimpiste est une collection de tutoriels vidéos. Pour le moment c'est assez simple, on verra si l'auteur continue, et s'il y a une montée en puissance de la difficulté. Ça permet de découvrir certaines fonctions de gimp, qu'on ne découvre pas forcément malgré des heures d'utilisation. La petite voix un peu timide de Yasmine ajoute du charme aux vidéos.</p>
<p><a href="http://gimpiste-tuto.tk/" hreflang="fr"><img src="https://blog-du-grouik.tinad.fr/public/.gimpistetuto_m.jpg" alt="gimpistetuto.jpg" style="display:block; margin:0 auto;" title="gimpistetuto.jpg, fév. 2011" /></a></p>
<p>Je sais que l'exercice du tutoriel vidéo est difficile (je l'avais tenté en version gnieark animé). Il faut préparer sa trame, ce qui correspond presque au temps nécessaire à rédiger un tutoriel écrit, puis après, il faut l'enregistrer, sans bafouiller, éventuellement un petit montage etc.... Bravo Gimpiste, pour les tutos. Continue!
<a href="http://gimpiste-tuto.tk/" hreflang="fr">http://gimpiste-tuto.tk/</a></p>
Tineye, Moteur de recherche d'images inversé
urn:md5:1629ee9f124a9b02533a9ead037c7902
2011-01-06T09:24:00+01:00
2011-01-06T09:24:00+01:00
gnieark
breves
photographie
<p>Je découvre tineye qui est en train de scrawler ce site.</p>
<p>C'est un système de recherche d'images à l'envers. A partir d'une image que vous téléversez ou pour laquelle fournissez une URL, il va trouver les sites qui la publient.
Jusque là, je me suis dit qu'il doit faire une somme de contrôle du fichier pour trouver tout simplement les fichiers identiques. et bah non non c'est beaucoup plus poussé.
Le sapin de Noël ci dessous, que j'ai piqué sur je ne sais plus quel site, je le réduis et le gribouille.</p>
<p><img src="https://blog-du-grouik.tinad.fr/public/.tinieye-sapingimp_m.jpg" alt="tinieye-sapingimp.jpg" style="display:block; margin:0 auto;" title="tinieye-sapingimp.jpg, janv. 2011" /></p>
<p>Il le trouve quand même, et classe les résultats par ressemblance.</p>
<p><img src="https://blog-du-grouik.tinad.fr/public/.tinieye-sapingimpfound_m.jpg" alt="tinieye-sapingimpfound.jpg" style="display:block; margin:0 auto;" title="tinieye-sapingimpfound.jpg, janv. 2011" /></p>
<p>Surement pratique pour retrouver qui a piqué l'image provenant de ton site.
Mais, si l’algorithme de reconnaissance d'éléments progresse, ce site employé à de l'identification de personnes à partir de photographies... Moi ça me fait froid dans le dos Brrr .</p>
<p>C'est par là: <a href="http://www.tineye.com/" hreflang="fr">http://www.tineye.com/</a></p>
Galerie de photos super simple V.2
urn:md5:a38195c98ce4f6b0be55baa30b0d08ec
2011-01-02T18:21:00+01:00
2011-02-17T09:45:16+01:00
gnieark
dev web
dotclear
javascript
photographie
<h3>Un aperçu avec un dossier de fonds d'écran gnome ou ubuntu:</h3>
<p>Dans index php, pour avoir des thumbnail plus petits, j'ai changé :</p>
<pre>ResizeImage($liste_rep[$i],"thumbnails/".$liste_rep[$i], 100, 100);</pre>
<p>par:</p>
<pre>ResizeImage($liste_rep[$i],"thumbnails/".$liste_rep[$i], 50, 50);</pre>
<div class="external-media" style="margin: 1em auto; text-align: center;">
<iframe src="https://blog-du-grouik.tinad.fr/galeries/photossitetest/" width="450" height="600" frameborder="0"></iframe>
</div>
<p>Dans le billet précédent vous avez été nombreux<sup>[<a href="https://blog-du-grouik.tinad.fr/post/2011/01/02/Galerie-de-photos-super-simple-V.2#pnote-779-1" id="rev-pnote-779-1">1</a>]</sup> à me demander comment j'avais fait pour mettre mon caroussel super simple de photographes.</p>
<p>Ce n'est pas super joli, pas de fondu ou autre, mais je trouve ça simple et efficace. Il s'agit d'une petite amélioration <a href="https://blog-du-grouik.tinad.fr/index.php?post/2010/01/22/un-simple-script-php-de-galerie-photographie">de mon script publié</a> ici il y a 11 mois.</p>
<p>La galerie sur le billet en lui même c'est une iframe:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"><</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">"external-media"</span> style<span style="color: #339933;">=</span><span style="color: #0000ff;">"margin: 1em auto; text-align: center;"</span><span style="color: #339933;">></span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"><</span>iframe src<span style="color: #339933;">=</span><span style="color: #0000ff;">"/galeries/android/"</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">"100%"</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">"730"</span> frameborder<span style="color: #339933;">=</span><span style="color: #0000ff;">"0"</span><span style="color: #339933;">></</span>iframe<span style="color: #339933;">></span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"></</span>div<span style="color: #339933;">></span></div></li></ol></pre>
<p>Oui oui, je sais les iframes c'est mal. mais bien pratique, et je ne veux pas alourdir le <head> de ce site avec du javascript pour un billet seulement. Donc l'iframe c'est bien pratique.</p>
<p>Et ah heu oui, pour insérer du html en mode wiki, on fait comme ça dans un billet:</p>
<p><code>///html</code><br />
<code><insérez votre code html là></code><br />
<code>///</code></p>
<h3>Maintenant, regardons ce que j'ai mis dans /galeries/android; la cible de l'iframe.</h3>
<p>Quand je veux mettre des images, je les dépose tout simplement dans ce dossier (en ftp ou autre). Lors de la prochaine ouverture de la page il va détecter les images qui ont été ajoutées pour créer leurs miniatures qui sont dans le sous dossier thumbnails. (ça peut etre long).</p>
<p>un fichier ./index.php:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><head></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <title>Yael</title></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <meta name="COPYRIGHT" content="Site 2010 Blog du Grouik http://blog-du-grouik.tinad.fr Vous êtes libres de copier, redistribuer, de modifier le code source. Merci cependant d'y laisser la paternité si votre modification est nulle ou mineure. Juste pour ma gloire :p"/></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <link rel="stylesheet" href="plop.css" type="text/css" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><script type="text/javascript"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> var x;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> var img;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> function showimg(v)</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> {</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> document.getElementById("laphoto").alt = v;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> document.getElementById("laphoto").src = v;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> function Init() </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> {</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img = document.getElementById(document.getElementById("laphoto").alt);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> x = window.setInterval('chgimg()', 4000);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> function chgimg()</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> {</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img.style.borderStyle = "none";</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img=img.nextSibling;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> if (!img.nextSibling)</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> {</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img=document.getElementById("listedephotos").firstChild;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> while (img.nodeName != "IMG"){</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img=img.nextSibling;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> showimg(img.id);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img.style.borderStyle = "dashed";</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> function manualshowimg(v)</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> {</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img.style.borderStyle = "none";</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img=document.getElementById(v);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> showimg(v);</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> img.style.borderStyle = "dashed";</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> }</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> window.onload = Init;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></script></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></head></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><body></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><div class="all"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <div id="listedephotos"></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$liste_rep</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/scandir"><span style="color: #990000;">scandir</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">"./"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">include</span><span style="color: #009900;">(</span><span style="color: #0000ff;">"thumbnails/thumbnails.php"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$num</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">while</span><span style="color: #009900;">(</span><span style="color: #000088;">$i</span> <span style="color: #339933;"><</span> <span style="color: #000088;">$num</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span><a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">)</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'.JPG'</span><span style="color: #009900;">)</span><span style="color: #339933;">||</span><span style="color: #009900;">(</span><a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">)</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'.jpg'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #339933;">!</span><a href="http://www.php.net/file_exists"><span style="color: #990000;">file_exists</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">"thumbnails/"</span><span style="color: #339933;">.</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">//créer la miniature</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> ResizeImage<span style="color: #009900;">(</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span><span style="color: #0000ff;">"thumbnails/"</span><span style="color: #339933;">.</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">" <img onclick=<span style="color: #000099; font-weight: bold;">\"</span>manualshowimg('"</span><span style="color: #339933;">.</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">.</span><span style="color: #0000ff;">"');<span style="color: #000099; font-weight: bold;">\"</span> src=<span style="color: #000099; font-weight: bold;">\"</span>thumbnails/"</span><span style="color: #339933;">.</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">.</span><span style="color: #0000ff;">"<span style="color: #000099; font-weight: bold;">\"</span> id=<span style="color: #000099; font-weight: bold;">\"</span>"</span><span style="color: #339933;">.</span><span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #000088;">$i</span><span style="color: #009900;">]</span><span style="color: #339933;">.</span><span style="color: #0000ff;">"<span style="color: #000099; font-weight: bold;">\"</span> alt=<span style="color: #000099; font-weight: bold;">\"</span>img<span style="color: #000099; font-weight: bold;">\"</span>/><span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">?></span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></div></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><div></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <img id="laphoto" src="<span style="color: #000000; font-weight: bold;"><?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?></span>" alt="<span style="color: #000000; font-weight: bold;"><?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$liste_rep</span><span style="color: #009900;">[</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?></span>" /></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></div></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></div></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></body></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"></html></div></li></ol></pre>
<p>un fichier pour le css; ./plop.css:</p>
<pre class="css css" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">body <span style="color: #00AA00;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0F1415</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#listedephotos</span><span style="color: #00AA00;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">position</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">95%</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#laphoto</span><span style="color: #00AA00;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5%</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">95%</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#listedephotos</span> img<span style="color: #00AA00;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">}</span></div></li></ol></pre>
<p>et un dossier thumbnails qui contient le fichier ./thumbnails/thumbnails.php suivant:</p>
<pre class="php php" style="font-family:inherit"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;"><?php</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">function</span> ResizeImage<span style="color: #009900;">(</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newimage</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newwidth</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newheight</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #666666; font-style: italic;">// fonction récupérée là http://www.wikistuce.info/doku.php/php/miniatures_images</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #339933;">!</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'ImageTypes'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/list"><span style="color: #990000;">list</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span><span style="color: #000088;">$height</span><span style="color: #339933;">,</span><span style="color: #000088;">$type</span><span style="color: #009900;">)</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/getimagesize"><span style="color: #990000;">GetImageSize</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$image</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$im</span> <span style="color: #339933;">=</span> ReadImageFromFile<span style="color: #009900;">(</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span> <span style="color: #000088;">$type</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newwidth</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$newwidth</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newheight</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$height</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$width</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newheight</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$newheight</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newwidth</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$width</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$height</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newheight</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span><span style="color: #000088;">$width</span> <span style="color: #339933;"><</span> <span style="color: #000088;">$height</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$newwidth</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newheight</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$height</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$width</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">else</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$newheight</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span><span style="color: #000088;">$newwidth</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$width</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$height</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'ImageCreateTrueColor'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$im2</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagecreatetruecolor"><span style="color: #990000;">ImageCreateTrueColor</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$newwidth</span><span style="color: #339933;">,</span><span style="color: #000088;">$newheight</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">else</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$im2</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagecreate"><span style="color: #990000;">ImageCreate</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$newwidth</span><span style="color: #339933;">,</span><span style="color: #000088;">$newheight</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'imagealphablending'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imagealphablending"><span style="color: #990000;">imagealphablending</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$im2</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'imagesavealpha'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imagesavealpha"><span style="color: #990000;">imagesavealpha</span></a> <span style="color: #009900;">(</span><span style="color: #000088;">$im2</span> <span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">'ImageCopyResampled'</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imagecopyresampled"><span style="color: #990000;">ImageCopyResampled</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$im2</span><span style="color: #339933;">,</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$newwidth</span><span style="color: #339933;">,</span><span style="color: #000088;">$newheight</span><span style="color: #339933;">,</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span><span style="color: #000088;">$height</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">else</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <a href="http://www.php.net/imagecopyresized"><span style="color: #990000;">ImageCopyResized</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$im2</span><span style="color: #339933;">,</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$newwidth</span><span style="color: #339933;">,</span><span style="color: #000088;">$newheight</span><span style="color: #339933;">,</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span><span style="color: #000088;">$height</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>WriteImageToFile<span style="color: #009900;">(</span><span style="color: #000088;">$im2</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newimage</span><span style="color: #339933;">,</span> <span style="color: #000088;">$type</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">function</span> ReadImageFromFile<span style="color: #009900;">(</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$type</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000088;">$imagetypes</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagetypes"><span style="color: #990000;">ImageTypes</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">switch</span> <span style="color: #009900;">(</span><span style="color: #000088;">$type</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$imagetypes</span> <span style="color: #339933;">&</span> IMG_GIF<span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$im</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagecreatefromgif"><span style="color: #990000;">ImageCreateFromGIF</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$filename</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$imagetypes</span> <span style="color: #339933;">&</span> IMG_JPEG<span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/imagecreatefromjpeg"><span style="color: #990000;">ImageCreateFromJPEG</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$filename</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">3</span> <span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #000088;">$imagetypes</span> <span style="color: #339933;">&</span> IMG_PNG<span style="color: #009900;">)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/imagecreatefrompng"><span style="color: #990000;">ImageCreateFromPNG</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$filename</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">function</span> WriteImageToFile<span style="color: #009900;">(</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$type</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">switch</span> <span style="color: #009900;">(</span><span style="color: #000088;">$type</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/imagegif"><span style="color: #990000;">ImageGIF</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/imagejpeg"><span style="color: #990000;">ImageJpeg</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">85</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">3</span> <span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/imagepng"><span style="color: #990000;">ImagePNG</span></a><span style="color: #009900;">(</span><span style="color: #000088;">$im</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">}</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">?></span></div></li></ol></pre>
<p>Voilou voilou. Je reconnais que c'est aussi parce que paradoxalement je n'aime pas trop les plugins de galerie de dotclear (pas assez user friendly peut etre) et aussi que je ne veux pas qu'il y ait une jquery, et d'autres scripts javascript pesant plusieurs mégas en permanence dans le <head> du code mon blog. Cependant la refonte du gestionnaire de médias de dotclear est apparemment prévu dans les développements à venir<sup>[<a href="https://blog-du-grouik.tinad.fr/post/2011/01/02/Galerie-de-photos-super-simple-V.2#pnote-779-2" id="rev-pnote-779-2">2</a>]</sup>.</p>
<div class="footnotes"><h4>Notes</h4>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2011/01/02/Galerie-de-photos-super-simple-V.2#rev-pnote-779-1" id="pnote-779-1">1</a>] Non je fabule, mais ça me fait plaisir d'introduire ce billet de cette manière.</p>
<p>[<a href="https://blog-du-grouik.tinad.fr/post/2011/01/02/Galerie-de-photos-super-simple-V.2#rev-pnote-779-2" id="pnote-779-2">2</a>] <a href="http://fr.dotclear.org/blog/post/2010/11/29/Etat-des-lieux-en-d%C3%A9cembre" hreflang="fr">Blog Dotclear » Etat des lieux en décembre</a></p></div>
defi 16 SILENCE…. ça tourne !
urn:md5:28dde0ae4fb3a5d80b44b3b013c53393
2010-05-20T12:37:00+02:00
2010-07-21T12:36:33+02:00
gnieark
defis d'écriture
defi d écriture
photographie
<p>Johnconnorsan a publié le nouveau défi!</p>
<p>Nous sommes en plein festival de Cannes n’est-ce-pas ? Alors je vous propose comme prochain défi d’écrire un « micro-roman » ou nouvelle dont le sujet sera …libre mais tout le reste imposé ! <em>Les personnages</em> : les nominés sont : pour les dames : Emma de Montbruisson, Pascale de Chaste, Zofia et Azettep Nunez de Aznar, Agathe : Comtesse Goulier de Grandville, Marie : Marquise de Sillègue d’Aubeville. // Pour les messieurs nous aurons : Léon de Bretagne, Ed O’Connor, Ingeark l’inventeur, Larjie de Portaul et Louis de Clairac. <em>Époque </em>: 18ème. <em>Lieu </em>: Château de Fort La Latte. Chaque auteur sera le héros ou héroïne de son texte. Néanmoins tous les personnages seront au minimum cités dans le récit. Clôture de ce qui va être un festival : je vous propose le 13 juin au soir.<img class="alignright" title="Château de Fort La Latte" src="http://defi-ecriture.tinad.fr/wp-content/uploads/2010/05/fortlalatte.jpg" alt="Château de Fort La Latte" height="119" width="183"/></p>
<p>Comme d'hab, c'est par là <a href="http://defi-ecriture.tinad.fr/" hreflang="fr">les défis d'écriture</a></p>
le blog du grouik à la campagne
urn:md5:6e3a352de0b503c3f05d1212f0a2916c
2010-05-13T18:01:00+02:00
2010-05-20T11:41:15+02:00
gnieark
Les absurdes
campagne
photographie
poulet
vache
<p>Mon blog fait une escale à la campagne</p>
<p>Le blog du grouik conduit un tracteur:<br />
<a href="https://blog-du-grouik.tinad.fr/public/campagne/P1010021-reduit.JPG" title="dell mini sur un tracteur"><img src="https://blog-du-grouik.tinad.fr/public/campagne/.P1010021-reduit_m.jpg" alt="dell mini sur un tracteur" style="display:block; margin:0 auto;" title="dell mini sur un tracteur, mai 2010" /></a></p>
<p>Le blog du grouik discute avec deux veaux:
<a href="https://blog-du-grouik.tinad.fr/public/campagne/P1010022-reduit.JPG" title="dell mini avec des veaux"><img src="https://blog-du-grouik.tinad.fr/public/campagne/.P1010022-reduit_m.jpg" alt="dell mini avec des veaux" style="display:block; margin:0 auto;" title="dell mini avec des veaux, mai 2010" /></a></p>
<p>Le blog du grouik au milieu des poulets:
<a href="https://blog-du-grouik.tinad.fr/public/campagne/P1010023-reduit.jpg" title="dell mini dans la basse cours"><img src="https://blog-du-grouik.tinad.fr/public/campagne/.P1010023-reduit_m.jpg" alt="dell mini dans la basse cours" style="display:block; margin:0 auto;" title="dell mini dans la basse cours, mai 2010" /></a></p>
<p>Et enfin, le blog du grouik envisage son repas:
<a href="https://blog-du-grouik.tinad.fr/public/campagne/P1010020-reduit.JPG" title="dell mini et un poulet"><img src="https://blog-du-grouik.tinad.fr/public/campagne/.P1010020-reduit_m.jpg" alt="dell mini et un poulet" style="display:block; margin:0 auto;" title="dell mini et un poulet, mai 2010" /></a></p>
Un simple script php de galerie photo
urn:md5:5535382df1b0194cc95852806b7bbd9d
2010-01-22T19:20:00+01:00
2010-04-18T22:15:35+02:00
gnieark
dev web
photographie
PHP
<p>Par là Pour l'exemple, avec les images de la distribution ubuntu:
<a href="https://blog-du-grouik.tinad.fr/photossitetest/" hreflang="fr"><img src="https://blog-du-grouik.tinad.fr/public/.SimpleGalery_m.jpg" alt="aperçu simple galery" style="display:block; margin:0 auto;" title="aperçu simple galery, janv. 2010" /></a></p>
<p><a href="https://blog-du-grouik.tinad.fr/public/photo.tar.gz">Télécharger le code source du visionneur de photographies (tar.gz)</a></p>
<p>Déposez vos photographies à la racine du site. Les miniatures manquantes seront créées automatiquement dans le dossier thumbnails.</p>
<p>Les fonctions pour redimensionner les images (via la librairie GD)ont été pompées sur <a href="http://www.wikistuce.info/doku.php/php/miniatures_images" hreflang="fr">Wikiastuce</a>. L'auteur est IDO.</p>
<p>Ce n'est pas super joli, mais facilement améliorable, super simple et ça évite d'utiliser facebook pour ce genre de fonctions.</p>