34#define SETPIXEL(op, v) { \
35 switch (npixels++ & 3) { \
36 case 0: op[0] = (unsigned char) ((v) << 6); break; \
37 case 1: op[0] |= (v) << 4; break; \
38 case 2: op[0] |= (v) << 2; break; \
39 case 3: *op++ |= (v); op_offset++; break; \
43#define LITERALROW 0x00
44#define LITERALSPAN 0x40
45#define WHITE ((1<<2)-1)
50 static const char module[] =
"NeXTDecode";
51 unsigned char *bp, *
op;
62 for (
op = (
unsigned char*)
buf,
cc = occ;
cc-- > 0;)
73 for (
row =
buf;
cc > 0 && occ > 0; occ -= scanline,
row += scanline) {
95 off = (bp[0] * 256) + bp[1];
96 n = (bp[2] * 256) + bp[3];
97 if (cc < 4+n || off+n > scanline)
126 while (
n-- > 0 && npixels < imagewidth && op_offset < scanline)
128 if (npixels >= imagewidth)
130 if (op_offset >= scanline ) {
156 static const char module[] =
"NeXTPreDecode";
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GLenum GLuint GLenum GLsizei const GLchar * buf
tmsize_t tif_scanlinesize
TIFFPreMethod tif_predecode
TIFFCodeMethod tif_decodestrip
TIFFCodeMethod tif_decoderow
TIFFCodeMethod tif_decodetile
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
#define SETPIXEL(buf, x, y, p)