extract
|
|
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.
|
|
Left, Top
|
|
Integers specifying the coordinates of the top left corner of the rectangular area to be extracted. The values are given in pixels.
|
|
Width, Height
|
|
Integers specifying the width and height of the rectangular area to be extracted. The values are given in pixels.
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
|
This set of statements simulates a live panning of a sample image by extracting a smaller area of it into another image. The coordinates of the area are gradually changing in a double cycle in order to create a motion effect.
|
|
setCurDir("samples")
|
loadIm (1,"sample14.iwd")
|
W=getImWidth (1)/4
|
H=getImHeight (1)/4
|
for y=0 to 10
|
for x=0 to getImWidth(1)-W-1
|
extract (1, 2, x, y*H, W, H)
|
next
|
next
|