Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 0d81a008159b90d5a3553d84969a208b > files > 83

graphicsmagick-doc-1.2.5-2.3mdvmes5.2.x86_64.rpm

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>color - Color related functions</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:bfriesen@freddy.simplesystems.org" />
</head>

<body style="background-color: white">

<P><a name="__index__"></a></P>
<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#function_descriptions">FUNCTION DESCRIPTIONS</a></li>
	<ul>

		<li><a href="#getcolorinfoarray">GetColorInfoArray</a></li>
		<li><a href="#getcolorhistogram">GetColorHistogram</a></li>
		<li><a href="#getcolorlist">GetColorlist</a></li>
		<li><a href="#getnumbercolors">GetNumberColors</a></li>
		<li><a href="#isgrayimage">IsGrayImage</a></li>
		<li><a href="#ismonochromeimage">IsMonochromeImage</a></li>
		<li><a href="#isopaqueimage">IsOpaqueImage</a></li>
		<li><a href="#ispaletteimage">IsPaletteImage</a></li>
		<li><a href="#listcolorinfo">ListColorInfo</a></li>
		<li><a href="#querycolordatabase">QueryColorDatabase</a></li>
		<li><a href="#querycolorname">QueryColorname</a></li>
	</ul>

</ul>
<!-- INDEX END -->

