Lines Matching refs:scanner
156 get_JPEG_data(capabilities_t *scanner, int *width, int *height, int *bps)
170 if (scanner->tmp == NULL)
172 fseek(scanner->tmp, SEEK_SET, 0);
173 start = ftell(scanner->tmp);
181 fseek(scanner->tmp, start, SEEK_SET);
183 if (scanner->tmp) {
184 fclose(scanner->tmp);
185 scanner->tmp = NULL;
190 jpeg_RW_src(&cinfo, scanner->tmp);
195 double ratio = (double)cinfo.output_width / (double)scanner->caps[scanner->source].width;
196 int rw = (int)((double)scanner->caps[scanner->source].width * ratio);
197 int rh = (int)((double)scanner->caps[scanner->source].height * ratio);
198 int rx = (int)((double)scanner->caps[scanner->source].pos_x * ratio);
199 int ry = (int)((double)scanner->caps[scanner->source].pos_y * ratio);
239 if (scanner->tmp) {
240 fclose(scanner->tmp);
241 scanner->tmp = NULL;
257 scanner->img_data = surface;
258 scanner->img_size = lineSize * h;
259 scanner->img_read = 0;
265 fclose(scanner->tmp);
266 scanner->tmp = NULL;
272 get_JPEG_data(capabilities_t __sane_unused__ *scanner,