1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-23 23:12:09 +01:00
Files
archived-doc-es/reference/image/functions/imagecreatefromwbmp.xml
2025-07-04 13:17:42 +02:00

132 lines
3.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="function.imagecreatefromwbmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromwbmp</refname>
<refpurpose>&gd.image.new;</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagecreatefromwbmp</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
<function>imagecreatefromwbmp</function> devuelve un recurso de imagen
PHP, que representa la imagen <parameter>filename</parameter>.
</para>
<note>
<simpara>
Las imágenes WBMP son Wireless Bitmaps, y no Windows Bitmaps. Estas últimas
pueden cargarse mediante <function>imagecreatefrombmp</function>.
</simpara>
</note>
&tip.fopen-wrapper;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Ruta de acceso a la imagen WBMP.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>&gd.return.identifier;</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
En caso de éxito, esta función devuelve ahora una instancia de
<classname>GDImage</classname> ; anteriormente,
se devolvía un <type>resource</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Ejemplo de gestión de un error al cargar una imagen WBMP</title>
<programlisting role="php">
<![CDATA[
<?php
function LoadWBMP($imgname)
{
/* Intento de abrir la imagen */
$im = @imagecreatefromwbmp($imgname);
/* Procesamiento en caso de fallo */
if(!$im)
{
/* Creación de una imagen vacía */
$im = imagecreatetruecolor(150, 30);
$bgc = imagecolorallocate($im, 255, 255, 255);
$tc = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
/* Se muestra un mensaje de error */
imagestring($im, 1, 5, 5, 'Error de carga ' . $imgname, $tc);
}
return $im;
}
header('Content-Type: image/vnd.wap.wbmp');
$img = LoadWBMP('bogus.image');
imagewbmp($img);
?>
]]>
</programlisting>
</example>
</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
-->