resetPal
Top  Previous  Next

resetPal ( integer Image )

Use this function to load the standard 256-level grayscale palette to a palettized image. This is typically done to reset the palette of a grayscale image to its original state after pseudo-coloring was applied.

Parameters
 
Image  
 
An integer between 1 and 116 specifying the frame number of the image which palette is to be reset. Values in the range of 100-116 correspond to hidden frames.  
 
Error flags

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

This set of statements applies the "hex" pseudo-color palette to a captured image and then resets it back to the original grayscale palette:  
 
setCurDir("samples")  
grabIm (1)  
loadPal(1,"..\PALETTES\HEX.PAL")  
val=msgBox("Pseudo-coloring applied. Reset to grayscale?", MB_YESNO)  
If val=ID_YES Then  
resetPal(1)  
End If  
 
Remark

This function cannot be applied to a true color image.