home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>2.4.  Colormap Dialog</title>
- <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
- <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
- <link rel="stylesheet" href="gimp-help-custom.css" type="text/css" />
- <link rel="alternate stylesheet" href="gimp22.css" type="text/css" title="gimp22" />
- <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
- <link rel="start" href="index.html" title="GNU Image Manipulation Program" />
- <link rel="up" href="gimp-dialogs-structure.html" title="2.  Image Structure Related Dialogs" />
- <link rel="prev" href="gimp-path-dialog.html" title="2.3.  Path Dialog" />
- <link rel="next" href="gimp-histogram-dialog.html" title="2.5.  Histogram dialog" />
- </head>
- <body>
- <div class="navheader">
- <table width="100%" summary="Navigation header">
- <tr>
- <th colspan="3" align="center">2.4. 
- <span lang="en" xml:lang="en">Colormap Dialog</span>
- </th>
- </tr>
- <tr>
- <td width="20%" align="left"><a accesskey="p" href="gimp-path-dialog.html"><img src="../images/prev.png" alt="Prev" /></a> </td>
- <th width="60%" align="center">2. 
- <span lang="en" xml:lang="en">Image Structure Related Dialogs</span>
- </th>
- <td width="20%" align="right"> <a accesskey="n" href="gimp-histogram-dialog.html"><img src="../images/next.png" alt="Next" /></a></td>
- </tr>
- </table>
- <hr />
- </div>
- <div class="sect2" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h3 class="title"><a id="gimp-indexed-palette-dialog"></a>2.4. 
- <span lang="en" xml:lang="en">Colormap Dialog</span>
- </h3>
- </div>
- <div>
- <div class="revhistory">
- <table border="1" width="100%" summary="Revision history">
- <tr>
- <th align="left" valign="top" colspan="3">
- <b>Revision History</b>
- </th>
- </tr>
- <tr>
- <td align="left">Revision $Revision: 2419 $</td>
- <td align="left">2006-09-29</td>
- <td align="left">scb</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <a id="id2658187" class="indexterm"></a>
- <a id="id2658201" class="indexterm"></a>
- <div class="figure">
- <a id="id2658210"></a>
- <p class="title">
- <b>Figure 14.14. 
- <span lang="en" xml:lang="en">
- An indexed image with 6 colors and its Colormap dialog
- </span>
- </b>
- </p>
- <div class="figure-contents">
- <div class="mediaobject">
- <img src="../images/dialogs/examples/cosmos-6.png" alt="An indexed image with 6 colors and its Colormap dialog" />
- </div>
- <div class="mediaobject">
- <img src="../images/dialogs/colormap-dialog.png" alt="An indexed image with 6 colors and its Colormap dialog" />
- </div>
- </div>
- </div>
- <br class="figure-break" />
- <p>
- The Colormap (Indexed Palette is a better name) dialog allows you to edit
- the colormap of an indexed image. (If the mode of the active image is RGB
- or Grayscale instead of Indexed, the dialog is empty and unusable.) This
- is a dockable dialog; see the section on
- <a class="link" href="gimp-concepts-docks.html" title="2.3.  Dialogs and Docking">Dialogs and Docking</a>
- for help on manipulating it. It can be activated in two ways:
- </p>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="gimp-indexed-palette-dialog-activate"></a>2.4.1. 
- <span lang="en" xml:lang="en">Activate dialog</span>
- </h4>
- </div>
- </div>
- </div>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- From the Toolbox menu:
- <span class="guimenu">File</span> ‚Üí <span class="guisubmenu">Dialogs</span> ‚Üí <span class="guimenuitem">Colormap</span>
- </p>
- </li>
- <li>
- <p>
- From the image menu:
- <span class="guimenu">Dialogs</span> ‚Üí <span class="guimenuitem">Colormap</span>
- </p>
- </li>
- </ul>
- </div>
- </div>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="gimp-indexed-palette-dialog-colormaps"></a>2.4.2. 
- <span lang="en" xml:lang="en">Colormaps and Indexed Images</span>
- </h4>
- </div>
- </div>
- </div>
- <p>
- In an Indexed image, colors are assigned to pixels by an indirect
- method, using a look-up table called a <span class="emphasis"><em>colormap</em></span>.
- In GIMP, the maximum number of entries in a colormap is 256. For a
- maximum-sized colormap, each index from 0 to 255 is assigned an
- arbitrary RGB color. There are no rules restricting the colors that can
- be assigned to an index or the order they appear in: any index can be
- assigned any color.
- </p>
- <p>
- In an Indexed image, instead of being assigned a color directly (as
- happens in RGB and Grayscale images), each pixel is assigned an index.
- To determine the color that should be shown for that pixel, GIMP looks
- up the index in the image's colormap. Each indexed image has its own
- private colormap.
- </p>
- <p>
- It is important to realize that the colors in the colormap are the
- <span class="emphasis"><em>only colors available</em></span>
- for an indexed image (that is, unless you add new colors to the
- colormap). This has a major effect on many GIMP operations: for example,
- in a pattern fill, GIMP will usually not be able to find exactly the
- right colors in the colormap, so it will approximate them by
- using the nearest color available.
- <sup>[<a id="id2658409" href="#ftn.id2658409" class="footnote">5</a>]</sup>
- If the colormap is too limited or poorly chosen, this can easily
- produce very poor image quality.
- </p>
- <p>
- The Colormap dialog allows you to alter the colormap for an image,
- either by creating new entries, or by changing the colors for the
- existing entries. If you change the color associated with a given index,
- you will see the changes reflected throughout the image, as a color
- shift for all pixels that are assigned that index. The entries are
- numbered with 0 in the upper left corner, 1 to its right, etc.
- </p>
- </div>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="gimp-indexed-palette-dialog-using"></a>2.4.3. 
- <span lang="en" xml:lang="en">Using the Colormap dialog</span>
- </h4>
- </div>
- </div>
- </div>
- <p>
- Here are the operations you can perform using this dialog:
- </p>
- <div class="variablelist">
- <dl>
- <dt>
- <span class="term">Click on a color entry</span>
- </dt>
- <dd>
- <p>
- This sets GIMP's foreground color to the color you click on, as
- shown in the Toolbox color area. As a result, this color will be
- used for the next painting operation you do.
- </p>
- </dd>
- <dt>
- <span class="term">Ctrl-click on a color entry</span>
- </dt>
- <dd>
- <p>
- This sets GIMP's background color to the color you Ctrl-click on,
- as shown in the Toolbox color area.
- </p>
- </dd>
- <dt>
- <span class="term">Double-click on a color entry</span>
- </dt>
- <dd>
- <p>
- This sets GIMP's foreground color to the color you click on, and
- also brings up a Color Editor that allows you to change that
- colormap entry to a new color.
- </p>
- </dd>
- <dt>
- <span class="term">Color index</span>
- </dt>
- <dd>
- <p>
- You can select a different colormap entry by typing its index
- here, or clicking the spinbutton to the right.
- </p>
- </dd>
- <dt>
- <span class="term">Hex triplet</span>
- </dt>
- <dd>
- <p>
- This area shows a hex-code representation (such as is used in
- HTML) for the color assigned to the currently selected colormap
- entry. You can edit the color here, instead of using a Color
- Editor, if you want to. See
- <a class="link" href="glossary.html#glossary-html-notation" title="HTML notation">HTML notation</a>
- </p>
- </dd>
- <dt>
- <span class="term">Edit color</span>
- </dt>
- <dd>
- <a id="gimp-indexed-palette-edit"></a>
- <p>
- This button (in the lower left corner of the dialog) brings up a
- Color Editor that allows you to change the color for the currently
- selected colormap entry. The effect is similar to double-clicking
- on the entry, except that it does not set GIMP's foreground color.
- </p>
- </dd>
- <dt>
- <span class="term">Add color</span>
- </dt>
- <dd>
- <a id="gimp-indexed-palette-add"></a>
- <p>
- This button (in the lower right corner of the dialog) allows you
- to add new colors to the colormap. If you click on the button, the
- current foreground color, as shown in the Toolbox, will be tacked
- on to the end of the colormap. If instead you hold down
- <span class="keycap"><strong>Ctrl</strong></span> and click, the background color from the
- Toolbox will be added. (If the colormap contains 256 entries, it
- is full, and trying to add more will have no effect.)
- </p>
- </dd>
- </dl>
- </div>
- <div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
- <table border="0" summary="Tip">
- <tr>
- <td rowspan="2" align="center" valign="top" width="25">
- <img alt="[Tip]" src="../images/tip.png" />
- </td>
- <th align="left">Tip</th>
- </tr>
- <tr>
- <td align="left" valign="top">
- <p>
- If you make a mistake, you can undo it by focusing the pointer in
- the image whose colormap you have changed, and then pressing
- <span class="keycap"><strong>Ctrl-Z</strong></span> or choosing
- <span class="guimenu">Edit</span> ‚Üí <span class="guimenuitem">Undo</span>
- in the image menu.
- </p>
- </td>
- </tr>
- </table>
- </div>
- <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
- <table border="0" summary="Note">
- <tr>
- <td rowspan="2" align="center" valign="top" width="25">
- <img alt="[Note]" src="../images/note.png" />
- </td>
- <th align="left">Note</th>
- </tr>
- <tr>
- <td align="left" valign="top">
- <p>
- This dialog provides the most commonly used methods for altering the
- colormap for an indexed image. The color tools, such as
- Brightness/Contrast, Hue/Saturation, etc, do not operate on indexed
- images. There are a few plug-ins that do so, including the
- "Normalize", "Color Enhance", and "Stretch Contrast" operations, and
- it is possible to create others as well.
- </p>
- </td>
- </tr>
- </table>
- </div>
- <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
- <table border="0" summary="Note">
- <tr>
- <td rowspan="2" align="center" valign="top" width="25">
- <img alt="[Note]" src="../images/note.png" />
- </td>
- <th align="left">Note</th>
- </tr>
- <tr>
- <td align="left" valign="top">
- <p>
- If you paint an indexed image with a color which is not in the
- Colormap, GIMP will use the most similar color of the Colormap.
- </p>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="gimp-indexed-palette-dialog-submenu"></a>2.4.4. 
- <span lang="en" xml:lang="en">The Colormap context menu</span>
- </h4>
- </div>
- </div>
- </div>
- <p>
- Right-clicking on a color in the Colormap selects this color and opens
- a pop-up submenu:
- </p>
- <div class="figure">
- <a id="id2658738"></a>
- <p class="title">
- <b>Figure 14.15. 
- <span lang="en" xml:lang="en">The Colormap context menu</span>
- </b>
- </p>
- <div class="figure-contents">
- <div class="mediaobject">
- <img src="../images/dialogs/colormap-contextmenu.png" alt="The Colormap context menu" />
- </div>
- </div>
- </div>
- <br class="figure-break" />
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- <span class="guilabel">Edit color</span>: This command opens a color
- selector which allows you to modify the color.
- </p>
- </li>
- <li>
- <p>
- <span class="guilabel">Add from FG</span>: This command replaces the
- selected color with the Foreground color of Toolbox. It is
- enabled only for custom palettes.
- </p>
- </li>
- <li>
- <p>
- <span class="guilabel">Add from BG</span>: This command replaces the
- selected color with the Background color of Toolbox. It is
- enabled only for custom palettes.
- </p>
- </li>
- <li>
- <p>
- <span class="guilabel">Rearrange Colormap</span>: This command opens a
- dialog which can be understood very intuitively and doesn't need to
- be explained more.
- </p>
- <div class="figure">
- <a id="id2658835"></a>
- <p class="title">
- <b>Figure 14.16. 
- <span lang="en" xml:lang="en">
- The “<span class="quote">Rearrange Colormap</span>” window and its sub-menu
- </span>
- </b>
- </p>
- <div class="figure-contents">
- <div class="mediaobject">
- <img src="../images/dialogs/colormap-reorg.png" alt="The Rearrange Colormap window and its sub-menu" />
- </div>
- </div>
- </div>
- <br class="figure-break" />
- </li>
- </ul>
- </div>
- </div>
- <div class="footnotes">
- <br />
- <hr width="100" align="left" />
- <div class="footnote">
- <p><sup>[<a id="ftn.id2658409" href="#id2658409" class="para">5</a>] </sup>
- This is sometimes referred to as
- <a class="link" href="glossary.html#glossary-quantization" title="Quantization">Quantization</a>, which
- is described in the Glossary.
- </p>
- </div>
- </div>
- </div>
- <div class="navfooter">
- <hr />
- <table width="100%" summary="Navigation footer">
- <tr>
- <td width="40%" align="left"><a accesskey="p" href="gimp-path-dialog.html"><img src="../images/prev.png" alt="Prev" /></a> </td>
- <td width="20%" align="center">
- <a accesskey="u" href="gimp-dialogs-structure.html">
- <img src="../images/up.png" alt="Up" />
- </a>
- </td>
- <td width="40%" align="right"> <a accesskey="n" href="gimp-histogram-dialog.html"><img src="../images/next.png" alt="Next" /></a></td>
- </tr>
- <tr>
- <td width="40%" align="left" valign="top"><a accesskey="p" href="gimp-path-dialog.html">2.3. 
- <span lang="en" xml:lang="en">Path Dialog</span>
- </a> </td>
- <td width="20%" align="center">
- <a accesskey="h" href="index.html">
- <img src="../images/home.png" alt="Home" />
- </a>
- </td>
- <td width="40%" align="right" valign="top"> <a accesskey="n" href="gimp-histogram-dialog.html">2.5. 
- <span lang="en" xml:lang="en">Histogram dialog</span>
- </a></td>
- </tr>
- </table>
- </div>
- </body>
- </html>
-