Hello,
I am using Graphics Mill version 4.
My problem is I need to clamp all the data in CMYK channels to either 0 or 100%. So I copy the channel bitmap data to another bitmap object, do a levels color reduction, then copy the bitmap data into the appropriate channel in the CMYK image.
Code:
Dim channelData As New Aurigma.GraphicsMill.BitMap
channelData = image.Channels(Aurigma.GraphicsMill.ColorChannel.Black)
channelData.ColorAdjustment.Levels( _
0.0, 1.0, 0.499999, 5.0, 0.500001, Aurigma.GraphicsMill.HistogramMode.Luminosity)
image.Channels(Aurigma.GraphicsMill.ColorChannel.Black) = channelData
channelData = image.Channels(Aurigma.GraphicsMill.ColorChannel.Yellow)
channelData.ColorAdjustment.Levels( _
0.0, 1.0, 0.499999, 5.0, 0.500001, Aurigma.GraphicsMill.HistogramMode.Luminosity)
image.Channels(Aurigma.GraphicsMill.ColorChannel.Yellow) = channelData
channelData = image.Channels(Aurigma.GraphicsMill.ColorChannel.Magenta)
channelData.ColorAdjustment.Levels( _
0.0, 1.0, 0.499999, 5.0, 0.500001, Aurigma.GraphicsMill.HistogramMode.Luminosity)
image.Channels(Aurigma.GraphicsMill.ColorChannel.Magenta) = channelData
channelData = image.Channels(Aurigma.GraphicsMill.ColorChannel.Cyan)
channelData.ColorAdjustment.Levels( _
0.0, 1.0, 0.499999, 5.0, 0.500001, Aurigma.GraphicsMill.HistogramMode.Luminosity)
image.Channels(Aurigma.GraphicsMill.ColorChannel.Cyan) = channelData
This works pretty good, but the Levels ColorAdjustment *always* applies a FloydSteinberg dither, which gives little stray pixels across the image that wouldn't be there it I normally just clamp all the pixel values based on 0 <= .5 > 1.0
A simple Threshold filter will give me what I am looking for.
Is this possible in version 4 without iterating through all the pixel data manually?
Thanks for your response.