/* Access an existing image */
imgIn( "in", &nx, &ny, &ptrIn, status );
/* Copy this to an output image */
imgOut( "in", "out", &ptrOut, status );
/* Get the value to add. */
printf("Value to add to image: ");
scanf( "%f", &value );
/* And do the work. */
for( i=0; i <nx*ny; i++ ) {
ptrOut[i] = value + ptrIn[i];
}
/* Free the input and output images. */
imgFree( "*", status );
IMG Simple Image Data Access