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

120 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.imagecreatefromgd" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecreatefromgd</refname>
<refpurpose>Crea una nueva imagen a partir de un fichero GD o de una URL</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagecreatefromgd</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
Crea una nueva imagen a partir de un fichero GD o de una URL.
</para>
&tip.fopen-wrapper;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Ruta de acceso a un fichero GD.
</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;
<para>
<example>
<title>Ejemplo con <function>imagecreatefromgd</function></title>
<programlisting role="php">
<![CDATA[
<?php
// Carga una imagen GD
$im = @imagecreatefromgd('./test.gd');
// Verifica si la imagen se ha cargado correctamente
if(!$im)
{
die('No ha sido posible cargar la imagen GD');
}
// Operaciones sobre la imagen aquí
// Guardado de la imagen
imagegd($im, './test_updated.gd');
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&gd.deprecated.gd-formats;
</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
-->