1
0
mirror of https://github.com/php/doc-ja.git synced 2026-04-27 10:06:43 +02:00
Files
archived-doc-ja/reference/image/functions/imagecolormatch.xml
T

132 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.imagecolormatch" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagecolormatch</refname>
<refpurpose>パレットイメージの色を True カラーイメージに近づける</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>
パレットイメージの色を True カラーイメージに近づけます。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>image1</parameter></term>
<listitem>
<para>
truecolor イメージオブジェクト
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>image2</parameter></term>
<listitem>
<para>
パレットイメージオブジェクト。
<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>
<parameter>image2</parameter> は、
<classname>GdImage</classname>
クラスのインスタンスを期待するようになりました。
これより前のバージョンでは、
<type>resource</type> が期待されていました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>imagecolormatch</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
// true color 画像とパレット画像を用意します
$im1 = imagecreatefrompng('./gdlogo.png');
$im2 = imagecreate(imagesx($im1), imagesy($im1));
// いくつかの色を $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);
// これらの色を 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
-->