mirror of
https://github.com/php/doc-es.git
synced 2026-03-23 23:12:09 +01:00
159 lines
4.8 KiB
XML
159 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: ccd3e68e1e8a89a099a32207dd31ed26b70f43cd Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="function.imagescale" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>imagescale</refname>
|
|
<refpurpose>Redimensiona una imagen utilizando una altura y una anchura proporcionadas</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagescale</methodname>
|
|
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>width</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>height</parameter><initializer>-1</initializer></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>IMG_BILINEAR_FIXED</constant></initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imagescale</function> redimensiona una imagen utilizando el algoritmo de interpolación dado.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
A diferencia de muchas otras funciones de imagen, <function>imagescale</function>
|
|
no modifica la <parameter>image</parameter> proporcionada; en su lugar, se
|
|
devuelve una <emphasis>nueva</emphasis> imagen.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
&gd.image.description;
|
|
<varlistentry>
|
|
<term><parameter>width</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La anchura a utilizar para el redimensionamiento de la imagen.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>height</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La altura a utilizar para el redimensionamiento de la imagen. Si se omite o
|
|
es negativa, se preservará la relación de aspecto de la imagen.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>mode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Una de las constantes <constant>IMG_NEAREST_NEIGHBOUR</constant>,
|
|
<constant>IMG_BILINEAR_FIXED</constant>,
|
|
<constant>IMG_BICUBIC</constant>,
|
|
<constant>IMG_BICUBIC_FIXED</constant> o cualquier otra (utilizará dos pasadas).
|
|
<note>
|
|
<simpara>
|
|
<constant>IMG_WEIGHTED4</constant> aún no está soportado.
|
|
</simpara>
|
|
</note>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve el objeto de la imagen redimensionada en caso de
|
|
éxito&return.falseforfailure;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<simpara>
|
|
Genera una <classname>ValueError</classname> si <parameter>width</parameter>
|
|
o <parameter>height</parameter> provoca un desbordamiento o un subdesbordamiento.
|
|
</simpara>
|
|
<simpara>
|
|
Genera una <classname>ValueError</classname> si <parameter>mode</parameter> es inválido.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.4.0</entry>
|
|
<entry>
|
|
Ahora genera una <classname>ValueError</classname> si <parameter>width</parameter>
|
|
o <parameter>height</parameter> provoca un desbordamiento o un subdesbordamiento.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>8.4.0</entry>
|
|
<entry>
|
|
Ahora genera una <classname>ValueError</classname> si <parameter>mode</parameter> es inválido.
|
|
</entry>
|
|
</row>
|
|
<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>
|
|
&gd.changelog.image-param;
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><function>imagecopyresized</function></member>
|
|
<member><function>imagecopyresampled</function></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|