Include:
Prototype: long far _imagesize(short x1, short y1, short x2, y2);
long far _imagesize_w(double wx1, double wy1,
double wx2, double wy2);
long far _imagesize_wxy (struct _wxycoord pwxy1,
struct _wxycoord pwxy2);
Returns: the image's storage size in bytes.
See also: _getimage, _putimage
The _imagesize functions return the number of bytes needed to store the
image defined by the bounding rectangle, specified by the coordinates
given in the function call.
The _imagesize function defines the bounding rectangle in terms of 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.
The _imagesize_w function defines the bounding rectangle in terms of
window coordinate points (x1, y1) and (x2, y2).
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.