<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.transparentpaintimage">
 <refnamediv>
  <refname>Imagick::transparentPaintImage</refname>
  <refpurpose>Paints pixels transparent</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <type>bool</type><methodname>Imagick::transparentPaintImage</methodname>
   <methodparam><type>mixed</type><parameter>target</parameter></methodparam>
   <methodparam><type>float</type><parameter>alpha</parameter></methodparam>
   <methodparam><type>float</type><parameter>fuzz</parameter></methodparam>
   <methodparam><type>bool</type><parameter>invert</parameter></methodparam>
  </methodsynopsis>

  <para>
   Paints pixels matching the target color transparent.
   &imagick.method.available.0x638;
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>target</parameter></term>
     <listitem>
      <para>
       The target color to paint
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>alpha</parameter></term>
     <listitem>
      <para>
       &imagick.parameter.alpha;
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>fuzz</parameter></term>
     <listitem>
      <para>
       &imagick.parameter.fuzz;
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>invert</parameter></term>
     <listitem>
      <para>
       If &true; paints any pixel that does not match the target color.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>

 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &imagick.return.success;
  </para>
 </refsect1>



 <refsect1 role="examples">
  &reftitle.examples;
  <para>
    <example>
      <title> <function>Imagick::transparentPaintImage</function></title>
      <programlisting role="php">
      <![CDATA[
<?php
function transparentPaintImage($color, $alpha, $fuzz) {
    $imagick = new \Imagick(realpath("images/BlueScreen.jpg"));

    //Need to be in a format that supports transparency
    $imagick->setimageformat('png');

    $imagick->transparentPaintImage(
        $color, $alpha, $fuzz * \Imagick::getQuantum(), false
    );

    //Not required, but helps tidy up left over pixels
    $imagick->despeckleimage();

    header("Content-Type: image/png");
    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
-->
