ImageGear .NET v25.1 - Updated
Solarize(ImGearRasterPage,Int32,ImGearContrastModes,ImGearChannelRange) Method
Example 




ImageGear.Processing.Advanced Assembly > ImageGear.Processing Namespace > ImGearEffects Class > Solarize Method : Solarize(ImGearRasterPage,Int32,ImGearContrastModes,ImGearChannelRange) Method
Image to process.
Lightness threshold above which colors of pixels are inverted.
One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
Channel range to solarize.
This method inverts the colors of pixels whose lightness exceeds the specified threshold.
Syntax
'Declaration
 
Public Overloads Shared Sub Solarize( _
   ByVal page As ImGearRasterPage, _
   ByVal threshold As Integer, _
   ByVal mode As ImGearContrastModes, _
   ByVal channels As ImGearChannelRange _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim threshold As Integer
Dim mode As ImGearContrastModes
Dim channels As ImGearChannelRange
 
ImGearEffects.Solarize(page, threshold, mode, channels)
public static void Solarize( 
   ImGearRasterPage page,
   int threshold,
   ImGearContrastModes mode,
   ImGearChannelRange channels
)
public: static void Solarize( 
   ImGearRasterPage* page,
   int threshold,
   ImGearContrastModes mode,
   ImGearChannelRange channels
) 
public:
static void Solarize( 
   ImGearRasterPage^ page,
   int threshold,
   ImGearContrastModes mode,
   ImGearChannelRange channels
) 

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
// 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);
' 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

Reference

ImGearEffects Class
ImGearEffects Members
Overload List
ImGearRasterPage Class
CanApplySolarize Method
ImGearChannelRange Structure
ImGearContrastModes Enumeration