Color and Transparency
Of the color methods, the Quantize(
) and Map( ) functions
are the most immediately useful for adjusting the number of colors in
an image and synchronizing the color maps of different indexed images.
Use the Transparent( ) or MatteFloodfill( ) methods to add
transparency to an image with an alpha channel. (ImageMagick uses the
terms “matte” and “transparent” interchangeably.)
Certain of the attributes in Table 3-5 (the component primary
points and rendering_intent, for
example) are really advanced colorimetry options and are not generally
used unless you are working in the specialized area of color
profiling. See the International Color Consortium’s ICC Profile Format
Specification at http://www.color.org for more
information on color profiles and colorimetry.
Attribute | Read | Write | Description |
| Yes | Yes | Sets or returns the background color of an image. Remember that for a GIF multi-image sequence, every image is sized by default to the size of the largest image; the background color fills the remaining space. |
| Yes | Yes | The |
| Yes | Yes | Returns the
chromaticity blue primary point. This is a color management
option. Set the value with |
| Yes | No | A |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access