diff --git a/reference/image/functions/imagecopy.xml b/reference/image/functions/imagecopy.xml index 327cabae4..e3591d79b 100644 --- a/reference/image/functions/imagecopy.xml +++ b/reference/image/functions/imagecopy.xml @@ -1,5 +1,5 @@ - + imagecopy @@ -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); ?> ]]> diff --git a/reference/image/functions/imagecopymerge.xml b/reference/image/functions/imagecopymerge.xml index d7e4cb9bc..fdaeef80d 100644 --- a/reference/image/functions/imagecopymerge.xml +++ b/reference/image/functions/imagecopymerge.xml @@ -1,5 +1,5 @@ - + imagecopymerge @@ -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); ?> ]]> diff --git a/reference/image/functions/imagecopymergegray.xml b/reference/image/functions/imagecopymergegray.xml index b42cfb2a4..4abd702f9 100644 --- a/reference/image/functions/imagecopymergegray.xml +++ b/reference/image/functions/imagecopymergegray.xml @@ -1,5 +1,5 @@ - + imagecopymergegray @@ -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); ?> ]]> diff --git a/reference/image/functions/imagecreate.xml b/reference/image/functions/imagecreate.xml index ed5317849..d962a96d8 100644 --- a/reference/image/functions/imagecreate.xml +++ b/reference/image/functions/imagecreate.xml @@ -1,5 +1,5 @@ - - + + imagecreate @@ -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); ?> ]]> @@ -111,7 +110,6 @@ imagedestroy($im); &reftitle.seealso; - imagedestroy imagecreatetruecolor diff --git a/reference/image/functions/imagecreatefrombmp.xml b/reference/image/functions/imagecreatefrombmp.xml index ea3c35d8f..f51063de0 100644 --- a/reference/image/functions/imagecreatefrombmp.xml +++ b/reference/image/functions/imagecreatefrombmp.xml @@ -1,5 +1,5 @@ - + imagecreatefrombmp @@ -76,7 +76,6 @@ $im = imagecreatefrombmp('./example.bmp'); // Converte para um PNG com a configuração padrão imagepng($im, './example.png'); -imagedestroy($im); ?> ]]> diff --git a/reference/image/functions/imagecreatefromgd.xml b/reference/image/functions/imagecreatefromgd.xml index be5ae5218..9c4cba569 100644 --- a/reference/image/functions/imagecreatefromgd.xml +++ b/reference/image/functions/imagecreatefromgd.xml @@ -1,5 +1,5 @@ - - + + imagecreatefromgd @@ -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); ?> ]]> diff --git a/reference/image/functions/imagecreatefromgd2.xml b/reference/image/functions/imagecreatefromgd2.xml index d726b9d7c..14dd90059 100644 --- a/reference/image/functions/imagecreatefromgd2.xml +++ b/reference/image/functions/imagecreatefromgd2.xml @@ -1,5 +1,5 @@ - + imagecreatefromgd2 @@ -79,7 +79,6 @@ if(function_exists('imagefilter')) // Grava a imagem imagegd2($im, './test_updated.gd2'); -imagedestroy($im); ?> ]]> diff --git a/reference/image/functions/imagecreatefromgd2part.xml b/reference/image/functions/imagecreatefromgd2part.xml index 194ab3748..278f0a3e1 100644 --- a/reference/image/functions/imagecreatefromgd2part.xml +++ b/reference/image/functions/imagecreatefromgd2part.xml @@ -1,5 +1,5 @@ - + imagecreatefromgd2part @@ -114,7 +114,6 @@ if(function_exists('imagefilter')) // Grava a imagem transformada imagegd2($im, './test_emboss.gd2'); -imagedestroy($im); ?> ]]> diff --git a/reference/image/functions/imagecreatefromgif.xml b/reference/image/functions/imagecreatefromgif.xml index 644d396d9..56bd43881 100644 --- a/reference/image/functions/imagecreatefromgif.xml +++ b/reference/image/functions/imagecreatefromgif.xml @@ -1,5 +1,5 @@ - + imagecreatefromgif @@ -101,7 +101,6 @@ header('Content-Type: image/gif'); $img = LoadGif('bogus.image'); imagegif($img); -imagedestroy($img); ?> ]]> diff --git a/reference/image/functions/imagecreatefromjpeg.xml b/reference/image/functions/imagecreatefromjpeg.xml index 2bd632f50..b0cbfd514 100644 --- a/reference/image/functions/imagecreatefromjpeg.xml +++ b/reference/image/functions/imagecreatefromjpeg.xml @@ -1,5 +1,5 @@ - - + + imagecreatefromjpeg @@ -94,13 +94,12 @@ header('Content-Type: image/jpeg'); $img = LoadJpeg('bogus.image'); imagejpeg($img); -imagedestroy($img); ?> ]]> &example.outputs.similar; - OSaída do exemplo: Exemplo de como lidar com um erro durante o carregamento de um JPEG. + Saída do exemplo: Exemplo de como lidar com um erro durante o carregamento de um JPEG. diff --git a/reference/image/functions/imagecreatefrompng.xml b/reference/image/functions/imagecreatefrompng.xml index e6623a911..39aa051ff 100644 --- a/reference/image/functions/imagecreatefrompng.xml +++ b/reference/image/functions/imagecreatefrompng.xml @@ -1,5 +1,5 @@ - - + + imagecreatefrompng @@ -94,13 +94,12 @@ header('Content-Type: image/png'); $img = LoadPNG('bogus.image'); imagepng($img); -imagedestroy($img); ?> ]]> &example.outputs.similar; - imagecreatefrompng() exemplo + Exemplo de imagecreatefrompng() diff --git a/reference/image/functions/imagecreatefromstring.xml b/reference/image/functions/imagecreatefromstring.xml index 429d55a42..fbbdda6f5 100644 --- a/reference/image/functions/imagecreatefromstring.xml +++ b/reference/image/functions/imagecreatefromstring.xml @@ -1,5 +1,5 @@ - + imagecreatefromstring @@ -97,7 +97,6 @@ $im = imagecreatefromstring($data); if ($im !== false) { header('Content-Type: image/png'); imagepng($im); - imagedestroy($im); } else { echo 'Ocorreu um erro.'; diff --git a/reference/image/functions/imagecreatefromwbmp.xml b/reference/image/functions/imagecreatefromwbmp.xml index 462111e13..c61b9d87a 100644 --- a/reference/image/functions/imagecreatefromwbmp.xml +++ b/reference/image/functions/imagecreatefromwbmp.xml @@ -1,5 +1,5 @@ - + imagecreatefromwbmp @@ -100,7 +100,6 @@ header('Content-Type: image/vnd.wap.wbmp'); $img = LoadWBMP('bogus.image'); imagewbmp($img); -imagedestroy($img); ?> ]]> diff --git a/reference/image/functions/imagecreatefromwebp.xml b/reference/image/functions/imagecreatefromwebp.xml index 960137280..9ca8f42c5 100644 --- a/reference/image/functions/imagecreatefromwebp.xml +++ b/reference/image/functions/imagecreatefromwebp.xml @@ -1,5 +1,5 @@ - + imagecreatefromwebp @@ -77,7 +77,6 @@ $im = imagecreatefromwebp('./example.webp'); // Converte para um jpeg com 100% de qualidade imagejpeg($im, './example.jpeg', 100); -imagedestroy($im); ?> ]]> diff --git a/reference/image/functions/imagecreatefromxbm.xml b/reference/image/functions/imagecreatefromxbm.xml index d3ee4c990..a78516bed 100644 --- a/reference/image/functions/imagecreatefromxbm.xml +++ b/reference/image/functions/imagecreatefromxbm.xml @@ -1,5 +1,5 @@ - + imagecreatefromxbm @@ -73,7 +73,6 @@ $xbm = imagecreatefromxbm('./example.xbm'); // Converte para um arquivo png imagepng($xbm, './example.png'); -imagedestroy($xbm); ?> ]]> diff --git a/reference/image/functions/imagecreatefromxpm.xml b/reference/image/functions/imagecreatefromxpm.xml index b2c07c4f0..2c069e0b1 100644 --- a/reference/image/functions/imagecreatefromxpm.xml +++ b/reference/image/functions/imagecreatefromxpm.xml @@ -1,5 +1,5 @@ - + imagecreatefromxpm @@ -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); ?> ]]> diff --git a/reference/image/functions/imagecreatetruecolor.xml b/reference/image/functions/imagecreatetruecolor.xml index 72a1d2d2e..a8d60531a 100644 --- a/reference/image/functions/imagecreatetruecolor.xml +++ b/reference/image/functions/imagecreatetruecolor.xml @@ -1,5 +1,5 @@ - + imagecreatetruecolor @@ -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); ?> ]]> @@ -102,7 +101,6 @@ imagedestroy($im); &reftitle.seealso; - imagedestroy imagecreate