setDeviceNChannelMask
Set or clear one channel in the DeviceN channel mask.
setDeviceNChannelMask([in] int channelIdx, [in] VARIANT_BOOL on)
This function sets one channel in the DeviceN channel mask to "on" or
"off". The
channelIdx
argument specifies the channel
number, and the on
argument is non-zero for "on" or zero
for "off".
The getDeviceNToRGBPicture
uses a mask that controls which color
channels are included in the conversion. Channels that are "on" are
included; channels that are "off" do not contribute to the output
pixels. The channels are the same as reported by
getDeviceNChannelName
. The mask only affects the output of
getDeviceNToRGBPicture
.
The DeviceN channel mask is automatically reset (all channels "on") on
each call to convertPageToDeviceNImage
,
convertPageToDeviceNImageWithAlpha
,
convertRegionToDeviceNImage
, or
convertRegionToDeviceNImageWithAlpha
.
VB:
rast.convertPageToDeviceNImage(page, dpi)
rast.resetDeviceNChannelMask()
nChannels = rast.getNumDeviceNChannels()
For i = 0 To nChannels-1
channelName = rast.getDeviceNChannelName(i)
If .... Then
rast.setDeviceNChannelMask(i, true)
Else
rast.setDeviceNChannelMask(i, false)
End If
Next i
pic = rast.getDeviceNToRGBPicture()
...
rast.clearDeviceNImage()