Accusoft.ImagXpressSdk Namespace > Processor Class > ApplyGrayscaleTransform Method : ApplyGrayscaleTransform(Int32,Int32) Method |
'Declaration Public Overloads Sub ApplyGrayscaleTransform( _ ByVal brightness As Integer, _ ByVal contrast As Integer _ )
'Usage Dim instance As Processor Dim brightness As Integer Dim contrast As Integer instance.ApplyGrayscaleTransform(brightness, contrast)
public void ApplyGrayscaleTransform( int brightness, int contrast )
public: void ApplyGrayscaleTransform( int brightness, int contrast )
public: void ApplyGrayscaleTransform( int brightness, int contrast )
Exception | Description |
---|---|
ProcessorException | A Processor exception. |
Some images describe more shades of gray than the human eye can discriminate. It is widely held that 256 shades are discernable. This method calculates a factor to multiply the values by to convert the selected range of grays to 256.
In order to further process or save 9-bit to 16-bit grayscale images, this method may need to be called first.
Note: Available in Professional edition.
// create the processor class Accusoft.ImagXpressSdk.Processor processor = new Accusoft.ImagXpressSdk.Processor( ); // associate it with a 8 to 16 bit per pixel image processor.Image = highGrayImageX; // apply the standard grayscale transform making the image brighter and enhancing the contrast processor.ApplyGrayscaleTransform( 30, 10 );