summaryrefslogtreecommitdiff
path: root/backend/genesys_conv.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-01-02 20:06:30 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-01-02 20:06:30 +0100
commitb2802d98d4486d6afc585062f4ca02fddf829dc5 (patch)
treeb74907ddd07161872edfa3d8be1a4ece63a6ec62 /backend/genesys_conv.c
parent29eaee2cf7c71df75a2d31f82738cc3a060f7a88 (diff)
Release 1.0.25+git20150102-1
Diffstat (limited to 'backend/genesys_conv.c')
-rw-r--r--backend/genesys_conv.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/backend/genesys_conv.c b/backend/genesys_conv.c
index 61ac782..0346ad6 100644
--- a/backend/genesys_conv.c
+++ b/backend/genesys_conv.c
@@ -4,42 +4,42 @@
Copyright (C) 2010-2013 Stéphane Voltz <stef.dev@free.fr>
This file is part of the SANE package.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
-
+
As a special exception, the authors of SANE give permission for
additional uses of the libraries contained in this release of SANE.
-
+
The exception is that, if you link a SANE library with other files
to produce an executable, this does not by itself cause the
resulting executable to be covered by the GNU General Public
License. Your use of that executable is in no way restricted on
account of linking the SANE library code into it.
-
+
This exception does not, however, invalidate any other reasons why
the executable file might be covered by the GNU General Public
License.
-
+
If you submit changes to SANE to the maintainers to be included in
a subsequent release, you agree by submitting the changes that
those changes may be distributed with this exception intact.
If you write modifications of your own for SANE, it is your choice
whether to permit this exception to apply to your modifications.
- If you do not wish that, delete this exception notice.
+ If you do not wish that, delete this exception notice.
*/
/*
@@ -79,9 +79,9 @@
static SANE_Status
genesys_reverse_bits(
- uint8_t *src_data,
- uint8_t *dst_data,
- size_t bytes)
+ uint8_t *src_data,
+ uint8_t *dst_data,
+ size_t bytes)
{
size_t i;
for(i = 0; i < bytes; i++) {
@@ -105,7 +105,7 @@ binarize_line(Genesys_Device * dev, uint8_t *src, uint8_t *dst, int width)
int thresh;
int offset, addCol, dropCol;
unsigned char mask;
-
+
int x;
uint8_t min, max;
@@ -186,8 +186,8 @@ binarize_line(Genesys_Device * dev, uint8_t *src, uint8_t *dst, int width)
static SANE_Status
genesys_gray_lineart(
Genesys_Device *dev,
- uint8_t *src_data,
- uint8_t *dst_data,
+ uint8_t *src_data,
+ uint8_t *dst_data,
size_t pixels,
size_t lines,
uint8_t threshold)
@@ -211,14 +211,14 @@ genesys_gray_lineart(
* or grows it in case it is the opposite like when motor resolution is higher than
* sensor's one.
*/
-static SANE_Status
+static SANE_Status
genesys_shrink_lines_1 (
- uint8_t *src_data,
- uint8_t *dst_data,
- unsigned int lines,
+ uint8_t *src_data,
+ uint8_t *dst_data,
+ unsigned int lines,
unsigned int src_pixels,
- unsigned int dst_pixels,
- unsigned int channels)
+ unsigned int dst_pixels,
+ unsigned int channels)
{
unsigned int dst_x, src_x, y, c, cnt;
unsigned int avg[3], val;
@@ -383,7 +383,7 @@ genesys_deskew(Genesys_Scanner *s)
double slope = 0;
DBG (DBG_proc, "%s: start\n", __FUNCTION__);
-
+
bg=0;
if(s->params.format==SANE_FRAME_GRAY && s->params.depth == 1)
{
@@ -402,7 +402,7 @@ genesys_deskew(Genesys_Scanner *s)
return SANE_STATUS_GOOD;
}
DBG(DBG_info, "%s: slope=%f => %f\n",__FUNCTION__,slope, (slope/M_PI_2)*90);
- /* rotate image slope is in [-PI/2,PI/2]
+ /* rotate image slope is in [-PI/2,PI/2]
* positive values rotate trigonometric direction wise */
status = sanei_magic_rotate (&s->params,
dev->img_buffer,