ImageGear for .NET
StretchContrast(ImGearRasterPage,ImGearContrastModes,ImGearChannelRange) Method
See Also  Example Send Feedback
ImageGear21.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class > StretchContrast Method : StretchContrast(ImGearRasterPage,ImGearContrastModes,ImGearChannelRange) Method




page
Image to process.
mode
One of the contrast processing modes: ImGearContrastModes.PALETTE, ImGearContrastModes.PIXEL, ImGearContrastModes.AUTO.
channels
Channel range to process.

Glossary Item Box

Stretches image contrast. Processes specified range of channels.

Syntax

 
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.

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

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 BasicCopy Code
' 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

©2013. Accusoft Corporation. All Rights Reserved.