[PHP-DOC] cvs: phpdoc /fr/functions image.xml From: Damien Seguy (dams <email protected>)
Date: 08/10/01

dams Fri Aug 10 04:08:19 2001 EDT

  Modified files:
    /phpdoc/fr/functions image.xml
  Log:
  Examples reformatting (white space only)
  
Index: phpdoc/fr/functions/image.xml
diff -u phpdoc/fr/functions/image.xml:1.21 phpdoc/fr/functions/image.xml:1.22
--- phpdoc/fr/functions/image.xml:1.21 Thu Aug 2 05:39:37 2001
+++ phpdoc/fr/functions/image.xml Fri Aug 10 04:08:19 2001
@@ -1,3 +1,4 @@
+<!-- $Revision: 1.22 $ -->
 <reference id="ref.image">
  <title>Images</title>
  <titleabbrev>Graphisme</titleabbrev>
@@ -63,11 +64,11 @@
      <title><function>getimagesize</function></title>
      <programlisting role="php">
 &lt;?php
-$size = getimagesize("img/flag.jpg");
+ $size = getimagesize("img/flag.jpg");
 ?&gt;
 &lt;IMG SRC="img/flag.jpg"
 &lt;?php
-echo $size[3];
+ echo $size[3];
 ?&gt;>
      </programlisting>
     </example>
@@ -77,7 +78,7 @@
      <title><function>getimagesize</function> avec une URL</title>
      <programlisting role="php">
 &lt;?php
-$size = getimagesize("http://www.php.net/gifs/logo.gif");
+ $size = getimagesize("http://www.php.net/gifs/logo.gif");
 ?&gt;
      </programlisting>
     </example>
@@ -107,11 +108,11 @@
      <title><function>getimagesize</function> qui retourne IPTC</title>
      <programlisting role="php">
 &lt;?php
- $size = getimagesize("testimg.jpg",&amp;$info);
- if (isset($info["APP13"])) {
- $iptc = iptcparse($info["APP13"]);
- var_dump($iptc);
- }
+ $size = getimagesize("testimg.jpg",&amp;$info);
+ if (isset($info["APP13"])) {
+ $iptc = iptcparse($info["APP13"]);
+ var_dump($iptc);
+ }
 ?&gt;
      </programlisting>
     </example>
@@ -413,8 +414,8 @@
     <informalexample>
      <programlisting role="php">
 &lt;?php
-$white = imagecolorallocate($im, 255,255,255);
-$black = imagecolorallocate($im, 0,0,0);
+ $white = imagecolorallocate($im, 255,255,255);
+ $black = imagecolorallocate($im, 0,0,0);
 ?&gt;
      </programlisting>
     </informalexample>
@@ -450,8 +451,8 @@
     <informalexample>
      <programlisting role="php">
 &lt;?php
-$white = imagecolorallocate($im, 255, 255, 255);
-imagecolordeallocate($im, $white);
+ $white = imagecolorallocate($im, 255, 255, 255);
+ imagecolordeallocate($im, $white);
 ?&gt;
      </programlisting>
     </informalexample>
@@ -1120,8 +1121,7 @@
      </title>
      <programlisting role="php">
 &lt;?php
