This example copies the input image first and then modifies the
copy. This is essential if the input image needs to be kept.
A complete program called
add.f
exists (see §
).
* Access an existing image.
CALL IMG_IN( 'IN', NX, NY, IPIN, ISTAT )
* Create a new output image by copying the input image.
CALL IMG_OUT( 'IN', 'OUT', IPOUT, ISTAT ) [1]
* Modify the output image.
CALL DOFILL( %VAL( IPOUT ), NX, NY, ISTAT )
* Free the input and output images.
CALL IMG_FREE( '*', ISTAT ) [2]
The following notes refer to the numbered statements:
IMG Simple Image Data Access