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">
<?php
-$size = getimagesize("img/flag.jpg");
+ $size = getimagesize("img/flag.jpg");
?>
<IMG SRC="img/flag.jpg"
<?php
-echo $size[3];
+ echo $size[3];
?>>
</programlisting>
</example>
@@ -77,7 +78,7 @@
<title><function>getimagesize</function> avec une URL</title>
<programlisting role="php">
<?php
-$size = getimagesize("http://www.php.net/gifs/logo.gif");
+ $size = getimagesize("http://www.php.net/gifs/logo.gif");
?>
</programlisting>
</example>
@@ -107,11 +108,11 @@
<title><function>getimagesize</function> qui retourne IPTC</title>
<programlisting role="php">
<?php
- $size = getimagesize("testimg.jpg",&$info);
- if (isset($info["APP13"])) {
- $iptc = iptcparse($info["APP13"]);
- var_dump($iptc);
- }
+ $size = getimagesize("testimg.jpg",&$info);
+ if (isset($info["APP13"])) {
+ $iptc = iptcparse($info["APP13"]);
+ var_dump($iptc);
+ }
?>
</programlisting>
</example>
@@ -413,8 +414,8 @@
<informalexample>
<programlisting role="php">
<?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);
?>
</programlisting>
</informalexample>
@@ -450,8 +451,8 @@
<informalexample>
<programlisting role="php">
<?php
-$white = imagecolorallocate($im, 255, 255, 255);
-imagecolordeallocate($im, $white);
+ $white = imagecolorallocate($im, 255, 255, 255);
+ imagecolordeallocate($im, $white);
?>
</programlisting>
</informalexample>
@@ -1120,8 +1121,7 @@
</title>
<programlisting role="php">
<?php
-function loadgif($imgname)
-{
+function loadgif($imgname){
$im = @imagecreatefromgif($imgname); /* Tentative d'ouverture */
if ($im == "") { /* échec ? */
$im = ImageCreate(150,30); /* Crée une image vide */
@@ -1251,16 +1251,16 @@
<programlisting role="php">
<?php
function loadjpeg($imgname) {
- $im = @imagecreatefromjpeg($imgname); /* Tentative d'ouverture */
- if (!$im) { /* Vérification */
- $im = imagecreate(150, 30); /* Cré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 = @imagecreatefromjpeg($imgname); /* Tentative d'ouverture */
+ if (!$im) { /* Vérification */
+ $im = imagecreate(150, 30); /* Cré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;
}
?>
</programlisting>
@@ -1302,9 +1302,9 @@
<programlisting role="php">
<?php
function LoadPNG($imgname) {
- $im = @imagecreatefrompng($imgname); /* Tentative d'ouverture */
- if (!$im) { /* Vérification */
- $im = imagecreate(150, 30); /* Création d'une image blanche */
+ $im = @imagecreatefrompng($imgname); /* Tentative d'ouverture */
+ if (!$im) { /* Vérification */
+ $im = imagecreate(150, 30); /* Cré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 = @imagecreatefromwbmp($imgname); /* Tentative d'ouverture */
- if (!$im) { /* Vérification que cela s'est bien passé */
- $im = imagecreate(20, 20); /* Cré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 = @imagecreatefromwbmp($imgname); /* Tentative d'ouverture */
+ if (!$im) { /* Vérification que cela s'est bien passé */
+ $im = imagecreate(20, 20); /* Cré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");
+ }
?>
</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");
+ }
?>
</programlisting>
</informalexample>
@@ -1713,8 +1715,8 @@
<informalexample>
<programlisting role="php">
<?php
-$im = imagecreatefrompng("test.png");
-imagepng($im);
+ $im = imagecreatefrompng("test.png");
+ imagepng($im);
?>
</programlisting>
</informalexample>
@@ -2868,9 +2870,9 @@
<title>Exemple avec ImageTypes</title>
<programlisting role="php">
<?php
-if (imagetypes() & IMG_PNG) {
+ if (imagetypes() & IMG_PNG) {
echo "Le type PNG est supporté";
-}
+ }
?>
</programlisting>
</example>
@@ -2904,10 +2906,10 @@
<title>Exemple avec <function>read_exif_data</function></title>
<programlisting role="php">
<?php
- $exif = read_exif_data('p0001807.jpg');
- while(list($k,$v)=each($exif)) {
- echo "$k: $v<br>\n";
- }
+ $exif = read_exif_data('p0001807.jpg');
+ while(list($k,$v)=each($exif)) {
+ echo "$k: $v<br>\n";
+ }
?>
</programlisting>
<simpara>