), shows how to
create a new image and then write values to it:
* Create a new image.
CALL IMG_NEW( 'OUT', 416, 578, IP, ISTAT ) [1]
* Fill the array with the value 1.
CALL DOFILL( %VAL( IP ), 416, 578, ISTAT ) [2]
* Free the image.
CALL IMG_FREE( 'OUT', ISTAT ) [3]
END
SUBROUTINE DOFILL( IMAGE, NX, NY, ISTAT )
INCLUDE 'SAE_PAR'
REAL IMAGE( NX, NY )
IF ( ISTAT .NE. SAI__OK ) RETURN
* Loop over all the elements of the image setting them to 1.0.
DO 1 J = 1, NY
DO 2 I = 1, NX
IMAGE( I, J ) = 1.0
2 CONTINUE
1 CONTINUE
END
The following notes refer to the numbered statements:
IMG Simple Image Data Access