ImageGear for .NET
Solarize(ImGearRasterPage,Int32,ImGearContrastModes,ImGearChannelRange) Method
See Also  Example Send Feedback
ImageGear21.Processing.Advanced Assembly > ImageGear.Processing Namespace > ImGearEffects Class > Solarize Method : Solarize(ImGearRasterPage,Int32,ImGearContrastModes,ImGearChannelRange) Method




page
Image to process.
threshold
Lightness threshold above which colors of pixels are inverted.
mode
One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
channels
Channel range to solarize.

Glossary Item Box

This method inverts the colors of pixels whose lightness exceeds the specified threshold.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Parameters

page
Image to process.
threshold
Lightness threshold above which colors of pixels are inverted.
mode
One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
channels
Channel range to solarize.

Remarks

This method is not valid for use on 1-bit images.

The threshold is a value from 0 to the maximum value for a channel in the image. For example, if the image is 24bpp RGB, the threshold ranges from 0 to 255.

Example

C#Copy Code
// Channel range to adjust contrast.
ImGearChannelRange igChannelRange = new ImGearChannelRange(0, igRasterPage.DIB.ChannelCount);
// Solarize the image, inverting the contrast the contrast if above threshold.
ImGearEffects.Solarize(igRasterPage, 200,
    ImGearContrastModes.AUTO, igChannelRange);
Visual BasicCopy Code
' Channel range to adjust contrast.
Dim igChannelRange As New ImGearChannelRange(0, igRasterPage.DIB.ChannelCount)
' Solarize the image, inverting the contrast the contrast if above threshold.
ImGearEffects.Solarize(igRasterPage, 200, ImGearContrastModes.AUTO, igChannelRange)

See Also

©2013. Accusoft Corporation. All Rights Reserved.