mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 01:42:09 +01:00
136 lines
3.5 KiB
XML
136 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 593ea510e853ff034e03f78a4be0daa41661c9d4 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="function.imagecolormatch" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagecolormatch</refname>
|
|
<refpurpose>Fait correspondre un peu plus les couleurs de la version palette d'une image
|
|
aux couleurs de sa version 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>
|
|
Fait correspondre un peu plus les couleurs de la version palette d'une image
|
|
aux couleurs de sa version truecolor.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>image1</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un objet d'image truecolor.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>image2</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un objet de palette d'image pointant sur une image
|
|
qui a la même taille 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> et <parameter>image2</parameter> attend
|
|
désormais des instances de <classname>GdImage</classname> ; auparavant,
|
|
<type>resource</type>s étaient attendues
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Exemple avec <function>imagecolormatch</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Définit l'image true color et la palette
|
|
$im1 = imagecreatefrompng('./gdlogo.png');
|
|
$im2 = imagecreate(imagesx($im1), imagesy($im1));
|
|
|
|
// Ajout de quelques couleurs à $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);
|
|
|
|
// Fait correspondre ces couleurs avec l'image true color
|
|
imagecolormatch($im1, $im2);
|
|
|
|
// Libération de la mémoire
|
|
imagedestroy($im1);
|
|
imagedestroy($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
|
|
-->
|