From 6668b38d2c5a10410db495d25c3e23dbaf718df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Mon, 19 Oct 2009 06:33:52 +0200 Subject: [PATCH] fix shading coefficient computing at dpi higher than sensor's one --- backend/genesys.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/genesys.c b/backend/genesys.c index 99ccca341..98e06ef63 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -3044,9 +3044,17 @@ genesys_send_shading_coefficient (Genesys_Device * dev) cmat[0] = 0; cmat[1] = 1; cmat[2] = 2; + if(dev->settings.xres>dev->sensor.optical_res) + { + res=1; + } + else + { + res=dev->sensor.optical_res/dev->settings.xres; + } compute_planar_coefficients (dev, shading_data, - dev->sensor.optical_res/dev->settings.xres, + res, pixels_per_line, words_per_color, channels,