mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 16:32:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@329994 c90b9560-bf6c-de11-be94-00142212c4b1
183 lines
4.3 KiB
XML
183 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: ee1d6c45ddf1be378925cc7e1a2b4b46fba1378a Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.imageflip" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imageflip</refname>
|
|
<refpurpose>Flips an image using a given mode</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imageflip</methodname>
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Voltea la imagen dada por <parameter>image</parameter> usando el modo dado por
|
|
<parameter>mode</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
&gd.image.description;
|
|
<varlistentry>
|
|
<term><parameter>mode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Modo de volteo; puede ser una de las constantes <constant>IMG_FLIP_*</constant>:
|
|
</para>
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Constante</entry>
|
|
<entry>Significado</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>IMG_FLIP_HORIZONTAL</constant></entry>
|
|
<entry>
|
|
Voltea la imagen horizontalmente.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>IMG_FLIP_VERTICAL</constant></entry>
|
|
<entry>
|
|
Voltea la imagen verticalmente.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>IMG_FLIP_BOTH</constant></entry>
|
|
<entry>
|
|
Voltea la imagen tanto horizontal como verticalmente.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Voltea una imagen verticalmente</title>
|
|
<para>
|
|
Este ejemplo utiliza la constante
|
|
<constant>IMG_FLIP_VERTICAL</constant>.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Fichero
|
|
$nombre_fichero = 'phplogo.png';
|
|
|
|
// Tipo de contenido
|
|
header('Content-type: image/png');
|
|
|
|
// Cargar
|
|
$im = imagecreatefrompng($nombre_fichero);
|
|
|
|
// Voltearla verticalmente
|
|
imageflip($im, IMG_FLIP_VERTICAL);
|
|
|
|
// Imprimirla
|
|
imagejpeg($im);
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<mediaobject>
|
|
<alt>Salida del ejemplo: Imagen volteada verticalmente</alt>
|
|
<imageobject>
|
|
<imagedata fileref="en/reference/image/figures/imageflipvertical.png"/>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Voltea la imagen horizontalmente</title>
|
|
<para>
|
|
Este ejemplo utiliza la constante <constant>IMG_FLIP_HORIZONTAL</constant>.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Fichero
|
|
$nombre_fichero = 'phplogo.png';
|
|
|
|
// Tipo de contenido
|
|
header('Content-type: image/png');
|
|
|
|
// Cargar
|
|
$im = imagecreatefrompng($nombre_fichero);
|
|
|
|
// Voltearla horizontalmente
|
|
imageflip($im, IMG_FLIP_HORIZONTAL);
|
|
|
|
// Imprimirla
|
|
imagejpeg($im);
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<mediaobject>
|
|
<alt>Salida del ejemplo: Imagen volteada horizontalmente</alt>
|
|
<imageobject>
|
|
<imagedata fileref="en/reference/image/figures/imagefliphorizontal.png"/>
|
|
</imageobject>
|
|
</mediaobject>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.bundled.gd;
|
|
</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
|
|
-->
|