Top  Previous  Next

updateIm ( integer Image, integer Update )

Use this function to turn the automatic update of an image on screen on and off. By default the update mode is on which mean all the changes of an image content becomes visible right after they occur. If you turn the automatic update off, image processing functions will only modifies pixels in the memory without displaying the changes. This allows for speed increase when time critical functions are called repeatedly.

It is recommended to disable the image update when using the setPixel, drawPencil, and drawBrush.functions and turn it back on at the end of a drawing section of the script.

An integer between 1 and 99 specifying the image frame number for which the update will be turned off or on.  
A boolean integer specifying the update mode. Must be one of the following values:  
FALSE – turns off the automatic update. The changes done to the image will not be displayed.  
TRUE – updates the image and turns on the automatic update of the image.  
Error flags

The flag set if successful.  
The flag set if failed.  

This set of statements disables the automatic update of a sample image, applies a series of paintbrush strokes to it and updates the image in the end:  
loadIm (1,"sample14.iwd")  
updateIm (1,FALSE)  
drawBrush(1, 131, 264)  
drawBrush(1, 134, 264)  
drawBrush(1, 137, 263)  
drawBrush(1, 140, 261)  
drawBrush(1, 143, 260)  
drawBrush(1, 146, 259)  
drawBrush(1, 148, 257)  
drawBrush(1, 151, 255)  
drawBrush(1, 154, 254)  
drawBrush(1, 156, 253)  
updateIm (1,TRUE)