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


Creating an image

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



You can use the IMACRT call to create a device or application image. In the example, the IMACRT at B creates a scanner device image that receives the image data from the scan of the document. This scanner image is the source of the impending transfer operation.

The parameters have the following meanings:

  • The first parameter is the identifier of the image. You use image identifiers when creating images, and when transferring data between images. You always use the identifier -1 for a scanner device image. You use positive values for application images. The display device image (identifier 0) cannot be created using this call, but you can use the ISFLD call (define an image field) to create an image with identifier 0.
    
    
  • The second and third parameters specify the horizontal and vertical size of the image, in pixels. The example is written assuming that documents to be scanned are 6 inches horizontally, and 4 inches vertically. You have a choice of three pairs of defined resolutions on the 3117 and 3118 scanners.
    
    
    This program uses 240/240, so the size of the image in pixels is fixed at 6 x 240 = 1440 horizontally, and 4 x 240 = 960 vertically.
    
    
  • The fourth parameter, 0, indicates default image type, meaning this is a bi-level image.
    
    
  • The fifth parameter indicates whether or not the image is to have a defined resolution.
    
    
    The value 1 indicates that a resolution for the image will be defined in the next three parameters. (A value of 0 is used for raw image data, for example a computer-generated array of pixels, of no particular physical size.)
    
    
  • The sixth parameter specifies the units used to define the resolution of the image in the last two parameters:
    
    
    0
    Inches
    1
    Meters
    
    
  • The last two parameters specify horizontal and vertical resolution, in this case both 240 pixels per inch.
    
    

So, now that the program has created the scanner device image, it is ready to scan the document.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012