cristy | 29dc865 | 2015-05-12 16:26:21 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 2 | <html lang="en"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 3 | <head> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame^] | 4 | <title>ImageMagick: MagickCore, C API for ImageMagick: Colormap Methods</title> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 5 | <meta http-equiv="content-type" content="text/html; charset=utf-8"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 6 | <meta name="application-name" content="ImageMagick"> |
| 7 | <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."> |
| 8 | <meta name="application-url" content="http://www.imagemagick.org"> |
| 9 | <meta name="generator" content="PHP"> |
| 10 | <meta name="keywords" content="magickcore, c, api, for, imagemagick:, colormap, methods, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"> |
| 11 | <meta name="rating" content="GENERAL"> |
| 12 | <meta name="robots" content="INDEX, FOLLOW"> |
| 13 | <meta name="generator" content="ImageMagick Studio LLC"> |
| 14 | <meta name="author" content="ImageMagick Studio LLC"> |
| 15 | <meta name="revisit-after" content="2 DAYS"> |
| 16 | <meta name="resource-type" content="document"> |
cristy | 4e638cd | 2015-05-07 16:47:40 +0000 | [diff] [blame] | 17 | <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 18 | <meta name="distribution" content="Global"> |
| 19 | <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame^] | 20 | <link href="../images/wand.png" rel="icon"> |
| 21 | <link href="../images/wand.ico" type="images/x-icon" rel="shortcut icon"> |
| 22 | <link href="../css/magick.html" rel="stylesheet"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 23 | </head> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 24 | <body> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 25 | <div class="main"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 26 | <div class="magick-masthead"> |
| 27 | <div class="container"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame^] | 28 | <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> |
| 29 | <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3129977114552745" data-ad-slot="6345125851" data-ad-format="auto"></ins> |
| 30 | <script> |
| 31 | (adsbygoogle = window.adsbygoogle || []).push({}); |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 32 | </script> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 33 | <nav class="magick-nav"> |
cristy | 2f563d4 | 2015-05-06 23:36:51 +0000 | [diff] [blame] | 34 | <a class="magick-nav-item " href="../index.html">Home</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 35 | <a class="magick-nav-item " href="../binary-releases.html">Download</a> |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 36 | <a class="magick-nav-item " href="../command-line-tools.html">Tools</a> |
| 37 | <a class="magick-nav-item " href="../command-line-options.html">Options</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 38 | <a class="magick-nav-item " href="../resources.html">Resources</a> |
| 39 | <a class="magick-nav-item " href="api.html">Develop</a> |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 40 | <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a> |
cristy | a1890f0 | 2015-05-15 23:32:44 +0000 | [diff] [blame] | 41 | <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 42 | </nav> |
| 43 | </div> |
| 44 | </div> |
| 45 | <div class="container"> |
cristy | 4e638cd | 2015-05-07 16:47:40 +0000 | [diff] [blame] | 46 | <div class="magick-header"> |
cristy | 99513ee | 2015-06-21 00:00:03 +0000 | [diff] [blame] | 47 | <p class="text-center"><a href="colormap.html#AcquireImageColormap">AcquireImageColormap</a> • <a href="colormap.html#CycleColormap">CycleColormap</a></p> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 48 | |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 49 | <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/colormap_8c.html" id="AcquireImageColormap">AcquireImageColormap</a></h2> |
| 50 | |
| 51 | <p>AcquireImageColormap() allocates an image colormap and initializes it to a linear gray colorspace. If the image already has a colormap, it is replaced. AcquireImageColormap() returns MagickTrue if successful, otherwise MagickFalse if there is not enough memory.</p> |
| 52 | |
| 53 | <p>The format of the AcquireImageColormap method is:</p> |
| 54 | |
| 55 | <pre class="text"> |
| 56 | MagickBooleanType AcquireImageColormap(Image *image,const size_t colors, |
| 57 | ExceptionInfo *exception) |
| 58 | </pre> |
| 59 | |
| 60 | <p>A description of each parameter follows:</p> |
| 61 | |
| 62 | <dd> |
| 63 | </dd> |
| 64 | |
| 65 | <dd> </dd> |
| 66 | <dl class="dl-horizontal"> |
| 67 | <dt>image</dt> |
| 68 | <dd>the image. </dd> |
| 69 | |
| 70 | <dd> </dd> |
| 71 | <dt>colors</dt> |
| 72 | <dd>the number of colors in the image colormap. </dd> |
| 73 | |
| 74 | <dd> </dd> |
| 75 | <dt>exception</dt> |
| 76 | <dd>return any errors or warnings in this structure. </dd> |
| 77 | |
| 78 | <dd> </dd> |
| 79 | </dl> |
| 80 | <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/colormap_8c.html" id="CycleColormap">CycleColormap</a></h2> |
| 81 | |
| 82 | <p>CycleColormap() displaces an image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect.</p> |
| 83 | |
| 84 | <p>WARNING: this assumes an images colormap is in a well know and defined order. Currently Imagemagick has no way of setting that order.</p> |
| 85 | |
| 86 | <p>The format of the CycleColormapImage method is:</p> |
| 87 | |
| 88 | <pre class="text"> |
| 89 | MagickBooleanType CycleColormapImage(Image *image,const ssize_t displace, |
| 90 | ExceptionInfo *exception) |
| 91 | </pre> |
| 92 | |
| 93 | <p>A description of each parameter follows:</p> |
| 94 | |
| 95 | <dd> |
| 96 | </dd> |
| 97 | |
| 98 | <dd> </dd> |
| 99 | <dl class="dl-horizontal"> |
| 100 | <dt>image</dt> |
| 101 | <dd>the image. </dd> |
| 102 | |
| 103 | <dd> </dd> |
| 104 | <dt>displace</dt> |
| 105 | <dd> displace the colormap this amount. </dd> |
| 106 | |
| 107 | <dd> </dd> |
| 108 | <dt>exception</dt> |
| 109 | <dd>return any errors or warnings in this structure. </dd> |
| 110 | |
| 111 | <dd> </dd> |
| 112 | </dl> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 113 | </div> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 114 | <footer class="magick-footer"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame^] | 115 | <p><a href="../support.html">Donate</a> • |
| 116 | <a href="../sitemap.html">Sitemap</a> • |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 117 | <a href="../links.html">Related</a> • |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame^] | 118 | <a href="../architecture.html">Architecture</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 119 | </p> |
| 120 | <p><a href="colormap.html#">Back to top</a> • |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 121 | <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 122 | <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p> |
cristy | a1890f0 | 2015-05-15 23:32:44 +0000 | [diff] [blame] | 123 | <p><small>© 1999-2015 ImageMagick Studio LLC</small></p> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 124 | </footer> |
| 125 | </div><!-- /.container --> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 126 | |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 127 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame^] | 128 | <script src="http://nextgen.imagemagick.org/js/magick.html"></script> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame] | 129 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 130 | </body> |
cristy | 5a367e4 | 2015-05-05 12:39:18 +0000 | [diff] [blame] | 131 | </html> |