Get the clip rectangle for the image

The code in Listing 2:

When the get_clip_rect function returns

The coordinates of the diagonal corners of the rectangle have been stored in the variables named:

Listing 2. Get the clip rectangle for the image.
  //Get the current clip rectangle for the image. This is
  // (one less than) the size of the image in both
  // dimensions.
  get_clip_rect(picA,
                &upperLeftX,
                &upperLeftY,
                &lowerRightX,
                &lowerRightY);

  //Compute the width and the height from the coordinates
  // of the diagonal corners of the clip rectangle.
  width = lowerRightX  + 1;
  height = lowerRightY + 1;