applyMap  
Top  Previous  Next

applyMap ( integer Input, integer Output, string File )

Use this function to apply a display map to an 8- or 16-bit grayscale image. Unlike
loadMap, this function actually changes the content of an image by recalculating each pixel in accordance with the map supplied.

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.  
 
File  
 
A string containing the name of an ImageWarp map file.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_NOTFOUND  
 
The flag set if the file was not found.  
 
ERR_BADFORMAT  
 
The flag set if file was not recognized as an ImageWarp map file.  
 
Example

This set of statements reads a 16-bit grayscale sample image and applies the logarithmic display map into it to enhance the contrast of low intensity areas:  
 
setCurDir("samples")  
loadIm(1,"sample11.iwd")  
applyMap(1,"..\PALETTES\16bit_log.map")  

Remark

This function cannot be applied to a true color image.