Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

GETIMAGE, GETIMAGE_W

Graphics Subroutines: Store the screen image defined by a specified bounding rectangle. These routines are only available for Windows.

Module

USE IFQWIN

CALL GETIMAGE (x1,y1,x2,y2,image)

CALL GETIMAGE_W (wx1,wy1,wx2,wy2,image)

x1, y1

(Input) INTEGER(2). Viewport coordinates for upper-left corner of bounding rectangle.

x2, y2

(Input) INTEGER(2). Viewport coordinates for lower-right corner of bounding rectangle.

wx1, wy1

(Input) REAL(8). Window coordinates for upper-left corner of bounding rectangle.

wx2, wy2

(Input) REAL(8). Window coordinates for lower-right corner of bounding rectangle.

image

(Output) INTEGER(1). Array of single-byte integers. Stored image buffer.

GETIMAGE defines the bounding rectangle in viewport-coordinate points ( x1, y1) and ( x2, y2). GETIMAGE_W defines the bounding rectangle in window-coordinate points ( wx1, wy1) and ( wx2, wy2).

The buffer used to store the image must be large enough to hold it. You can determine the image size by calling IMAGESIZE at runtime, or by using the formula described under IMAGESIZE. After you have determined the image size, you can dimension the buffer accordingly.

Example

!  Build as QuickWin or Standard Graphics
USE IFQWIN
INTEGER(1), ALLOCATABLE:: buffer (:)
INTEGER(2) status, x, y, error
INTEGER(4) imsize
x = 50
y = 30
status = ELLIPSE ($GFILLINTERIOR, INT2(x-15), &
                  INT2(y-15), INT2( x+15), INT2(y+15))
imsize = IMAGESIZE (INT2(x-16), INT2(y-16), &
                  INT2( x+16), INT2(y+16))
ALLOCATE(buffer (imsize), STAT = error)
IF (error .NE. 0) THEN
  STOP 'ERROR: Insufficient memory'
END IF
CALL GETIMAGE (INT2(x-16), INT2(y-16), &
                  INT2( x+16), INT2(y+16), buffer)
END

See Also