mirror of
https://github.com/php/doc-es.git
synced 2026-03-23 23:12:09 +01:00
127 lines
3.4 KiB
XML
127 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="function.imagecolormatch" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagecolormatch</refname>
|
|
<refpurpose>Hace que las colores de la versión palette de una imagen coincidan más con las de su versión truecolor</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagecolormatch</methodname>
|
|
<methodparam><type>GdImage</type><parameter>image1</parameter></methodparam>
|
|
<methodparam><type>GdImage</type><parameter>image2</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Hace que las colores de la versión palette de una imagen coincidan más con las de su versión truecolor.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>image1</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un objeto de imagen truecolor.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>image2</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un objeto de imagen palette que apunta a una imagen
|
|
que tiene el mismo tamaño que <parameter>image1</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</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>
|
|
<parameter>image1</parameter> y <parameter>image2</parameter> ahora requieren instancias de <classname>GdImage</classname>; anteriormente se esperaban <type>resource</type>s
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Ejemplo con <function>imagecolormatch</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Define la imagen true color y la palette
|
|
$im1 = imagecreatefrompng('./gdlogo.png');
|
|
$im2 = imagecreate(imagesx($im1), imagesy($im1));
|
|
|
|
// Añade algunas colores a $im2
|
|
$colors = Array();
|
|
$colors[] = imagecolorallocate($im2, 255, 36, 74);
|
|
$colors[] = imagecolorallocate($im2, 40, 0, 240);
|
|
$colors[] = imagecolorallocate($im2, 82, 100, 255);
|
|
$colors[] = imagecolorallocate($im2, 84, 63, 44);
|
|
|
|
// Hace que estas colores coincidan con la imagen true color
|
|
imagecolormatch($im1, $im2);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><function>imagecreatetruecolor</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
|
|
-->
|