<hr />
<P>
</P>
<h1><a name="name">NAME</a></h1>
<P>color - Color related functions</P>
<P>
</P>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<P>HistogramColorPacket * <strong>GetColorHistogram</strong>( const Image *, unsigned long *colors, ExceptionInfo *);</P>
<P>ColorInfo **  <strong>GetColorInfoArray</strong>( ExceptionInfo *exception );</P>
<P>unsigned long  <strong>GetNumberColors</strong>( const Image *image, FILE *file, ExceptionInfo *exception );</P>
<P>unsigned int  <strong>IsGrayImage</strong>( const Image *image, ExceptionInfo *exception );</P>
<P>unsigned int  <strong>IsMonochromeImage</strong>( const Image *image, ExceptionInfo *exception );</P>
<P>unsigned int  <strong>IsOpaqueImage</strong>( const Image *image, ExceptionInfo *exception );</P>
<P>MagickBool  <strong>IsPaletteImage</strong>( const Image *image, ExceptionInfo *exception );</P>
<P>unsigned int  <strong>ListColorInfo</strong>( FILE *file, ExceptionInfo *exception );</P>
<P>unsigned int  <strong>QueryColorDatabase</strong>( const char *name, PixelPacket *color, ExceptionInfo *exception );</P>
<P>unsigned int  <strong>QueryColorname</strong>( const Image *image, const PixelPacket *color, const ComplianceType compliance, char *name, ExceptionInfo *exception );</P>
<P>
</P>
<hr />
<h1><a name="function_descriptions">FUNCTION DESCRIPTIONS</a></h1>
<P>
</P>
<h2><a name="getcolorinfoarray">GetColorInfoArray</a></h2>
<blockquote>GetColorInfoArray() returns a sorted null-terminated array of ColorInfo pointers corresponding to the available color definitions. This function should be used to access the entire list rather than GetColorInfo since the list returned by GetColorInfo may be re-ordered every time it is invoked. GetColorList may be used if only a list of color names is desired. The array should be deallocated by the user once it is no longer needed. Do not attempt to deallocate members of the array. </blockquote><P>The format of the GetMagickList method is:</P>
<blockquote>ColorInfo **GetColorInfoArray ( <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_exception_3a">exception:</a></strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="getcolorhistogram">GetColorHistogram</a></h2>
<P>Method GetColorHistogram returns an array of HistogramColorPacket structures which specify the number of times each unique color occurs in the image.  The referenced colors parameter is updated with the number of unique colors in the image.  The returned array should be deallocated by the user once it is no longer ndded.</P>
<P>The format of the GetColorHistogram method is:</P>
<blockquote>HistogramColorPacket *GetColorHistogram ( const <A HREF="types.html#Image">Image</A> *, unsigned long *colors, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *); </blockquote><P>A description of each parameter follows.</P>
<dl>
<dt><strong><a name="item_o_image_3a">image:</a></strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong><a name="item_o_colors_3a">colors:</a></strong>

<DD>
<P>The referenced value is updated with the with the number of unique colors.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="getcolorlist">GetColorlist</a></h2>
<P>Method GetColorList returns any colors that match the specified pattern and color standard.</P>
<P>The format of the GetColorList function is:</P>
<pre>
    filelist=GetColorList(const char *pattern,unsigned long *number_colors)</pre>
<P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_filelist_3a">filelist:</a></strong>

<DD>
<P>Method GetColorList returns a list of colors that match the specified pattern and color standard.</P>
</dd>
</li>
<dt><strong><a name="item_o_pattern_3a">pattern:</a></strong>

<DD>
<P>Specifies a pointer to a text string containing a pattern.</P>
</dd>
</li>
<dt><strong><a name="item_o_number_colors_3a">number_colors:</a></strong>

<DD>
<P>This integer returns the number of colors in the list.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="getnumbercolors">GetNumberColors</a></h2>
<P>Method GetNumberColors returns the number of unique colors in an image.</P>
<P>The format of the GetNumberColors method is:</P>
<blockquote>unsigned long GetNumberColors ( const <A HREF="types.html#Image">Image</A> *image, FILE *file, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows.</P>
<dl>
<dt><strong>image:</strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong><a name="item_o_file_3a">file:</a></strong>

<DD>
<P>Write a histogram of the color distribution to this file handle.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="isgrayimage">IsGrayImage</a></h2>
<blockquote>IsGrayImage() returns True if all the pixels in the image have the same red, green, and blue intensities. </blockquote><P>The format of the IsGrayImage method is:</P>
<blockquote>unsigned int IsGrayImage ( const <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_status_3a">status:</a></strong>

<DD>
<P>Method IsGrayImage returns True if the image is grayscale otherwise False is returned.</P>
</dd>
</li>
<dt><strong>image:</strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="ismonochromeimage">IsMonochromeImage</a></h2>
<blockquote>IsMonochromeImage() returns True if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or MaxRGB. </blockquote><P>The format of the IsMonochromeImage method is:</P>
<blockquote>unsigned int IsMonochromeImage ( const <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="isopaqueimage">IsOpaqueImage</a></h2>
<blockquote>IsOpaqueImage() returns True if none of the pixels in the image have an opacity value other than opaque ( 0 ) . </blockquote><P>The format of the IsOpaqueImage method is:</P>
<blockquote>unsigned int IsOpaqueImage ( const <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>status:</strong>

<DD>
<P>Method IsOpaqueImage returns False if the image has one or more pixels that are transparent otherwise True is returned.</P>
</dd>
</li>
<dt><strong>image:</strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="ispaletteimage">IsPaletteImage</a></h2>
<P>Method IsPaletteImage returns True if the image is PseudoClass and has 256 unique colors or less.</P>
<P>The format of the IsPaletteImage method is:</P>
<blockquote>MagickBool IsPaletteImage ( const <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows.</P>
<dl>
<dt><strong>status:</strong>

<DD>
<P>Method IsPaletteImage returns True is the image is PseudoClass or has 256 color or less.</P>
</dd>
</li>
<dt><strong>image:</strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="listcolorinfo">ListColorInfo</a></h2>
<blockquote>ListColorInfo() lists color names to the specified file. Color names are a convenience. Rather than defining a color by its red, green, and blue intensities just use a color name such as white, blue, or yellow. </blockquote><P>The format of the ListColorInfo method is:</P>
<blockquote>unsigned int ListColorInfo ( FILE *file, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows.</P>
<dl>
<dt><strong>file:</strong>

<DD>
<P>List color names to this file handle.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="querycolordatabase">QueryColorDatabase</a></h2>
<blockquote>QueryColorDatabase() returns the red, green, blue, and opacity intensities for a given color name. </blockquote><P>The format of the QueryColorDatabase method is:</P>
<blockquote>unsigned int QueryColorDatabase ( const char *name, <A HREF="types.html#PixelPacket">PixelPacket</A> *color, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_name_3a">name:</a></strong>

<DD>
<P>The color name (e.g.  white, blue, yellow).</P>
</dd>
</li>
<dt><strong><a name="item_o_color_3a">color:</a></strong>

<DD>
<P>The red, green, blue, and opacity intensities values of the named color in this structure.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</li>
</dl>
<P>
</P>
<h2><a name="querycolorname">QueryColorname</a></h2>
<blockquote>QueryColorname() returns a named color for the given color intensity. If an exact match is not found, a hex value is return instead. For example an intensity of rgb: ( 0, 0, 0 ) returns black whereas rgb: ( 223, 223, 223 ) returns #dfdfdf. </blockquote><P>The format of the QueryColorname method is:</P>
<blockquote>unsigned int QueryColorname ( const <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#PixelPacket">PixelPacket</A> *color, const <A HREF="types.html#ComplianceType">ComplianceType</A> compliance, char *name, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows.</P>
<dl>
<dt><strong>image:</strong>

<DD>
<P>The image.</P>
</dd>
</li>
<dt><strong>color:</strong>

<DD>
<P>The color intensities.</P>
</dd>
</li>
<dt><strong><a name="item_o_compliance_3a">Compliance:</a></strong>

<DD>
<P>Adhere to this color standard: SVG, X11, or XPM.</P>
</dd>
</li>
<dt><strong>name:</strong>

<DD>
<P>Return the color name or hex value.</P>
</dd>
</li>
<dt><strong>exception:</strong>

<DD>
<P>Return any errors or warnings in this structure.</P>
</dd>
</dl>

</body>

</html>