26#ifdef QUANT_2PASS_SUPPORTED
87 for (
i = 1;
i < 13;
i++) {
89 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
94 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
97 if ((
header[10] & 0x80) == 0)
98 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
101 colormaplen = 2 << (
header[10] & 0x07);
103 for (
i = 0;
i < colormaplen;
i++) {
108 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
131 }
while (ch !=
'\n' && ch !=
EOF);
145 register unsigned int val;
151 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
152 }
while (ch ==
' ' || ch ==
'\t' || ch ==
'\n' || ch ==
'\r');
154 if (ch <
'0' || ch >
'9')
155 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
158 while ((ch = pbm_getc(
infile)) >=
'0' && ch <=
'9') {
174 unsigned int w,
h, maxval,
row, col;
181 w = read_pbm_integer(cinfo,
infile);
182 h = read_pbm_integer(cinfo,
infile);
183 maxval = read_pbm_integer(cinfo,
infile);
185 if (
w <= 0 ||
h <= 0 || maxval <= 0)
186 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
190 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
195 for (col = 0; col <
w; col++) {
196 R = read_pbm_integer(cinfo,
infile);
197 G = read_pbm_integer(cinfo,
infile);
198 B = read_pbm_integer(cinfo,
infile);
199 add_map_entry(cinfo,
R,
G,
B);
206 for (col = 0; col <
w; col++) {
211 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
212 add_map_entry(cinfo,
R,
G,
B);
218 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
234 cinfo->
colormap = (*cinfo->mem->alloc_sarray)
242 read_gif_map(cinfo,
infile);
245 read_ppm_map(cinfo,
infile);
248 ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
#define G(r, i, a, b, c, d)
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
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP int __cdecl getc(_Inout_ FILE *_File)
#define ERREXIT1(cinfo, code, p1)
#define GETJSAMPLE(value)
int actual_number_of_colors