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


Defining the resolution conversion algorithm, using call IMRRAL

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



A transform can contain not only transform elements and a definition of the position in the target image for the extracted image, but also an algorithm to be used where the size or resolution of an image are altered.

Figure 27 diagrammatically shows the pixels making up the top-left-hand corner of a black square displayed at:

  • Same size, but different resolution
    
    
  • Same resolution, different size
    
    

The diagram is not to scale. It simply shows that, if you change the size of an image at constant resolution, or change the resolution at constant size, new pixels must be generated, or existing ones deleted.

For a size or resolution increase, pixels must be generated, and may simply be replications. However, for a size or resolution reduction, pixels must be deleted. There are then different effects according to whether "black" or "white" pixels are deleted when they are adjacent.


   PICTURE 17          

Figure 27. Resolution conversion


If the extracted image and target image in a transfer operation have different defined resolutions, GDDM automatically converts the data from the extracted image resolution to the target image resolution and applies the algorithm.

If the source or target image has undefined resolution, image manipulations are done using pixel to pixel mapping.

You can use the IMRRAL call, always within a projection definition, to set the resolution/scaling algorithm of a transform, before the transform is completed by an IMRPL or IMRPLR call. Here is a typical call:


     CALL IMRRAL(101,2);

The parameters are as follows:

  • The first parameter, 101, is the projection identifier.
    
    
  • The second parameter specifies one of the following algorithms, which are further defined in the GDDM Base Application Programming Reference book:
    
    
    0
    The default algorithm, the same as 1.
    1
    Pixel replication when scaling up, deletion when scaling down.
    2
    Pixel replication when scaling up, black pixel retention when scaling down. This is an improvement on the default algorithm, for images containing black on white text or graphics.
    3
    Pixel replication when scaling up, white pixel retention when scaling down. This is an improvement on the default algorithm, for images containing white on black text or graphics.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012