home *** CD-ROM | disk | FTP | other *** search
- /*
- bmp.h
- partially based on
- "bmptoppm" by DaviD W. Sanderson (1992) and
- "CzView 2.20" by Y.Sasaki (1994).
-
- Ver.1.0 1995-04-28 T.Ogihara
- */
-
- #include <stdio.h>
- #include <libc.h>
- #include <objc/objc.h>
- #include "common.h"
-
- #define NoComp 0
- #define RLE8 1
- #define RLE4 2
-
- #define OS2 0x0c /* 12 */
- #define WIN3 0x28 /* 40 */
- #define RLE8 1
- #define RLE4 2
-
- typedef struct {
- int x, y;
- char type; /* OS2 / WIN3 */
- short bits; /* 1: 8dot/byte 4: 2dot/byte
- 8: 1dot/byte 24: 1dot/3byte */
- int xpm, ypm; /* ‰˜†£¨ð */
- int comp; /* ®¦‰³˚ÿ…® */
- long bitoffset; /* ¥⁄¥Æ¡…¥‚⁄˛‡«»ˇ®³ˆá */
- paltype *palette;
- } bmpHeader;
-
- bmpHeader *loadBmpHeader(FILE *, int *);
- void freeBmpHeader(bmpHeader *);
- commonInfo *bmpInfo(bmpHeader *, int, BOOL);
- int bmpGetImage(FILE *, bmpHeader *, int *, unsigned char **);
-