Lines Matching defs:img
2708 coarsecal_get_line(struct scanner *s, struct image *img)
2739 s->cal_image.image = img;
3178 finecal_get_line(struct scanner *s, struct image *img)
3188 int round_offset = img->height / 2;
3221 s->cal_image.image = img;
3235 for (i = 0; i < img->pages; i++)
3237 unsigned char *linepix = img->buffer + i * img->width_bytes * img->height;
3238 unsigned char *avgpix = img->buffer + i * img->width_bytes;
3239 for (j = 0; j < img->width_bytes; j++)
3243 for (k = 0; k < img->height; k++)
3244 total += linepix[j + k * img->width_bytes];
3246 avgpix[j] = (total + round_offset) / img->height;