|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T i ┃
Length: 2328 (0x918) Types: TextFile Names: »iff_stdim.h++«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/image/varc++/iff_stdim.h++«
/* file: image.h */ /* iff: Standard image file format */ /* (c) Copyright 1982, William S. Havens Laboratory for Computational Vision University of British Columbia Adapted from image files developed by Randy Schulz at the University of Wisconsin-Madison Differences: 1) Uses bit-stream I/O allowing random access of arbitrary size pixels. 2) Pixels may range in size from 0 to sizeof(long) = 32-bits. 3) Signed/unsigned images are supported. 4) Positive/negative images are supported. 5) Extensible user-defined parameter space is defined. */ #include "bitio.h++" /* Image file definitions */ #define IMAGIC "Imagefile" /* Magic number for image files */ #define IMVERSION 2 /* iff version number */ #define IMBPP 8 /* Default number of bits per pixel */ #define IMSIGNED 0 /* Default image is unsigned */ #define IMPOSTVE 1 /* Default image is positive encoded */ #define IMNPARMS 6 /* # of image parameters in header */ #define IMBLKSZE BBLKSZE /* Use block size of bitio file */ #define IMHDRSZE 1024 /* Physical header size in file */ struct image { struct iff_bfile *bfile; /* bitio file pointer */ long nrows; /* Number of rows in image */ long ncols; /* Number of columns in image */ short bpp; /* Bits per pixel */ short is_signed; /* Signed / Unsigned image */ short positive; /* Positive / Negative image */ short hdroffset; /* Header offset in file in bits */ } ; struct image *iopen(...), *idopen(...); /* Image header format */ #define IMHDRFMT "Imagefile version-%d: nrows = %D ncols = %D bpp = %hd signed = %hd positive = %hd\n" /* Macros */ #define getpix(ifp) bget ((ifp)->bfile, (ifp)->bpp, (ifp)->is_signed) #define putpix(ifp,pixel) bput ((ifp)->bfile, pixel, (ifp)->bpp) #define isync(ifp) bsync ((ifp)->bfile) #define iseek(ifp,row,col) bseek ((ifp)->bfile, (long)((((ifp)->ncols*(row))+(col))*((ifp)->bpp)+(ifp)->hdroffset), 0) #define ierror(ifp) berror ((ifp)->bfile) #define ieof(ifp) beof ((ifp)->bfile) /* end of file image.h */ /* Copyright (C) 1986, David Sher in the University of Rochester Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained. */