inquire_file(3G)
NAME
inquire_file − inquire the header information for a bitmap file
SYNOPSIS
C Syntax:
void inquire_file(source,rev,device,xstart,ystart,
xlen,ylen, bm_mode,depth,pixel_align,num_banks,
cmap_mode,csize,back_index)
char *source;
int *rev;
char device[20];
int *xstart,*ystart,*xlen,*ylen;
int *bm_mode,*depth,*pixel_align,*num_banks;
int *cmap_mode,*csize,*back_index;
FORTRAN77 Syntax:
subroutine inquire_file(source,rev,device,
xstart,ystart,xlen,ylen,bm_mode,depth,
pixel_align,num_banks,cmap_mode,csize,back_index)
character*(*) source
integer*4 rev
character*(20) device
integer*4 xstart,ystart
integer*4 xlen,ylen
integer*4 bm_mode,depth,pixel_align,num_banks
integer*4 cmap_mode,csize,back_index
Pascal Syntax:
procedure inquire_file(var source:string255;var rev:integer;
var device:device_model;var xstart,ystart,
xlen,ylen,bm_mode,depth,pixel_align,num_banks,
cmap_mode,csize,back_index:integer);
DESCRIPTION
Input Parameters
source Pathname of the file containing the raster information.
Output Parameters
rev Returns the revision number of the raster file format. The initial implementation is revision 1.
device Character string representing the type of bitmap from which the data was originally stored. For files generated by the Starbase bitmap_to_file(3G) procedure, this is the name of the device driver for the bitmap.
xstart,ystart Coordinates (in device coordinates) of the upper left corner of the source rectangle in the original bitmap. This is the corner of the rectangle actually stored, which may be different from the rectangle that was requested at the time of the file creation if clipping occurred.
xlen, ylen Length, in pixels, of the sides of the rectangle represented in the file.
bm_mode File format identifier.
• If the value of bm_mode is PIXEL_MAJOR (−1), the file is in pixel-major format.
• If the value of bm_mode is PLANE_MAJOR (−2), the format is plane-major.
• If bm_mode is non-negative, it designates the index for a single plane, stored in the file in packed, plane-major format.
depth Total number of bits per pixel stored in the file. If the file is in pixel-major order and depth is greater than 8, the data is stored in multiple banks, each having 8 bits per pixel. If the file is in plane-major order, then depth is equivalent to the number of planes stored in the file.
pixel_align Alignment of the pixel data in each bank or plane. If the value of pixel_align is 1, every bit is a pixel. A value of eight means every byte is a pixel.
num_banks Number of banks of pixel data in the file. This parameter is relevant only for pixel-major file format.
cmap_mode Shade mode in effect when the bitmap data was stored. If the bitmap was stored with a normal color map, cmap_mode is set to CMAP_NORMAL (0). If the bitmap was stored with a monotonic color map, cmap_mode is set to CMAP_MONOTONIC (1). If the bitmap was stored with a full color map, cmap_mode is set to CMAP_FULL (4).
csize Number of color table entries stored in the file. A value of zero means that no color table was stored.
back_index Background color index in effect at the time the bitmap data was stored.
A bad value for the input parameter source causes the Starbase error messages "include file not found" and "file does not contain raster data". See Starbase Graphics Techniques Appendix D, for information on error messages.
SEE ALSO
Starbase Reference: bitmap_to_file(3G), file_to_bitmap(3G), file_print(3G), shade_mode(3G).
Starbase Device Drivers Manual.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992