GDDM V3R2 Base Application Programming Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


IMACRT

GDDM V3R2 Base Application Programming Reference
SC33-0868-02



Function


To create an image.


   IMACRT      (id, h-pixels, v-pixels, im-type, res, res-unit, h-res, v-res)

APL code 1601 GDDM RCP code X'3C010001' (1006698497)


Parameters


id (specified by user) (fullword integer)
The new image. It must be -1, corresponding to a scanner, or greater than zero, corresponding to an application image, and must not be the identifier of an existing image. Zero is reserved for the current device image and cannot explicitly be created.


h-pixels (specified by user) (fullword integer)
The horizontal size of the image, in numbers of pixels. If zero is used, an image containing no pixels is created.

v-pixels (specified by user) (fullword integer)
The vertical size of the image, in numbers of pixels. If zero is used, an image containing no pixels is created.

im-type (specified by user) (fullword integer)
The type of image to be created.

0
Default, same as 1
1
Bi-level image (one bit per pixel).

res (specified by user) (fullword integer)
The resolution flag for the image. This specifies whether the image is to have a defined or undefined resolution. When an image has an undefined resolution, the values of the h-res and v-res fields of the image are ignored during image manipulations.

When a scanner image is created with an undefined resolution, subsequent scanning is set at the resolution currently set on the scanner, but the images resulting from this have undefined resolution.

Projections containing extracts in real units cannot be applied to images with undefined resolution; see IMREXR.

0
undefined resolution; that is, raw data. Image manipulations using this image are performed using a pixel-to-pixel mapping.
1
defined resolution; the image has a defined size in real units.

res-unit (specified by user) (fullword integer)
The units for the h-res and v-res parameters. The value of res-unit parameter is used only to interpret the h-res and v-res parameters, and is not subsequently associated with the image in any way.

0
inches
1
meters

h-res (specified by user) (short floating point)

v-res (specified by user) (short floating point)
The number of pixels in the horizontal or vertical direction per unit of measure defined by res-unit. When the res parameter is zero, the values of h-res and v-res are copied into the image, but they are not used in image manipulations until res is set to 1.


Values of 0 can be given for these parameters if res is 0, providing that res is not subsequently changed to 1 using IMARF. It is an error if an image with zero h-res and v-res is used in this way.

The values of h-res and v-res must be the same for any image that is to be retrieved by an IMAGT sequence (IMAGTS, IMAGT, IMAGTE) using PPF format and IBM 3800 compression.

Description


Creates an image of the specified horizontal and vertical size, type, and resolution and associates it with the specified identifier.

When created, images contain initial pixel values, defined to be zeros for bi-level image.

The identifier id can be any value that does not correspond to an already existing image. If the value of id has not been determined using IMAGID, it should be either -1, or a number in the range 1 through 2(30)-1, so as not to conflict with values reserved by IMAGID, which are in the range 2(30) through 2(31)-1. If id was returned by IMAGID, it is no longer reserved after IMACRT.

The IMACRT call can be used to define the attributes of a scanner image by specifying id equal to -1. The image size usually specifies the paper size.

For a 3118 scanner, the image is defined to be centered over the vertical center line of the paper and aligned with the top edge. Note that the paper-feed mechanism of the 3118 scanner automatically aligns the paper over the center of the scanner sensor array.

For a 3117 scanner, the image is defined to be aligned on the top, and left edges of the scanner bed.

Principal errors


ADM3350 E
IMAGE n ALREADY EXISTS
ADM3351 E
IMAGE IDENTIFIER n IS INVALID
ADM3352 E
IMAGE n1 HORIZONTAL SIZE n2 IS INVALID
ADM3353 E
IMAGE n1 VERTICAL SIZE n2 IS INVALID
ADM3354 E
IMAGE n1 TYPE n2 IS INVALID
ADM3355 E
IMAGE n1 RESOLUTION FLAG n2 IS INVALID
ADM3356 E
IMAGE n1 RESOLUTION UNIT n2 IS INVALID
ADM3357 E
IMAGE n INVALID H-RES OR V-RES f FOR RES=1
ADM3470 E
SCANNER DOES NOT EXIST
ADM3474 E
SCANNER DOES NOT SUPPORT H-RES/V-RES OF f1/f2
ADM3475 E
IMAGE n1 UNSUPPORTED HORIZONTAL SIZE n2 PIXELS
ADM3476 E
IMAGE n1 UNSUPPORTED VERTICAL SIZE n2 PIXELS

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012