-function loadgif($imgname)
-{
+function loadgif($imgname){
   $im =  <email protected>($imgname); /* Tentative d'ouverture */
   if ($im == "") { /* &eacute;chec ? */
     $im = ImageCreate(150,30); /* Cr&eacute;e une image vide */
@@ -1251,16 +1251,16 @@
      <programlisting role="php">
 &lt;?php
 function loadjpeg($imgname) {
- $im =  <email protected>($imgname); /* Tentative d'ouverture */
- if (!$im) { /* V&eacute;rification */
- $im = imagecreate(150, 30); /* Cr&eacute;ation d'une image blanche */
- $bgc = imagecolorallocate($im, 255, 255, 255);
- $tc = imagecolorallocate($im, 0, 0, 0);
- ImageFilledRectangle($im, 0, 0, 150, 30, $bgc);
- /* Affichage d'un message d'erreur */
- imagestring($im, 1, 5, 5, "Erreur de chargement de l'image $imgname", $tc);
- }
- return $im;
+ $im =  <email protected>($imgname); /* Tentative d'ouverture */
+ if (!$im) { /* V&eacute;rification */
+ $im = imagecreate(150, 30); /* Cr&eacute;ation d'une image blanche */
+ $bgc = imagecolorallocate($im, 255, 255, 255);
+ $tc = imagecolorallocate($im, 0, 0, 0);
+ imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
+// Affichage d'un message d'erreur
+ imagestring($im, 1, 5, 5, "Erreur de chargement de l'image $imgname", $tc);
+ }
+ return $im;
 }
 ?&gt;
      </programlisting>
@@ -1302,9 +1302,9 @@
      <programlisting role="php">
 &lt;?php
 function LoadPNG($imgname) {
- $im =  <email protected>($imgname); /* Tentative d'ouverture */
- if (!$im) { /* V&eacute;rification */
- $im = imagecreate(150, 30); /* Cr&eacute;ation d'une image blanche */
+ $im =  <email protected>($imgname); /* Tentative d'ouverture */
+ if (!$im) { /* V&eacute;rification */
+ $im = imagecreate(150, 30); /* Cr&eacute;ation d'une image blanche */
         $bgc = imagecolorallocate($im, 255, 255, 255);
         $tc = imagecolorallocate($im, 0, 0, 0);
         imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
@@ -1348,16 +1348,16 @@
      </title>
      <programlisting role="php">
 function loadwbmp($imgname) {
- $im =  <email protected>($imgname); /* Tentative d'ouverture */
- if (!$im) { /* V&eacute;rification que cela s'est bien pass&eacute; */
- $im = imagecreate(20, 20); /* Cr&eacute;e une image blanche */
- $bgc = imagecolorallocate($im, 255, 255, 255);
- $tc = imagecolorallocate($im, 0, 0, 0);
- imagefilledrectangle($im, 0, 0, 10, 10, $bgc);
- /* Affiche le message d'erreur */
- imagestring($im, 1, 5, 5, "Erreur de chargement de $imgname", $tc);
- }
- return $im;
+ $im =  <email protected>($imgname); /* Tentative d'ouverture */
+ if (!$im) { /* V&eacute;rification que cela s'est bien pass&eacute; */
+ $im = imagecreate(20, 20); /* Cr&eacute;e une image blanche */
+ $bgc = imagecolorallocate($im, 255, 255, 255);
+ $tc = imagecolorallocate($im, 0, 0, 0);
+ imagefilledrectangle($im, 0, 0, 10, 10, $bgc);
+// Affiche le message d'erreur
+ imagestring($im, 1, 5, 5, "Erreur de chargement de $imgname", $tc);
+ }
+ return $im;
 }
      </programlisting>
     </example>
@@ -1642,11 +1642,12 @@
   elseif (function_exists("imagePng")) {
     header("Content-type: image/png");
     imagepng($im);
- } elseif (function_exists("imagewbmp")) {
- header("Content-type: image/vnd.wap.wbmp");
- imagewbmp($im);
- } else
+ } elseif (function_exists("imagewbmp")) {
+ header("Content-type: image/vnd.wap.wbmp");
+ imagewbmp($im);
+ } else {
     die("Pas de support graphique avec PHP sur ce serveur");
+ }
 ?&gt;
        </programlisting>
       </informalexample>
@@ -1672,11 +1673,12 @@
   elseif (function_exists("imagePng")) {
     header("Content-type: image/png");
     imagepng($im);
- } elseif (function_exists("imagewbmp")) {
- header("Content-type: image/vnd.wap.wbmp");
- imagewbmp($im);
- } else
+ } elseif (function_exists("imagewbmp")) {
+ header("Content-type: image/vnd.wap.wbmp");
+ imagewbmp($im);
+ } else {
     die("Pas de support graphique avec PHP sur ce serveur");
+ }
 ?&gt;
        </programlisting>
       </informalexample>
@@ -1713,8 +1715,8 @@
     <informalexample>
      <programlisting role="php">
 &lt;?php
-$im = imagecreatefrompng("test.png");
-imagepng($im);
+ $im = imagecreatefrompng("test.png");
+ imagepng($im);
 ?&gt;
      </programlisting>
     </informalexample>
@@ -2868,9 +2870,9 @@
      <title>Exemple avec ImageTypes</title>
      <programlisting role="php">
 &lt;?php
-if (imagetypes() &amp; IMG_PNG) {
+ if (imagetypes() &amp; IMG_PNG) {
     echo "Le type PNG est support&eacute;";
-}
+ }
 ?&gt;
      </programlisting>
     </example>
@@ -2904,10 +2906,10 @@
      <title>Exemple avec <function>read_exif_data</function></title>
      <programlisting role="php">
 &lt;?php
- $exif = read_exif_data('p0001807.jpg');
- while(list($k,$v)=each($exif)) {
- echo "$k: $v&lt;br&gt;\n";
- }
+ $exif = read_exif_data('p0001807.jpg');
+ while(list($k,$v)=each($exif)) {
+ echo "$k: $v&lt;br&gt;\n";
+ }
 ?&gt;
      </programlisting>
      <simpara>