graphics.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_imagesize Functions
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The _imagesize functions return the number of bytes needed to
     store the image defined by the bounding rectangle. The rectangle
     is specified by the coordinates given in the function call.
 
     The _imagesize function defines the bounding rectangle in terms of
     the view-coordinate points (<x1>, <y1>) and (<x2>, <y2>). This
     size is determined by the following formula:
 
          xwid = abs(x1-x2)+1;
          ywid = abs(y1-y2)+1;
          size = 4+((long)((xwid*bits-per-pixel+7)/8)*(long)ywid);
 
     The bits-per-pixel value is returned from a call to
     _getvideoconfig as the bitsperpixel field of the videoconfig
     structure.
 
     The _imagesize_w function defines the bounding rectangle in terms
     of the window-coordinate points (<wx1>, <wy1>) and (<wx2>, <wy2>).
 
     The _imagesize_wxy function defines the bounding rectangle in
     terms of the window-coordinate pairs (<pwxy1>) and (<pwxy2>).
 
     The _imagesize_w and _imagesize_wxy functions are implemented as
     macros.
 
     Return Value
 
     The function returns the storage size of the image in bytes. There
     is no error return.
                                    -♦-