ImageGear21.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class > StretchContrast Method : StretchContrast(ImGearRasterPage,ImGearContrastModes,ImGearChannelRange) Method |
'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 )
If ContrastMode
is equal to ImGearContrastModes.PALETTE, DIB must have a palette.
Use ImGearRasterProcessingVerifier.CanApplyStretchContrast method to check whether the operation can be performed.
// 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)