Accusoft.ImagXpress13.Net
ApplyGrayscaleTransform(Int32,Int32) Method
Example 




The brightness intensity from -100 to 100.
The contrast intensity from -100 to 100.
Permanently levels an 8 through 16-bit gray image to and 8-bit gray image.
Syntax
'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
) 

Parameters

brightness
The brightness intensity from -100 to 100.
contrast
The contrast intensity from -100 to 100.
Exceptions
ExceptionDescription
ProcessorExceptionA Processor exception.
Remarks

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.

Example
// 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 );
See Also

Reference

Processor Class
Processor Members
Overload List

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback