Enabled backtracking by default. This is slower but avois bumping the scan head

at the end of the scan area and also missing parts of the scanned
image. Increased safety margin for backtracking. This fixes the "garbled image"
bug. Set default gamma value to 2. Manpage update. Status set to "basic".
merge-requests/1/head
Henning Geinitz 2005-08-14 12:59:32 +00:00
rodzic dccf9e2fa2
commit 46cfa92d35
4 zmienionych plików z 36 dodań i 23 usunięć

Wyświetl plik

@ -1,6 +1,13 @@
2005-08-14 Henning Meier-Geinitz <henning@meier-geinitz.de>
* Makefile.in: Added Changelog-1.0.16 to DISTFILES.
* backend/hp4200.c doc/sane-hp4200.man
doc/descriptions/hp4200.desc: Enabled backtracking by
default. This is slower but avois bumping the scan head at the end
of the scan area and also missing parts of the scanned
image. Increased safety margin for backtracking. This fixes the
"garbled image" bug. Set default gamma value to 2. Manpage
update. Status set to "basic".
2005-08-13 Henning Meier-Geinitz <henning@meier-geinitz.de>

Wyświetl plik

@ -46,7 +46,7 @@ TODO:
*/
#define BUILD 1
#define BUILD 2
#define BACKEND_NAME hp4200
#include "../include/sane/config.h"
@ -513,7 +513,7 @@ read_available_data (HP4200_Scanner * s, SANE_Byte * buffer,
buffer += really_read;
to_read -= really_read;
#ifdef DEBUG
fprintf (stderr, "he leido %d bytes\n", really_read);
fprintf (stderr, "read %d bytes\n", really_read);
#endif
}
return SANE_STATUS_GOOD;
@ -912,10 +912,8 @@ compute_pause_limit (hardware_parameters_t * hw_parms, int bytes_per_line)
coef_size = coef_mapping[hw_parms->sensor_resolution & 0x01];
pause_limit = hw_parms->SRAM_size - coef_size - (bytes_per_line / 1024) - 1;
#ifdef PROBLEMS_WITH_PAUSE_LIMIT
if (pause_limit > 2)
pause_limit--; /* or try -= 2 */
#endif
pause_limit -= 2;
return pause_limit;
}
@ -2034,10 +2032,6 @@ end_scan (HP4200_Scanner * s)
cache_write (s);
setreg (s, 0x07, 0x02);
#ifdef DEBUG
fprintf (stderr, "%d bytes read\n", byte_count);
#endif
/* Free some buffers */
if (s->ciclic_buffer.buffer)
{
@ -2567,7 +2561,7 @@ init_options (HP4200_Scanner * s)
s->opt[OPT_BACKTRACK].size = sizeof (SANE_Bool);
s->opt[OPT_BACKTRACK].unit = SANE_UNIT_NONE;
s->opt[OPT_BACKTRACK].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_BACKTRACK].b = SANE_FALSE;
s->val[OPT_BACKTRACK].b = SANE_TRUE;
s->opt[OPT_GAMMA_VECTOR_R].name = SANE_NAME_GAMMA_VECTOR_R;
s->opt[OPT_GAMMA_VECTOR_R].title = SANE_TITLE_GAMMA_VECTOR_R;
@ -2607,11 +2601,16 @@ init_options (HP4200_Scanner * s)
{
int i;
double gamma = 2.0;
for (i = 0; i < 1024; i++)
{
s->user_parms.gamma[0][i] = i / 4;
s->user_parms.gamma[1][i] = i / 4;
s->user_parms.gamma[2][i] = i / 4;
s->user_parms.gamma[0][i] =
255 * pow (((double) i + 1) / 1024, 1.0 / gamma);
s->user_parms.gamma[1][i] = s->user_parms.gamma[0][i];
s->user_parms.gamma[2][i] = s->user_parms.gamma[0][i];
#ifdef DEBUG
printf ("%d %d\n", i, s->user_parms.gamma[0][i]);
#endif
}
}

Wyświetl plik

@ -10,7 +10,7 @@
:backend "hp4200" ; name of backend
:version "1.0-1" ; version of backend
:version "1.0-2" ; version of backend
:new :yes
:manpage "sane-hp4200" ; name of manpage (if it exists)
:url "http://hp4200-backend.sourceforge.net" ; backend's web page
@ -24,18 +24,18 @@
:model "ScanJet 4200C" ; name models for above-specified mfg.
:interface "USB"
:status :minimal
:comment "8bpp, 150/300/600 dpi only, and scanned image needs postprocessing"
:status :basic
:comment "8bpp color, 75/150/300/600 dpi only"
:model "ScanJet 4200Cxi" ; name models for above-specified mfg.
:interface "USB"
:status :minimal
:comment "8bpp, 150/300/600 dpi only, and scanned image needs postprocessing"
:status :basic
:comment "8bpp color, 75/150/300/600 dpi only"
:model "ScanJet 4200Cse" ; name models for above-specified mfg.
:interface "USB"
:status :minimal
:comment "8bpp, 150/300/600 dpi only, and scanned image needs postprocessing"
:status :basic
:comment "8bpp color, 75/150/300/600 dpi only"
; :comment and :url specifiers are optional after :mfg, :model, :desc,
; and at the top-level.

Wyświetl plik

@ -1,4 +1,4 @@
.TH sane-hp4200 5 "13 August 2005" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.TH sane-hp4200 5 "14 August 2005" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX sane-hp4200
.SH NAME
sane-hp4200 \- SANE backend for Hewlett-Packard 4200 scanners
@ -19,7 +19,7 @@ ScanJet 4200 Cse
More details can be found on the hp4200 backend homepage
.IR http://hp4200-backend.sourceforge.net/ .
.PP
This is ALPHA software. Keep your hand at the scanner's plug and unplug it, if
This is BETA software. Keep your hand at the scanner's plug and unplug it, if
the head bumps at the end of the scan area.
.PP
If you own a scanner other than the ones listed above that works with this
@ -95,4 +95,11 @@ Adrian Perez Jorge, Andrew John Lewis, Arnar Mar Hrafnkelsson, Frank Zago,
Henning Meier-Geinitz. Current maintainer: Henning Meier-Geinitz <henning@meier-geinitz.de>.
.SH BUGS
Probably many. Send bug reports to the sane-devel mailing list: sane-devel@lists.alioth.debian.org.
Tested only with Linux.
.PP
Only 8 bit color mode works.
.PP
Scanning is slow due to backtracking.
.PP
Send bug reports to the sane-devel mailing list:
sane-devel@lists.alioth.debian.org.