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 |
Get Perl Graphics Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.