ImageGear .NET - Updated
StretchContrast(ImGearRasterPage,ImGearContrastModes,ImGearChannelRange) Method
Example 




ImageGear23.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class > StretchContrast Method : StretchContrast(ImGearRasterPage,ImGearContrastModes,ImGearChannelRange) Method
Image to process.
One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
Channel range to process.
Stretches image contrast. Processes specified range of channels.
Syntax
'Declaration
 
Public Overloads Shared Sub StretchContrast( _
   ByVal page As ImGearRasterPage, _
   ByVal mode As ImGearContrastModes, _
   ByVal channels As ImGearChannelRange _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim mode As ImGearContrastModes
Dim channels As ImGearChannelRange
 
ImGearRasterProcessing.StretchContrast(page, mode, channels)
public static void StretchContrast( 
   ImGearRasterPage page,
   ImGearContrastModes mode,
   ImGearChannelRange channels
)
public: static void StretchContrast( 
   ImGearRasterPage* page,
   ImGearContrastModes mode,
   ImGearChannelRange channels
) 
public:
static void StretchContrast( 
   ImGearRasterPage^ page,
   ImGearContrastModes mode,
   ImGearChannelRange channels
) 

Parameters

page
Image to process.
mode
One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
channels
Channel range to process.
Remarks
Can be applied only to raster pages with standard (non Run-Ends) DIB.

If ContrastMode is equal to ImGearContrastModes.PALETTE, DIB must have a palette.

Use ImGearRasterProcessingVerifier.CanApplyStretchContrast method to check whether the operation can be performed.

Example
// Channel range to adjust contrast.
ImGearChannelRange igChannelRange = new ImGearChannelRange(0, igRasterPage.DIB.ChannelCount);
// Stretch the contrast.
ImGearRasterProcessing.StretchContrast(igRasterPage,
    ImGearContrastModes.AUTO, igChannelRange);
' Channel range to adjust contrast.
Dim igChannelRange As New ImGearChannelRange(0, igRasterPage.DIB.ChannelCount)
' Stretch the contrast.
ImGearRasterProcessing.StretchContrast(igRasterPage, ImGearContrastModes.AUTO, igChannelRange)
See Also

Reference

ImGearRasterProcessing Class
ImGearRasterProcessing Members
Overload List
ImGearRasterPage Class
ImGearContrastModes Enumeration
ImGearChannelRange Structure