copyPal
Top  Previous  Next

copyPal ( integer Dest, integer Source )

Use this function to copy the palette from a palettized or grayscale image to another one.

Parameters

Dest  
 
An integer between 1 and 116 specifying the frame number of the destination image to which the palette must be copied. Values in the range of 100-116 correspond to hidden frames.  
 
Source  
 
An integer between 1 and 116 specifying the frame number of the source image whose palette must be copied. 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 demonstrates pseudo-coloring of a live image by copying the palette from another image stored in a hidden frame:  
 
setCurDir("samples")  
grabIm (100)  
loadPal(100,"..\PALETTES\HEX.PAL",i)  
do  
 grabIm (101)  
 copyPal(101,100)  
 duplicate (101,1)  
loop  
 
Remark

This function cannot be applied to a true color image.