cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 3 | <head> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 4 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta> |
| 5 | <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"></meta> |
cristy | ffb69ed | 2010-12-25 00:06:48 +0000 | [diff] [blame] | 6 | <title>ImageMagick: MagickCore, C API for ImageMagick: Count the Colors in an Image</title> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 7 | <meta http-equiv="content-language" content="en-US"></meta> |
| 8 | <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta> |
| 9 | <meta http-equiv="reply-to" content="magick-users@imagemagick.org"></meta> |
| 10 | <meta name="application-name" content="ImageMagick"></meta> |
| 11 | <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition, resize, rotate, shear, distort or transform images automagically."></meta> |
| 12 | <meta name="application-url" content="http://www.imagemagick.org"></meta> |
| 13 | <meta name="generator" content="PHP"></meta> |
| 14 | <meta name="keywords" content="magickcore, c, api, for, imagemagick:, count, the, colors, in, an, image, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"></meta> |
| 15 | <meta name="rating" content="GENERAL"></meta> |
| 16 | <meta name="robots" content="INDEX, FOLLOW"></meta> |
| 17 | <meta name="generator" content="ImageMagick Studio LLC"></meta> |
| 18 | <meta name="author" content="ImageMagick Studio LLC"></meta> |
| 19 | <meta name="revisit-after" content="2 DAYS"></meta> |
| 20 | <meta name="resource-type" content="document"></meta> |
| 21 | <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"></meta> |
| 22 | <meta name="distribution" content="Global"></meta> |
| 23 | <link rel="icon" href="../../images/wand.png"></link> |
| 24 | <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon"></link> |
| 25 | <link rel="canonical" href="../../index.html"></link> |
| 26 | <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"></link> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 27 | |
| 28 | <!-- Add jQuery library --> |
| 29 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> |
| 30 | |
| 31 | <!-- Add mousewheel plugin (this is optional) --> |
| 32 | <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script> |
| 33 | |
| 34 | <!-- Add fancyBox --> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 35 | <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen"></link> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 36 | <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script> |
| 37 | |
| 38 | <!-- Optionally add helpers - button, thumbnail and/or media --> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 39 | <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" type="text/css" media="screen"></link> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 40 | <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script> |
| 41 | <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script> |
| 42 | |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 43 | <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.6" type="text/css" media="screen"></link> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 44 | <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.6"></script> |
| 45 | |
cristy | 72da67d | 2013-02-24 21:40:48 +0000 | [diff] [blame] | 46 | <script type="text/javascript"> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 47 | $(document).ready(function() { |
| 48 | $(".fancybox").fancybox(); |
| 49 | }); |
cristy | 72da67d | 2013-02-24 21:40:48 +0000 | [diff] [blame] | 50 | </script> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 51 | |
| 52 | <!-- ImageMagick style --> |
| 53 | <style type="text/css" media="all"> |
| 54 | @import url("../../www/magick.css"); |
| 55 | </style> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 56 | </head> |
| 57 | |
| 58 | <body id="www-imagemagick-org"> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 59 | |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 60 | |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 61 | |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 62 | <div class="titlebar"> |
| 63 | <div style="margin: 17px auto; float: left;"> |
| 64 | <script type="text/javascript"> |
| 65 | <!-- |
| 66 | google_ad_client = "pub-3129977114552745"; |
| 67 | google_ad_slot = "5439289906"; |
| 68 | google_ad_width = 728; |
| 69 | google_ad_height = 90; |
| 70 | //--> |
| 71 | </script> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 72 | |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 73 | </div> |
cristy | 417eeb1 | 2013-07-28 18:48:22 +0000 | [diff] [blame] | 74 | <a href="../../discourse-server"> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 75 | <img src="../../images/logo.jpg" alt="ImageMagick Logo" style="width: 123px; height: 118px; border: 0px; float: right;"></img></a> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 76 | <a href="../../index.html"> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 77 | <img src="../../images/sprite.jpg" alt="ImageMagick Sprite" style="width: 114px; height: 118px; border: 0px; float: right;"></img></a> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 78 | </div> |
| 79 | |
| 80 | <div class="westbar"> |
| 81 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 82 | <div class="menu"> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 83 | <a title="About ImageMagick" href="../../index.html">About ImageMagick</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 84 | </div> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 85 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 86 | <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 87 | </div> |
| 88 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 89 | <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 90 | </div> |
| 91 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 92 | <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 93 | </div> |
| 94 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 95 | <a title="Binary Release: iOS" href="../../www/binary-releases.html#iOS">iOS</a> |
cristy | da16f16 | 2011-02-19 23:52:17 +0000 | [diff] [blame] | 96 | </div> |
| 97 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 98 | <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 99 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 100 | <div class="sep"></div> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 101 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 102 | <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 103 | </div> |
| 104 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 105 | <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 106 | </div> |
| 107 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 108 | <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 109 | </div> |
| 110 | <div class="sub"> |
cristy | 83a272e | 2010-05-07 20:40:35 +0000 | [diff] [blame] | 111 | <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 112 | </div> |
| 113 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 114 | <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 115 | </div> |
| 116 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 117 | <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 118 | </div> |
| 119 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 120 | <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 121 | </div> |
| 122 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 123 | <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 124 | </div> |
| 125 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 126 | <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 127 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 128 | <div class="sep"></div> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 129 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 130 | <a title="Install from Source" href="../../www/install-source.html">Install from Source</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 131 | </div> |
| 132 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 133 | <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 134 | </div> |
| 135 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 136 | <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 137 | </div> |
| 138 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 139 | <a title="Resources" href="../../www/resources.html">Resources</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 140 | </div> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 141 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 142 | <a title="Architecture" href="../../www/architecture.html">Architecture</a> |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 143 | </div> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 144 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 145 | <a title="Download" href="../../www/download.html">Download</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 146 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 147 | <div class="sep"></div> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 148 | <div class="menu"> |
cristy | 3dfa219 | 2013-02-24 22:46:05 +0000 | [diff] [blame] | 149 | <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 150 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 151 | <div class="sep"></div> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 152 | <div class="menu"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 153 | <a title="Site Map" href="../../www/sitemap.html">Site Map</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 154 | </div> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 155 | <div class="sub"> |
cristy | d8833bf | 2013-02-24 22:14:53 +0000 | [diff] [blame] | 156 | <a title="Site Map: Links" href="../../www/links.html">Links</a> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 157 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 158 | <div class="sep"></div> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 159 | <div class="menu"> |
| 160 | <a title="Support ImageMagick Development" href="../../www/support.html">Support ImageMagick Development</a> |
cristy | ce69bb0 | 2010-07-27 19:49:46 +0000 | [diff] [blame] | 161 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 162 | </div> |
| 163 | |
| 164 | <div class="eastbar"> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 165 | |
cristy | 417eeb1 | 2013-07-28 18:48:22 +0000 | [diff] [blame] | 166 | <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../../index.html"></a></div> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 167 | <noscript> |
| 168 | <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank"> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 169 | <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0"></img></a> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 170 | </noscript> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 171 | |
| 172 | |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 173 | </div> |
| 174 | |
| 175 | <div class="main"> |
| 176 | |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 177 | <h1>Module color Methods</h1> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 178 | <p class="navigation-index">[<a href="color.html#GetColorInfoList">GetColorInfoList</a> • <a href="color.html#GetColorList">GetColorList</a> • <a href="color.html#ListColorInfo">ListColorInfo</a> • <a href="color.html#LoadColorList">LoadColorList</a> • <a href="color.html#QueryColorCompliance">QueryColorCompliance</a> • <a href="color.html#QueryColorDatabase">QueryColorDatabase</a> • <a href="color.html#QueryColorname">QueryColorname</a> • <a href="color.html#QueryMagickColorCompliance">QueryMagickColorCompliance</a> • <a href="color.html#QueryMagickColor">QueryMagickColor</a> • <a href="color.html#QueryMagickColorname">QueryMagickColorname</a>]</p> |
cristy | 6f77f69 | 2011-02-15 15:31:39 +0000 | [diff] [blame] | 179 | |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 180 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="GetColorInfoList">GetColorInfoList</a></h2> |
| 181 | <div class="doc-section"> |
| 182 | |
| 183 | <p>GetColorInfoList() returns any colors that match the specified pattern.</p> |
| 184 | |
| 185 | <p>The format of the GetColorInfoList function is:</p> |
| 186 | |
| 187 | <pre class="text"> |
| 188 | const ColorInfo **GetColorInfoList(const char *pattern, |
| 189 | size_t *number_colors,ExceptionInfo *exception) |
| 190 | </pre> |
| 191 | |
| 192 | <p>A description of each parameter follows:</p> |
| 193 | |
| 194 | <h5>pattern</h5> |
| 195 | <p>Specifies a pointer to a text string containing a pattern.</p> |
| 196 | |
| 197 | <h5>number_colors</h5> |
| 198 | <p>This integer returns the number of colors in the list.</p> |
| 199 | |
| 200 | <h5>exception</h5> |
| 201 | <p>return any errors or warnings in this structure.</p> |
| 202 | |
| 203 | </div> |
| 204 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="GetColorList">GetColorList</a></h2> |
| 205 | <div class="doc-section"> |
| 206 | |
| 207 | <p>GetColorList() returns any colors that match the specified pattern.</p> |
| 208 | |
| 209 | <p>The format of the GetColorList function is:</p> |
| 210 | |
| 211 | <pre class="text"> |
| 212 | char **GetColorList(const char *pattern,size_t *number_colors, |
| 213 | ExceptionInfo *exception) |
| 214 | </pre> |
| 215 | |
| 216 | <p>A description of each parameter follows:</p> |
| 217 | |
| 218 | <h5>pattern</h5> |
| 219 | <p>Specifies a pointer to a text string containing a pattern.</p> |
| 220 | |
| 221 | <h5>number_colors</h5> |
| 222 | <p>This integer returns the number of colors in the list.</p> |
| 223 | |
| 224 | <h5>exception</h5> |
| 225 | <p>return any errors or warnings in this structure.</p> |
| 226 | |
| 227 | </div> |
| 228 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="ListColorInfo">ListColorInfo</a></h2> |
| 229 | <div class="doc-section"> |
| 230 | |
| 231 | <p>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.</p> |
| 232 | |
| 233 | <p>The format of the ListColorInfo method is:</p> |
| 234 | |
| 235 | <pre class="code"> |
| 236 | MagickBooleanType ListColorInfo(FILE *file,ExceptionInfo *exception) |
| 237 | </pre> |
| 238 | |
| 239 | <p>A description of each parameter follows.</p> |
| 240 | |
| 241 | <h5>file</h5> |
| 242 | <p>List color names to this file handle.</p> |
| 243 | |
| 244 | <h5>exception</h5> |
| 245 | <p>return any errors or warnings in this structure.</p> |
| 246 | |
| 247 | </div> |
| 248 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="LoadColorList">LoadColorList</a></h2> |
| 249 | <div class="doc-section"> |
| 250 | |
| 251 | <p>LoadColorList() loads one or more color configuration file which provides a mapping between color attributes and a color name.</p> |
| 252 | |
| 253 | <p>The format of the LoadColorLists method is:</p> |
| 254 | |
| 255 | <pre class="code"> |
| 256 | MagickBooleanType LoadColorLists(const char *filename, |
| 257 | ExceptionInfo *exception) |
| 258 | </pre> |
| 259 | |
| 260 | <p>A description of each parameter follows:</p> |
| 261 | |
| 262 | <h5>filename</h5> |
| 263 | <p>the font file name.</p> |
| 264 | |
| 265 | <h5>exception</h5> |
| 266 | <p>return any errors or warnings in this structure.</p> |
| 267 | |
| 268 | </div> |
cristy | eed6cb6 | 2012-01-28 19:38:34 +0000 | [diff] [blame] | 269 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="QueryColorCompliance">QueryColorCompliance</a></h2> |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 270 | <div class="doc-section"> |
| 271 | |
cristy | eed6cb6 | 2012-01-28 19:38:34 +0000 | [diff] [blame] | 272 | <p>QueryColorCompliance() returns the red, green, blue, and opacity intensities for a given color name.</p> |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 273 | |
cristy | eed6cb6 | 2012-01-28 19:38:34 +0000 | [diff] [blame] | 274 | <p>The format of the QueryColorCompliance method is:</p> |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 275 | |
| 276 | <pre class="code"> |
cristy | eed6cb6 | 2012-01-28 19:38:34 +0000 | [diff] [blame] | 277 | MagickBooleanType QueryColorCompliance(const char *name, |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 278 | const ComplianceType compliance,PixelPacket *color, |
| 279 | ExceptionInfo *exception) |
| 280 | </pre> |
| 281 | |
| 282 | <p>A description of each parameter follows:</p> |
| 283 | |
| 284 | <h5>name</h5> |
| 285 | <p>the color name (e.g. white, blue, yellow).</p> |
| 286 | |
| 287 | <h5>compliance</h5> |
| 288 | <p>Adhere to this color standard: SVG, X11, or XPM.</p> |
| 289 | |
| 290 | <h5>color</h5> |
| 291 | <p>the red, green, blue, and opacity intensities values of the named color in this structure.</p> |
| 292 | |
| 293 | <h5>exception</h5> |
| 294 | <p>return any errors or warnings in this structure.</p> |
| 295 | |
| 296 | </div> |
| 297 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="QueryColorDatabase">QueryColorDatabase</a></h2> |
| 298 | <div class="doc-section"> |
| 299 | |
| 300 | <p>QueryColorDatabase() returns the red, green, blue, and opacity intensities for a given color name.</p> |
| 301 | |
| 302 | <p>The format of the QueryColorDatabase method is:</p> |
| 303 | |
| 304 | <pre class="code"> |
| 305 | MagickBooleanType QueryColorDatabase(const char *name,PixelPacket *color, |
| 306 | ExceptionInfo *exception) |
| 307 | </pre> |
| 308 | |
| 309 | <p>A description of each parameter follows:</p> |
| 310 | |
| 311 | <h5>name</h5> |
| 312 | <p>the color name (e.g. white, blue, yellow).</p> |
| 313 | |
| 314 | <h5>color</h5> |
| 315 | <p>the red, green, blue, and opacity intensities values of the named color in this structure.</p> |
| 316 | |
| 317 | <h5>exception</h5> |
| 318 | <p>return any errors or warnings in this structure.</p> |
| 319 | |
| 320 | </div> |
| 321 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="QueryColorname">QueryColorname</a></h2> |
| 322 | <div class="doc-section"> |
| 323 | |
| 324 | <p>QueryColorname() returns a named color for the given color intensity. If an exact match is not found, a rgb() color is returned instead.</p> |
| 325 | |
| 326 | <p>The format of the QueryColorname method is:</p> |
| 327 | |
| 328 | <pre class="code"> |
| 329 | MagickBooleanType QueryColorname(const Image *image, |
| 330 | const PixelPacket *color,const ComplianceType compliance,char *name, |
| 331 | ExceptionInfo *exception) |
| 332 | </pre> |
| 333 | |
| 334 | <p>A description of each parameter follows.</p> |
| 335 | |
| 336 | <h5>image</h5> |
| 337 | <p>the image.</p> |
| 338 | |
| 339 | <h5>color</h5> |
| 340 | <p>the color intensities.</p> |
| 341 | |
| 342 | <h5>compliance</h5> |
| 343 | <p>Adhere to this color standard: SVG, X11, or XPM.</p> |
| 344 | |
| 345 | <h5>name</h5> |
| 346 | <p>Return the color name or hex value.</p> |
| 347 | |
| 348 | <h5>exception</h5> |
| 349 | <p>return any errors or warnings in this structure.</p> |
| 350 | |
| 351 | </div> |
| 352 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="QueryMagickColorCompliance">QueryMagickColorCompliance</a></h2> |
| 353 | <div class="doc-section"> |
| 354 | |
| 355 | <p>QueryMagickColorCompliance() returns the red, green, blue, and opacity intensities for a given color name and standards compliance.</p> |
| 356 | |
| 357 | <p>The format of the QueryMagickColor method is:</p> |
| 358 | |
| 359 | <pre class="code"> |
cristy | eed6cb6 | 2012-01-28 19:38:34 +0000 | [diff] [blame] | 360 | MagickBooleanType QueryMagickColorCompilence(const char *name, |
cristy | 2039843 | 2011-08-11 01:31:50 +0000 | [diff] [blame] | 361 | const ComplianceType compliance,MagickPixelPacket *color, |
| 362 | ExceptionInfo *exception) |
| 363 | </pre> |
| 364 | |
| 365 | <p>A description of each parameter follows:</p> |
| 366 | |
| 367 | <h5>name</h5> |
| 368 | <p>the color name (e.g. white, blue, yellow).</p> |
| 369 | |
| 370 | <h5>compliance</h5> |
| 371 | <p>Adhere to this color standard: SVG, X11, or XPM.</p> |
| 372 | |
| 373 | <h5>color</h5> |
| 374 | <p>the red, green, blue, and opacity intensities values of the named color in this structure.</p> |
| 375 | |
| 376 | <h5>exception</h5> |
| 377 | <p>return any errors or warnings in this structure.</p> |
| 378 | |
| 379 | </div> |
| 380 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="QueryMagickColor">QueryMagickColor</a></h2> |
| 381 | <div class="doc-section"> |
| 382 | |
| 383 | <p>QueryMagickColor() returns the red, green, blue, and opacity intensities for a given color name.</p> |
| 384 | |
| 385 | <p>The format of the QueryMagickColor method is:</p> |
| 386 | |
| 387 | <pre class="code"> |
| 388 | MagickBooleanType QueryMagickColor(const char *name, |
| 389 | MagickPixelPacket *color,ExceptionInfo *exception) |
| 390 | </pre> |
| 391 | |
| 392 | <p>A description of each parameter follows:</p> |
| 393 | |
| 394 | <h5>name</h5> |
| 395 | <p>the color name (e.g. white, blue, yellow).</p> |
| 396 | |
| 397 | <h5>color</h5> |
| 398 | <p>the red, green, blue, and opacity intensities values of the named color in this structure.</p> |
| 399 | |
| 400 | <h5>exception</h5> |
| 401 | <p>return any errors or warnings in this structure.</p> |
| 402 | |
| 403 | </div> |
| 404 | <h2><a href="http://www.imagemagick.org/api/MagickCore/color_8c.html" id="QueryMagickColorname">QueryMagickColorname</a></h2> |
| 405 | <div class="doc-section"> |
| 406 | |
| 407 | <p>QueryMagickColorname() returns a named color for the given color intensity. If an exact match is not found, a hex value is returned instead. For example an intensity of rgb:(0,0,0) returns black whereas rgb:(223,223,223) returns #dfdfdf.</p> |
| 408 | |
| 409 | <p>The format of the QueryMagickColorname method is:</p> |
| 410 | |
| 411 | <pre class="code"> |
| 412 | MagickBooleanType QueryMagickColorname(const Image *image, |
| 413 | const PixelPacket *color,const ComplianceType compliance,char *name, |
| 414 | ExceptionInfo *exception) |
| 415 | </pre> |
| 416 | |
| 417 | <p>A description of each parameter follows.</p> |
| 418 | |
| 419 | <h5>image</h5> |
| 420 | <p>the image.</p> |
| 421 | |
| 422 | <h5>color</h5> |
| 423 | <p>the color intensities.</p> |
| 424 | |
| 425 | <h5>Compliance</h5> |
| 426 | <p>Adhere to this color standard: SVG, X11, or XPM.</p> |
| 427 | |
| 428 | <h5>name</h5> |
| 429 | <p>Return the color name or hex value.</p> |
| 430 | |
| 431 | <h5>exception</h5> |
| 432 | <p>return any errors or warnings in this structure.</p> |
| 433 | |
| 434 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 435 | |
| 436 | </div> |
| 437 | |
| 438 | <div id="linkbar"> |
cristy | ac1b432 | 2013-07-28 13:58:06 +0000 | [diff] [blame] | 439 | <span id="linkbar-west"> </span> |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 440 | |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 441 | <span id="linkbar-center"> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 442 | <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • |
| 443 | <a href="../../discourse-server">Discourse Server</a> • |
| 444 | <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> • |
cristy | 8ee7f24 | 2013-06-20 16:08:44 +0000 | [diff] [blame] | 445 | <a href="http://jqmagick.imagemagick.org/">JqMagick</a> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 446 | </span> |
cristy | ac1b432 | 2013-07-28 13:58:06 +0000 | [diff] [blame] | 447 | <span id="linkbar-east"> </span> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame^] | 448 | </div> |
| 449 | <div class="footer"> |
| 450 | <span id="footer-west">© 1999-2013 ImageMagick Studio LLC</span> |
| 451 | <span id="footer-east"> <a href="../../www/contact.html">Contact the Wizards</a></span> |
| 452 | </div> |
| 453 | <div style="clear: both; margin: 0; width: 100%; "></div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 454 | </body> |
| 455 | </html> |