php-doc-en/reference/imagick/imagick/recolorimage.xml
Dan Ackroyd 18dc6d0d46 Added lots of examples to Imagick
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336315 c90b9560-bf6c-de11-be94-00142212c4b1
2015-04-01 15:11:11 +00:00

111 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.recolorimage">
<refnamediv>
<refname>Imagick::recolorImage</refname>
<refpurpose>Recolors image</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>Imagick::recolorImage</methodname>
<methodparam><type>array</type><parameter>matrix</parameter></methodparam>
</methodsynopsis>
<para>
Translate, scale, shear, or rotate image colors. This method supports variable sized matrices but normally
5x5 matrix is used for RGBA and 6x6 is used for CMYK. The last row should contain the normalized values.
&imagick.method.available.0x636;
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>matrix</parameter></term>
<listitem>
<para>
The matrix containing the color values
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&imagick.return.success;
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>Imagick::displayImage</function></member>
</simplelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title> <function>Imagick::recolorImage</function></title>
<programlisting role="php">
<![CDATA[
<?php
function recolorImage($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$remapColor = [ 1, 0, 0,
0, 0, 1,
0, 1, 0,];
//$remapColor = [
// 1.438, -0.122, -0.016, 0, 0, -0.03,
// -0.062, 1.378, -0.016, 0, 0, 0.05,
// -0.062, -0.122, 1.483, 0, 0, -0.02,
//];
@$imagick->recolorImage($remapColor);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>
]]>
</programlisting>
</example>
</para>
</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
-->