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


Extracting a rectangular sub-image using call IMREXR

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



You can use the IMREXR call to define a rectangular sub-image to be extracted from the source image. The left and right edges of the sub-image are defined in terms of their distance from the left edge of the source image. The top and bottom edges of the sub-image are defined in terms of their distance from the top edge of the source image.

The parameters are as follows:

  • The first parameter, 15, is again the projection identifier.
    
    
  • The second parameter specifies the type of coordinates used in the third, fourth, fifth, and sixth parameters:
    
    
    0
    Inches
    1
    Meters.
    2
    Fractional. You specify at what fraction of the pixel dimensions the edges are to be, by values in the range 0.0 to 1.0.
    
    
  • The last four parameters specify, respectively, the left edge, right edge, top edge, and bottom edge values in the stated coordinate type. So, in the above example:
    
    
    • The left edge of the sub-image is 3 inches from the left edge of the source image.
      
      
    • The right edge of the sub-image is 8 inches from the left edge of the source image.
      
      
    • The top edge of the sub-image is 2 inches from the top edge of the source image.
      
      
    • The bottom edge of the sub-image is 7 inches from the top edge of the source image.
      
      

There is another call that you can use instead of IMREXR. The call IMREX enables you to specify the sub-image boundary in pixel coordinates: Here is an example of its use:


     CALL IMREX(24,0,499,20,249);

This list explains the parameters used here:

24
The projection identifier


0
The left edge of the required image, in pixel coordinates (0 is the left hand edge of the source image)

499
The right edge of the required image, in pixel coordinates

20
The top edge of the required image, in pixel coordinates

249
The bottom edge of the required image, in pixel coordinates

You can use either IMREX or IMREXR in a transform; you cannot use both. If you use one of them, it must be the first call of the transform. If you do not have either an IMREX or IMREXR call in a projection, or if you use the identity projection, the whole of the source image is extracted.

If the specified rectangle in a IMREX or IMREXR call lies wholly or partly outside the source image, the part outside the source image is filled with zeros. This is not an error condition.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012