/* * CVL image header include file. * Entries consist of 2 byte integer short words. * A variable length comments section may follow this header. * 0 is an unknown length. */ struct cvl_p { long cv_tag; /* 044520 'PI' identifier for pictures */ /* 0152103 'CT'+0100000 continued with parity bit */ short cv_lcom; /* length of comments (default 0) */ short cv_type; /* type of pixel encoding (default 0) */ short cv_dims; /* dimensions (default 2) */ short cv_hpls; /* hyperplanes in the image (default 1) */ short cv_plns; /* planes per hyperplane (default 1) */ short cv_rows; /* rows per plane */ short cv_cols; /* pixels per row */ short cv_bnds; /* bands per pixel (default 1) */ short cv_bp; /* bits per pixel (default 8) */ short cv_ebb; /* exponent bits per band (0 or 7) (default 0) */ short cv_sbb; /* significant bits per band (default 0) */ short cv_bb; /* bits per band (default 0) */ short cv_sbp; /* significant bits per pixel (default 0) */ short cv_ebp; /* exponent bits per pixel (0 or 7) (default 0) */ }; /* * Immediately following the header structure in * oldest-to-newest-order, ASCII title and comments * consist of lines of less than 80 characters * each ended by a newline (012). * New comments would be added after the last comment * and the comment length field of the header would be incremented. */ /* * The image data which follows is packed * with the least significant bit representing * the low number pixel. * Bits per pixel which are a power of 2 are encouraged. * No alignment is done at the end of planes or hyperplanes, * however each row begins on a byte boundary. * Images are assumed to raster across the top row * from left to right and then downward by rows. */ /* * Imagine the bytes of the image data laid down with the * least significant bit toword the left. To collect pixels, simply * grab cv_bp bits at a time starting at the beginning. * Exceptions to this (for efficiency) are pictures with * the same number of bits per pixel as a local C type * (e.g. 16 and 32 matching short and long) these are assumed to * have byte ordering as the underlying machine. * * Within a pixel, the four fields {sbp, bb, sbp bnds} * are used to determine the layout. * The pixel's significant bits are packed into the low order bits * of the pixel. The values in the most significant (bp-sbp) bits * of the pixel are undefined. * Starting with the least significant bits of the pixel we have band 0, * band 1 ... up to band 'bnds'. Within each band the lowest order bits * are significant, with the top (bb-sbb) bits being ignored and * undefined. Having dealt now with the lowest (bnds*bb) bits, we * move up to the overlay bits. These are the significant bits of the * pixel which are not covered by the bands. * As an example, assume 35 bits per pixel (31 are significant) * and 4 bands each with 7 bits (of which 5 are significant). * Numbers represent valid bits of that band, O's are overlay bits, * and x's are bits whose value cannot be counted upon. * * xxxxOOOxx33333xx22222xx11111xx00000 * most sig <---- ----> least sig * */ /* Everything after bits-per-pixel was once optional. When encountered in their * 0-default conditions, the following rules are applied : * If sigbits-per-pixel is 0, bits-per-pixel is used. * * If bits-per-band is 0 then * if bands-per-pixel is 1, bits-per-pixel is used * Otherwise * this is an error. * * If sigbits-per-band is 0, bits-per-band is used. */ struct umipscf { int fx; /* window parameters */ int fy; int nx; int ny; int dev; /* default device */ }; struct dparse { int device; int orflag, any_orflag; int orflag2, any_orflag2; int escape, any_escape; int colorch, any_color; int colornum; int colorch2, any_color2; int colornum2; int colorstr, any_colorstr; int colorstr2, any_colorstr2; int by_rows, any_mode; int row_inc; int col_inc; int band; int fx,fy,nx,ny,any_region; int view, any_view; int table, any_table; int interch, any_interch; int debug, any_debug; int f1, f2, f3, f4, f5, f6, f7, f8, f9; int any1, any2, any3, any4, any5, any6, any7, any8, any9; char argstr[128]; int undo_color; };