toGray16
Top  Previous  Next

toGray16 ( integer Input, integer Output [, integer Min=0, integer Max=0] )

Use this function to convert an image or selection into a 16-bit high-depth grayscale format.

Parameters
 
Input  
 
An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.  
 
Output  
 
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.  
 
Min, Max  
 
Optional integers that represent the luminance range of the output image's pixels. Performing the conversion, ImageWarp will stretch the display range of the input image to the minimal and maximal values specified by these parameters. If both Min and Max are zero or omitted, the display range of the input image will be mapped to the pixel value range of 0 – 65535.  
Default values: 0  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example
 
grabIm (1)  
toGray16 (1,2)  
saveIm (2,"C:\\testgray16.tif")