mirror of
https://github.com/php/doc-es.git
synced 2026-04-24 07:38:19 +02:00
2dbe8b0b65
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@310014 c90b9560-bf6c-de11-be94-00142212c4b1
171 lines
4.6 KiB
XML
171 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: d732584196d90d7be728ea0ca101461c2ed8570c Maintainer: seros Status: ready -->
|
|
<refentry xml:id="function.imagewbmp" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagewbmp</refname>
|
|
<refpurpose>&gd.image.output;</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagewbmp</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>foreground</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imagewbmp</function> imprime o guarda una versión <acronym>WBMP</acronym>
|
|
de la imagen <parameter>image</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>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.
|
|
</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 WBMP</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);
|
|
|
|
// Establecer la cabecera de tipo de contenido conveniente - es este caso image/vnd.wap.wbmp
|
|
// Consejo: vea image_type_to_mime_type() para los tipos de contenido
|
|
header('Content-Type: image/vnd.wap.wbmp');
|
|
|
|
// Imprimir la imagen
|
|
imagewbmp($im);
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Guardar una imagen WBMP</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
|
|
imagewbmp($im, 'simpletext.wbmp');
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Imprimir la imagen con un 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);
|
|
|
|
// Establecer la cabecera de tipo de contenido conveniente - es este caso image/vnd.wap.wbmp
|
|
// Consejo: vea image_type_to_mime_type() para los tipos de contenido
|
|
header('Content-Type: image/vnd.wap.wbmp');
|
|
|
|
// Esteblecer un color de primer plano sustituto
|
|
$color_primer_plano = imagecolorallocate($im, 255, 0, 0);
|
|
|
|
imagewbmp($im, NULL, $color_primer_plano);
|
|
|
|
// Liberar memoria
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
El soporte para WBMP sólo está disponible si PHP fue compilado con GD-1.8 o
|
|
superior.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>image2wbmp</function></member>
|
|
<member><function>imagepng</function></member>
|
|
<member><function>imagegif</function></member>
|
|
<member><function>imagejpeg</function></member>
|
|
<member><function>imagetypes</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
|
|
-->
|