Visual Basic
C#
Managed Extensions for C++
C++/CLI
Parameters
- page
- Image to process.
- mode
- One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
- channels
- Channel range to process.
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.
C# | Copy Code |
---|---|
// Channel range to adjust contrast. ImGearChannelRange igChannelRange = new ImGearChannelRange(0, igRasterPage.DIB.ChannelCount); // Stretch the contrast. ImGearRasterProcessing.StretchContrast(igRasterPage, ImGearContrastModes.AUTO, igChannelRange); |
Visual Basic | Copy Code |
---|---|
' Channel range to adjust contrast. Dim igChannelRange As New ImGearChannelRange(0, igRasterPage.DIB.ChannelCount) ' Stretch the contrast. ImGearRasterProcessing.StretchContrast(igRasterPage, ImGearContrastModes.AUTO, igChannelRange) |