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@334619 c90b9560-bf6c-de11-be94-00142212c4b1
147 lines
3.8 KiB
XML
147 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 8b5940cadeb4f1c8492f4a7f70743a2be807cf39 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id='function.imagegd2' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagegd2</refname>
|
|
<refpurpose>Imprime una imagen GD2 a un navegador o archivo</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagegd2</methodname>
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>IMG_GD2_RAW</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Imprime una imagen GD2 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>
|
|
<varlistentry>
|
|
<term><parameter>chunk_size</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Tamaño del trozo.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>type</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Puede ser <constant>IMG_GD2_RAW</constant> o
|
|
<constant>IMG_GD2_COMPRESSED</constant>. Por defecto es
|
|
<constant>IMG_GD2_RAW</constant>.
|
|
</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 GD2</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
|
|
imagegd2($im);
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Guardar una imagen GD2</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 gd2
|
|
// El formato de archivo para imágenes GD2 es .gd2, véase http://www.libgd.org/GdFileFormats
|
|
imagegd2($im, 'simple.gd2');
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.gd.2;
|
|
<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>imagegd</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
|
|
-->
|