mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@310014 c90b9560-bf6c-de11-be94-00142212c4b1
125 lines
3.1 KiB
XML
125 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: d732584196d90d7be728ea0ca101461c2ed8570c Maintainer: seros Status: ready -->
|
|
<refentry xml:id='function.imagegd' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagegd</refname>
|
|
<refpurpose>Imprime una imagen GD2 a un navegador o archivo</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagegd</methodname>
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Imprime una imagen GD en <parameter>filename</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
&gd.image.description;
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<para>&gd.image.path;</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Imprimir una imagen GD</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Crear una imagen en blanco y añadir algún texto
|
|
$im = imagecreatetruecolor(120, 20);
|
|
$color_texto = imagecolorallocate($im, 233, 14, 91);
|
|
imagestring($im, 1, 5, 5, "Una Sencilla Cadena De Texto", $color_texto);
|
|
|
|
// Imprimir la imagen
|
|
imagegd($im);
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Saving a GD image</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Crear una imagen en blanco y añadir algún texto
|
|
$im = imagecreatetruecolor(120, 20);
|
|
$color_texto = imagecolorallocate($im, 233, 14, 91);
|
|
imagestring($im, 1, 5, 5, "Una Sencilla Cadena De Texto", $color_texto);
|
|
|
|
// Guardar la imagen gd
|
|
// El formato de archivo para imágenes GD es .gd, véase http://www.libgd.org/GdFileFormats
|
|
imagegd($im, 'simple.gd');
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
El formato GD2 se usa comúnmente para permitir una carga rápida de partes de imágenes.
|
|
Observe que el formato GD2 sólo es utilizable en aplicaciones compatibles con GD2.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>imagegd2</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|