Skip to content

Commit

Permalink
sync with en rev
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardolara committed Jan 21, 2025
1 parent 27318cf commit 044464f
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 54 deletions.
7 changes: 2 additions & 5 deletions reference/image/functions/imagecopy.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: e50e79746736dbdfbabe9bd3566793b3ddf38f58 Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: fernandoc,marcosmarcolin,leonardolara -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,marcosmarcolin,leonardolara -->
<refentry xml:id="function.imagecopy" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecopy</refname>
Expand Down Expand Up @@ -138,12 +138,9 @@ $dest = imagecreatetruecolor(80, 40);
// Copiar
imagecopy($dest, $src, 0, 0, 20, 13, 80, 40);
// Exibir e liberar da memória
// Exibir
header('Content-Type: image/gif');
imagegif($dest);
imagedestroy($dest);
imagedestroy($src);
?>
]]>
</programlisting>
Expand Down
7 changes: 2 additions & 5 deletions reference/image/functions/imagecopymerge.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: e50e79746736dbdfbabe9bd3566793b3ddf38f58 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecopymerge" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecopymerge</refname>
Expand Down Expand Up @@ -151,12 +151,9 @@ $src = imagecreatefromgif('php.gif');
// Copia e funde
imagecopymerge($dest, $src, 10, 10, 0, 0, 100, 47, 75);
// Mostra e libera da memória
// Mostra
header('Content-Type: image/gif');
imagegif($dest);
imagedestroy($dest);
imagedestroy($src);
?>
]]>
</programlisting>
Expand Down
7 changes: 2 additions & 5 deletions reference/image/functions/imagecopymergegray.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: e50e79746736dbdfbabe9bd3566793b3ddf38f58 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecopymergegray" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecopymergegray</refname>
Expand Down Expand Up @@ -156,12 +156,9 @@ $src = imagecreatefromgif('php.gif');
// Copia e funde - Cinza = 20%
imagecopymergegray($dest, $src, 10, 10, 0, 0, 100, 47, 20);
// Mostra e libera da memória
// Mostra
header('Content-Type: image/gif');
imagegif($dest);
imagedestroy($dest);
imagedestroy($src);
?>
]]>
</programlisting>
Expand Down
6 changes: 2 additions & 4 deletions reference/image/functions/imagecreate.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <!-- CREDITS: fernandoc,felipe,marcosmarcolin -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: marcosmarcolin Status: ready -->
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,felipe,marcosmarcolin,leonardolara -->
<refentry xml:id="function.imagecreate" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreate</refname>
Expand Down Expand Up @@ -94,7 +94,6 @@ $background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
]]>
</programlisting>
Expand All @@ -111,7 +110,6 @@ imagedestroy($im);
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>imagedestroy</function></member>
<member><function>imagecreatetruecolor</function></member>
</simplelist>
</refsect1>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefrombmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefrombmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefrombmp</refname>
Expand Down Expand Up @@ -76,7 +76,6 @@ $im = imagecreatefrombmp('./example.bmp');
// Converte para um PNG com a configuração padrão
imagepng($im, './example.png');
imagedestroy($im);
?>
]]>
</programlisting>
Expand Down
11 changes: 5 additions & 6 deletions reference/image/functions/imagecreatefromgd.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <!-- CREDITS: fernandoc,marcosmarcolin -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: marcosmarcolin Status: ready -->
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,marcosmarcolin,leonardolara -->
<refentry xml:id="function.imagecreatefromgd" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromgd</refname>
Expand Down Expand Up @@ -70,17 +70,16 @@
// Carregar a imagem GD
$im = @imagecreatefromgd('./test.gd');
// Testar se a imagem foi carregada
// Testa se a imagem foi carregada
if(!$im)
{
die('Incapaz de carregar a imagem GD!');
}
// Realize operações na imagem aqui
// Realiza operações na imagem aqui
// Salve a imagem
// Salva a imagem
imagegd($im, './test_updated.gd');
imagedestroy($im);
?>
]]>
</programlisting>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromgd2.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromgd2" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromgd2</refname>
Expand Down Expand Up @@ -79,7 +79,6 @@ if(function_exists('imagefilter'))
// Grava a imagem
imagegd2($im, './test_updated.gd2');
imagedestroy($im);
?>
]]>
</programlisting>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromgd2part.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromgd2part" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromgd2part</refname>
Expand Down Expand Up @@ -114,7 +114,6 @@ if(function_exists('imagefilter'))
// Grava a imagem transformada
imagegd2($im, './test_emboss.gd2');
imagedestroy($im);
?>
]]>
</programlisting>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromgif.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 213fbd9440a224f9c1da4942c85124ce0c120c52 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromgif" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromgif</refname>
Expand Down Expand Up @@ -101,7 +101,6 @@ header('Content-Type: image/gif');
$img = LoadGif('bogus.image');
imagegif($img);
imagedestroy($img);
?>
]]>
</programlisting>
Expand Down
7 changes: 3 additions & 4 deletions reference/image/functions/imagecreatefromjpeg.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <!-- CREDITS: fernandoc,marcosmarcolin -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: marcosmarcolin Status: ready -->
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,marcosmarcolin,leonardolara -->
<refentry xml:id="function.imagecreatefromjpeg" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromjpeg</refname>
Expand Down Expand Up @@ -94,13 +94,12 @@ header('Content-Type: image/jpeg');
$img = LoadJpeg('bogus.image');
imagejpeg($img);
imagedestroy($img);
?>
]]>
</programlisting>
&example.outputs.similar;
<mediaobject>
<alt>OSaída do exemplo: Exemplo de como lidar com um erro durante o carregamento de um JPEG.</alt>
<alt>Saída do exemplo: Exemplo de como lidar com um erro durante o carregamento de um JPEG.</alt>
<imageobject>
<imagedata fileref="en/reference/image/figures/imagecreatefromjpeg.jpg"/>
</imageobject>
Expand Down
7 changes: 3 additions & 4 deletions reference/image/functions/imagecreatefrompng.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <!-- CREDITS: fernandoc,marcosmarcolin -->
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: marcosmarcolin Status: ready -->
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,marcosmarcolin,leonardolara -->
<refentry xml:id="function.imagecreatefrompng" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefrompng</refname>
Expand Down Expand Up @@ -94,13 +94,12 @@ header('Content-Type: image/png');
$img = LoadPNG('bogus.image');
imagepng($img);
imagedestroy($img);
?>
]]>
</programlisting>
&example.outputs.similar;
<mediaobject>
<alt>imagecreatefrompng() exemplo</alt>
<alt>Exemplo de imagecreatefrompng()</alt>
<imageobject>
<imagedata fileref="en/reference/image/figures/imagecreatefrompng.png"/>
</imageobject>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromstring.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 2bab0c8b3d7c571ef969281235a202a1d16fbfd1 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromstring" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromstring</refname>
Expand Down Expand Up @@ -97,7 +97,6 @@ $im = imagecreatefromstring($data);
if ($im !== false) {
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
}
else {
echo 'Ocorreu um erro.';
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromwbmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromwbmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromwbmp</refname>
Expand Down Expand Up @@ -100,7 +100,6 @@ header('Content-Type: image/vnd.wap.wbmp');
$img = LoadWBMP('bogus.image');
imagewbmp($img);
imagedestroy($img);
?>
]]>
</programlisting>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromwebp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: d09a881a8e9059d11e756ee59d75bf404d6941ed Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromwebp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromwebp</refname>
Expand Down Expand Up @@ -77,7 +77,6 @@ $im = imagecreatefromwebp('./example.webp');
// Converte para um jpeg com 100% de qualidade
imagejpeg($im, './example.jpeg', 100);
imagedestroy($im);
?>
]]>
</programlisting>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromxbm.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromxbm" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromxbm</refname>
Expand Down Expand Up @@ -73,7 +73,6 @@ $xbm = imagecreatefromxbm('./example.xbm');
// Converte para um arquivo png
imagepng($xbm, './example.png');
imagedestroy($xbm);
?>
]]>
</programlisting>
Expand Down
3 changes: 1 addition & 2 deletions reference/image/functions/imagecreatefromxpm.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatefromxpm" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromxpm</refname>
Expand Down Expand Up @@ -83,7 +83,6 @@ $xpm = imagecreatefromxpm('./example.xpm');
// portanto neste caso uma imagem jpeg é
// gravada com 100% de qualidade
imagejpeg($xpm, './example.jpg', 100);
imagedestroy($xpm);
?>
]]>
</programlisting>
Expand Down
4 changes: 1 addition & 3 deletions reference/image/functions/imagecreatetruecolor.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: leonardolara Status: ready -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: leonardolara Status: ready -->
<refentry xml:id="function.imagecreatetruecolor" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatetruecolor</refname>
Expand Down Expand Up @@ -84,7 +84,6 @@ $im = @imagecreatetruecolor(120, 20)
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
imagepng($im);
imagedestroy($im);
?>
]]>
</programlisting>
Expand All @@ -102,7 +101,6 @@ imagedestroy($im);
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>imagedestroy</function></member>
<member><function>imagecreate</function></member>
</simplelist>
</refsect1>
Expand Down

0 comments on commit 044464f

Please sign in to comment.