The following types of color channels are currently supported by ImageGear for reading, writing, and display:
Alpha Channel
An Alpha channel defines opacity/transparency of an image. Only one Alpha channel per image can exist. Color space with Alpha channel can be pre-multiplied or non-pre-multiplied. This is the common definition of an Alpha channel, used by most file formats, such as TIFF, PNG, etc.
Extra Channel
An Extra channel is any channel besides regular color channels or Alpha. There can be any number of Extra channels per image. Extra channels may have some defined semantics, such as Mask or Spot channels, or can be "Unknown", meaning that ImageGear does not know how to display or process them.
- A Mask channel specifies a mask or selection in the image. There can be any number of mask channels per image. Images are never pre-multiplied by mask channels.
- A Spot channel uses a specific color. The color can be specified using a standard color space, such as RGB or CMYK, or using a custom color, such as Pantone, TRUMATCH, etc. The custom spot color is defined by its Vendor ID and Color ID. See "Spot Channel Vendor IDs", below.
- An Unknown channel is an extra channel whose purpose is unknown to ImageGear.
These channels can be mixed in arbitrary order. ImageGear does not use separate bit masks from ImGearColorSpaceIDs Enumeration for Mask and Spot channels. Instead, it uses ImGearColorSpaceIDs Enumeration.Extra bit mask to specify presence of any of these channels in an image.
ImageGear stores an array of ImGearExtraChannelInfo Classes in ImGearDIB Class. The length of this array must always be equal to the number of extra channels in the DIB. DIB constructors, color space and channel manipulation functions must ensure this.
If an entry of the info array is ImGearSpotChannelInfo Class, then the corresponding Extra channel is a Spot channel. ImGearSpotChannelInfo Class contains information that is necessary for displaying the spot channel. ImageGear uses spot color channels for display and color space conversions, and saves them to output files when supported by the format. If the output format does not allow storing additional channels, ImageGear converts Spot channels, together with regular color channels, to the destination color space.
If an entry of the info array is ImGearMaskColorChannelInfo or ImGearMaskSpotChannelInfo then the corresponding Extra channel is a Mask channel. ImageGear uses Mask channels for display and saves them to output files when supported by format. However, it does not use them in color space conversions. If the output format does not allow storing additional channels, ImageGear ignores Mask channels in conversion to the destination color space.
If an entry is ImGearExtraChannelInfo Class, then the corresponding Extra channel is unknown. It is not used in display and color conversions, but preserved and saved to output files when possible.
Spot color, Mask, and Extra channels can be appended after any regular color channels, in any order, including color spaces that contain Alpha or Pre-multiplied Alpha channel.
ImageGear can load extra channels from TIFF file formats. The extra channels are internally stored as specified above and saved back as extra channels when the output format is either TIFF or PSD. Spot color support is added to the raster color conversion mechanism, so when saving an image to a format that does not support extra channels, the image spot channels are blended to the base channels. The alpha channels are skipped in this case.
Spot Channel Vendor IDs
- 3000 (ANPA)
- 3001 (Focoltone)
- 3002 (PantoneCoated)
- 3003 (PantoneProcess)
- 3004 (PantoneProSlim)
- 3005 (PantoneUncoated)
- 3006 (Toyo)
- 3007 (Trumatch)
- 3008 (HKSE)
- 3009 (HKSK)
- 3010 (HKSN)
- 3011 (HKSZ)
- 3012 (DIC)
- 3013 (PantoneMatte)
- 3020 (PantonePastelCoated)
- 3021 (PantonePastelUncoated)
- 3022 (PantoneMetallic)
- 3024 (HKSEProcess)
- 3025 (HKSKProcess)
- 3026 (HKSNProcess)
- 3027 (HKSZProcess)
- 3028 (PantoneProSlimEuro)
- 3029 (PantoneProcessUncoated)
ImageGear can load Adobe Color Books and apply the loaded colors for displaying spot channels. Color books API allows specifying a path to the color books, enumerates loaded books and colors within a book, and retrieves info on the specific spot color. Display and processing code uses color books to convert spot colors to regular colors such as CMYK, RGB, etc.