<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; U; SunOS 5.6 sun4u) [Netscape]">
   <meta name="Author" content="Bob Friesenhahn">
   <meta name="Description" content="Description of PixelPacket structure members.">
   <title>ImageMagick PixelPacket Structure</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#1F00FF" alink="#FF0000"
  vlink="#9900DD">

<center>
<h1>
ImageMagick PixelPacket Structure</h1></center>
The <i>PixelPacket</i> structure is used to represent <a href="Enumerations.html#ClassType">DirectClass</a>
color <a href="Image.html#pixels">pixels</a> in ImageMagick. If the image
is indicated as a <a href="Enumerations.html#ClassType">PseudoClass</a>
image, its DirectClass representation is only valid immediately after calling
SyncImage(). If an image is set as PseudoClass and the DirectClass representation
is modified, the image should then be set as DirectClass. Use QuantizeImage()
to restore the PseudoClass colormap if the DirectClass representation is
modified.
<p>The members of the <i>PixelPacket</i> structure are shown in the
following table:
<br>&nbsp;
<table BORDER WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE >
<caption><b>PixelPacket Structure Members</b></caption>

<tr NOSAVE>
<td ROWSPAN="2" NOSAVE>
<center><b>Member</b></center>
</td>

<td ROWSPAN="2" NOSAVE>
<center><b>Type</b></center>
</td>

<td COLSPAN="3" NOSAVE>
<center><b>Interpretation</b></center>
</td>
</tr>

<tr>
<td>
<center><a href="Enumerations.html#ColorspaceType">RGBColorspace</a> <font color="#FF0000">(4)</font></center>
</td>

<td>
<center><a href="Enumerations.html#ColorspaceType">RGBColorspace</a> +
<a href="Image.html#matte">matte</a>
<font color="#FF0000">(4)&nbsp;</font></center>
</td>

<td>
<center><a href="Enumerations.html#ColorspaceType">CMYKColorspace</a></center>
</td>
</tr>

<tr NOSAVE>
<td><font size=-1>red</font></td>

<td NOSAVE><font size=-1>Quantum</font></td>

<td NOSAVE><font size=-1>Red</font></td>

<td><font size=-1>Red</font></td>

<td><font size=-1>Cyan</font></td>
</tr>

<tr>
<td><font size=-1>green</font></td>

<td><font size=-1>Quantum</font></td>

<td><font size=-1>Green</font></td>

<td><font size=-1>Green</font></td>

<td><font size=-1>Magenta</font></td>
</tr>

<tr>
<td><font size=-1>blue</font></td>

<td><font size=-1>Quantum</font></td>

<td><font size=-1>Blue</font></td>

<td><font size=-1>Blue</font></td>

<td><font size=-1>Yellow</font></td>
</tr>

<tr>
<td><font size=-1>opacity</font></td>

<td><font size=-1>Quantum</font></td>

<td><font size=-1>Opacity</font></td>

<td><font size=-1>Opacity</font></td>

<td><font size=-1>Black</font></td>
</tr>

<tr>
<td><font size=-1>index</font></td>

<td><font size=-1>unsigned short</font></td>

<td><font size=-1>Index into image <a href="Image.html#colormap">colormap</a><font color="#FF0000">(2)</font></font></td>

<td><font size=-1>Index into image <a href="Image.html#colormap">colormap</a><font color="#FF0000">(2)</font></font></td>

<td><font size=-1>Index into image <a href="Image.html#colormap">colormap</a><font color="#FF0000">(2)</font></font></td>
</tr>
</table>

<p><font color="#000000">Notes:</font>
<ol>
<li>
Quantum is an unsigned short (MaxRGB=65535) if ImageMagick is built using
-DQuantumLeap. Otherwise it is an unsigned char (MaxRGB=255).</li>

<li>
RGB index is only valid for PseudoClass images (<a href="Image.html#class">class</a>=<a href="Enumerations.html#ClassType">PseudoClass</a>).</li>

<li>
SyncImage() may be used to synchronize the DirectClass color pixels to
the current PseudoClass colormap.</li>

<li>
For pixel representation purposes, all colorspaces are treated like RGBColorspace
except for CMYKColorspace.</li>
</ol>

<p><hr>
<p><a href="../../../ImageMagick.html"><img SRC="../../../images/home.png"
  ALT="Home Page" BORDER=0 height=40 width=40 align=CENTER></a><font size=-2>
  Image manipulation software that works like magic.</font></dl>

</body>
</html>
