Fix a bug introduced during refactoring that caused discolored stripes to appear at the left and right sides of the scan area.

merge-requests/1/head
Jan Hauffa 2012-07-14 23:15:02 +02:00 zatwierdzone przez m. allan noah
rodzic a64477bf1a
commit db7f038f10
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1341,7 +1341,7 @@ AdjustAD (Scanner_State * st)
range = 1.0 - (double) (wMaxValue[i] - wMinValue[i]) / MAX_LEVEL_RANGE; range = 1.0 - (double) (wMaxValue[i] - wMinValue[i]) / MAX_LEVEL_RANGE;
if (range > 0) if (range > 0)
{ {
st->chip.AD.Gain[i] = (SANE_Byte) range * 63 * 6 / 5; st->chip.AD.Gain[i] = (SANE_Byte) (range * 63 * 6 / 5);
st->chip.AD.Gain[i] = _MIN (st->chip.AD.Gain[i], 63); st->chip.AD.Gain[i] = _MIN (st->chip.AD.Gain[i], 63);
} }
else else