merge-requests/213/head^2
Thierry HUCHARD 2020-03-22 16:29:34 +01:00
rodzic 79f7463366
commit f4e6677fc1
3 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -404,7 +404,6 @@ sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only)
static SANE_Status static SANE_Status
init_options(SANE_String_Const name, escl_sane_t *s) init_options(SANE_String_Const name, escl_sane_t *s)
{ {
SANE_Range xrange, yrange;
DBG (10, "escl init_options\n"); DBG (10, "escl init_options\n");
SANE_Status status = SANE_STATUS_GOOD; SANE_Status status = SANE_STATUS_GOOD;
@ -846,7 +845,7 @@ sane_start(SANE_Handle h)
return SANE_STATUS_INVAL; return SANE_STATUS_INVAL;
} }
DBG(10, "2-Size Image (%d)[%dx%d|%dx%d]\n", handler->scanner->img_size, 0, 0, w, he); DBG(10, "2-Size Image (%ld)[%dx%d|%dx%d]\n", handler->scanner->img_size, 0, 0, w, he);
if (status != SANE_STATUS_GOOD) if (status != SANE_STATUS_GOOD)
return (status); return (status);

Wyświetl plik

@ -37,11 +37,13 @@ escl_crop_surface(capabilities_t *scanner,
int *width, int *width,
int *height) int *height)
{ {
/*
int x_off = 0, x = 0; int x_off = 0, x = 0;
int real_w = 0; int real_w = 0;
int y_off = 0, y = 0; int y_off = 0, y = 0;
int real_h = 0; int real_h = 0;
unsigned char *surface_crop = NULL; unsigned char *surface_crop = NULL;
*/
/* /*
DBG( 1, "Escl Image Crop\n"); DBG( 1, "Escl Image Crop\n");
if (w < (int)scanner->caps[scanner->source].width) if (w < (int)scanner->caps[scanner->source].width)

Wyświetl plik

@ -208,14 +208,14 @@ get_JPEG_data(capabilities_t *scanner, int *width, int *height, int *bps)
scanner->caps[scanner->source].width, scanner->caps[scanner->source].width,
scanner->caps[scanner->source].height); scanner->caps[scanner->source].height);
x_off = scanner->caps[scanner->source].pos_x; x_off = scanner->caps[scanner->source].pos_x;
if (x_off > scanner->caps[scanner->source].width) { if (x_off > (unsigned int)scanner->caps[scanner->source].width) {
w = scanner->caps[scanner->source].width; w = scanner->caps[scanner->source].width;
x_off = 0; x_off = 0;
} }
else else
w = scanner->caps[scanner->source].width - x_off; w = scanner->caps[scanner->source].width - x_off;
y_off = scanner->caps[scanner->source].pos_y; y_off = scanner->caps[scanner->source].pos_y;
if(y_off > scanner->caps[scanner->source].height) { if(y_off > (unsigned int)scanner->caps[scanner->source].height) {
h = scanner->caps[scanner->source].height; h = scanner->caps[scanner->source].height;
y_off = 0; y_off = 0;
} }