mirror of
https://github.com/php/doc-es.git
synced 2026-04-23 15:18:07 +02:00
bc7c25e06f
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@337149 c90b9560-bf6c-de11-be94-00142212c4b1
133 lines
3.5 KiB
XML
133 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 5ee269e173664c5b6d5ad54b88f62a7f927d0d45 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.imagexbm" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagexbm</refname>
|
|
<refpurpose>Imprimir una imagen XBM en el navegador o en un fichero</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagexbm</methodname>
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>foreground</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Imprime o guarda una versión <acronym>XBM</acronym> de la imagen
|
|
<parameter>image</parameter>.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
<function>imagexbm</function> no aplica ningún relleno, por lo que el ancho de la image
|
|
ha de ser múltiplo de 8.
|
|
</simpara>
|
|
</note>
|
|
</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>foreground</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Se puede establecer el color de primer plano con este parámetro estableciendo un
|
|
identificador obtenido de <function>imagecolorallocate</function>.
|
|
El color de primer plano por defecto es negro. Todos los demás colores son tratados
|
|
como fondo.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Guardar un fichero XBM</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, 'A Simple Text String', $color_texto);
|
|
|
|
// Guardar la imagen
|
|
imagexbm($im, 'simpletext.xbm');
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Guardar un fichero XBM con un color de primer plano diferente</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, 'A Simple Text String', $color_texto);
|
|
|
|
// Esteblecer un color de primer plano sustituto
|
|
$color_primer_plano = imagecolorallocate($im, 255, 0, 0);
|
|
|
|
// Guardar la imagen
|
|
imagexbm($im, NULL, $color_primer_plano);
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
</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
|
|
-->
|