<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.imagick.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'imagick.setimagetype.php',
    1 => 'Imagick::setImageType',
    2 => 'Sets the image type',
  ),
  'up' => 
  array (
    0 => 'class.imagick.php',
    1 => 'Imagick',
  ),
  'prev' => 
  array (
    0 => 'imagick.setimagetickspersecond.php',
    1 => 'Imagick::setImageTicksPerSecond',
  ),
  'next' => 
  array (
    0 => 'imagick.setimageunits.php',
    1 => 'Imagick::setImageUnits',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imagick/imagick/setimagetype.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="imagick.setimagetype" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::setImageType</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::setImageType</span> &mdash; <span class="dc-title">Sets the image type</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.setimagetype-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>Imagick::setImageType</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$image_type</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Converts the image to the given type, which combines a color model with the
   presence or absence of an alpha channel.
   Depending on the type, this may change the colorspace, quantize the colors,
   or change whether the image has an alpha channel.
  </p>
  <p class="simpara">
   <span class="methodname"><strong>Imagick::setImageType()</strong></span> modifies the image itself.
   To set the type that subsequent images are written with instead, use
   <span class="methodname"><a href="imagick.settype.php" class="methodname">Imagick::setType()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.setimagetype-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">image_type</code></dt>
    <dd>
     <p class="simpara">
      One of the
      <a href="imagick.constants.php#imagick.constants.imagetype" class="link"><strong><code><a href="imagick.constants.php#imagick.constants.imgtype-undefined">imagick::IMGTYPE_<span class="replaceable">*</span></a></code></strong></a>
      constants. <strong><code><a href="imagick.constants.php#imagick.constants.imgtype-undefined">imagick::IMGTYPE_UNDEFINED</a></code></strong> and
      <strong><code><a href="imagick.constants.php#imagick.constants.imgtype-optimize">imagick::IMGTYPE_OPTIMIZE</a></code></strong> convert nothing, but are
      still recorded on the image.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.setimagetype-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success.
  </p>
 </div>


</div><?php manual_footer($setup); ?>