kopia lustrzana https://gitlab.com/sane-project/website
786 wiersze
26 KiB
HTML
786 wiersze
26 KiB
HTML
<!-- received="Mon Dec 27 11:39:41 1999 PST" -->
|
||
<!-- sent="Mon, 27 Dec 1999 14:43:20 -0500" -->
|
||
<!-- name="Karl Heinz Kremer" -->
|
||
<!-- email="khk@khk.net" -->
|
||
<!-- subject="Re: Update for Epson Backend / Perfection 1200S Support" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="3867A07F.CC360E31@us.oracle.com" -->
|
||
<title>sane-devel: Re: Update for Epson Backend / Perfection 1200S Support</title>
|
||
<h1>Re: Update for Epson Backend / Perfection 1200S Support</h1>
|
||
<b>Karl Heinz Kremer</b> (<a href="mailto:khk@khk.net"><i>khk@khk.net</i></a>)<br>
|
||
<i>Mon, 27 Dec 1999 14:43:20 -0500</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#180">[ date ]</a><a href="index.html#180">[ thread ]</a><a href="subject.html#180">[ subject ]</a><a href="author.html#180">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0181.html">David Turley: "compile problem"</a>
|
||
<li> <b>Previous message:</b> <a href="0179.html">Leonard Bottleman: "Re: Update for Epson Backend / Perfection 1200S Support"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
--DBIVS5p969aUjpLe<br>
|
||
Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm"<br>
|
||
<p>
|
||
<p>
|
||
--uAKRQypu60I7Lcqm<br>
|
||
Content-Type: text/plain; charset=us-ascii<br>
|
||
Content-Transfer-Encoding: quoted-printable<br>
|
||
<p>
|
||
Leonard,<br>
|
||
<p>
|
||
here is my patch.<br>
|
||
<p>
|
||
Karl Heinz<br>
|
||
<p>
|
||
On Mon, Dec 27, 1999 at 09:23:11AM -0800, Leonard Bottleman wrote:<br>
|
||
<i>> If you find out who's in charge of the Epson backend code,</i><br>
|
||
<i>> please let us know.</i><br>
|
||
<i>>=20</i><br>
|
||
<i>> I've also made a few very small changes to add support for</i><br>
|
||
<i>> the Epson Action Scanner II (parallel port), but can't find</i><br>
|
||
<i>> anybody to send the changes to.</i><br>
|
||
<i>>=20</i><br>
|
||
<i>> I would like a copy of your patch -- thanks for offering.</i><br>
|
||
<i>>=20</i><br>
|
||
<i>> Leonard Bottleman <a href="mailto:leonard@teleport.com">leonard@teleport.com</a></i><br>
|
||
<i>>=20</i><br>
|
||
<i>> Karl Heinz Kremer wrote:</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > I just got a note from Kaz Sasayama, saying that he's not</i><br>
|
||
<i>> > mainaining the Epson backend in the release code. Who is?</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > I've made some changes to the code in order to support the</i><br>
|
||
<i>> > 1200S scanner. At the same time I also added some features</i><br>
|
||
<i>> > that would also work with other (already supported) Epson</i><br>
|
||
<i>> > scanners (like mirroring, gamma and color correction).</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > Who shall I send the patch to?</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > If somebody wants the patch before it goes into either a</i><br>
|
||
<i>> > new release or a new development snapshot, just drop me</i><br>
|
||
<i>> > a note.</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > Karl Heinz</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > --</i><br>
|
||
<i>> > Karl Heinz Kremer <a href="mailto:khk@khk.net">khk@khk.net</a></i><br>
|
||
<i>> > <a href="http://www.khk.net">http://www.khk.net</a></i><br>
|
||
<i>> > ICQ: 41190739</i><br>
|
||
<i>> >=20</i><br>
|
||
<i>> > ---------------------------------------------------------------------=</i><br>
|
||
-------------------------------<br>
|
||
<i>> > Part 1.2Type: application/pgp-signature</i><br>
|
||
<i>>=20</i><br>
|
||
<i>> --</i><br>
|
||
<i>> Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a></i><br>
|
||
<i>> To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a></i><br>
|
||
<p>
|
||
--=20<br>
|
||
Karl Heinz Kremer <a href="mailto:khk@khk.net">khk@khk.net</a><br>
|
||
<a href="http://www.khk.net">http://www.khk.net</a><br>
|
||
ICQ: 41190739<br>
|
||
<p>
|
||
--uAKRQypu60I7Lcqm<br>
|
||
Content-Type: text/plain; charset=us-ascii<br>
|
||
Content-Disposition: attachment; filename="epson.patch"<br>
|
||
Content-Transfer-Encoding: quoted-printable<br>
|
||
<p>
|
||
*** epson.c.ORIG Sat Dec 25 09:22:50 1999<br>
|
||
--- epson.c Sun Dec 26 16:49:02 1999<br>
|
||
***************<br>
|
||
*** 10,15 ****<br>
|
||
--- 10,17 ----<br>
|
||
Copyright (C) 1998 Christian Bucher<br>
|
||
Copyright (C) 1998 Kling & Hautzinger GmbH<br>
|
||
=20<br>
|
||
+ Copyright (C) 1999 Karl Heinz Kremer<br>
|
||
+=20<br>
|
||
This file is part of the SANE package.<br>
|
||
=20<br>
|
||
This program is free software; you can redistribute it and/or<br>
|
||
***************<br>
|
||
*** 46,52 ****<br>
|
||
=20<br>
|
||
If you write modifications of your own for SANE, it is your choice<br>
|
||
whether to permit this exception to apply to your modifications.<br>
|
||
! If you do not wish that, delete this exception notice. */<br>
|
||
=20<br>
|
||
#ifdef _AIX<br>
|
||
# include <lalloca.h> /* MUST come first for AIX! */<br>
|
||
--- 48,68 ----<br>
|
||
=20<br>
|
||
If you write modifications of your own for SANE, it is your choice<br>
|
||
whether to permit this exception to apply to your modifications.<br>
|
||
! If you do not wish that, delete this exception notice.<br>
|
||
!=20<br>
|
||
! Changes:<br>
|
||
!=20<br>
|
||
! 26-DEC-1999 (Karl Heinz Kremer, <a href="mailto:khk@khk.net">khk@khk.net</a>)<br>
|
||
! added support for B7 and B8 level devices (Perfection 1200=<br>
|
||
S)<br>
|
||
! added mirroring support (does not yet take current scan ar=<br>
|
||
ea<br>
|
||
! selection into account) - at this time B8 is just a cop=<br>
|
||
y of<br>
|
||
! B7.<br>
|
||
! added gamma and color correction support<br>
|
||
! added auto area segmentation support<br>
|
||
!=20<br>
|
||
! */<br>
|
||
!=20<br>
|
||
!=20<br>
|
||
=20<br>
|
||
#ifdef _AIX<br>
|
||
# include <lalloca.h> /* MUST come first for AIX! */<br>
|
||
***************<br>
|
||
*** 101,145 ****<br>
|
||
#define EPSON_LEVEL_B4 5<br>
|
||
#define EPSON_LEVEL_B5 6<br>
|
||
#define EPSON_LEVEL_B6 7<br>
|
||
=20<br>
|
||
#define EPSON_LEVEL_DEFAULT EPSON_LEVEL_B3<br>
|
||
=20<br>
|
||
static EpsonCmdRec epson_cmd[] =3D<br>
|
||
{<br>
|
||
/*<br>
|
||
! request identity<br>
|
||
! | request status<br>
|
||
! | | request condition<br>
|
||
! | | | set color mode<br>
|
||
! | | | | start scanning<br>
|
||
! | | | | | set data format<br>
|
||
! | | | | | | set resolution<br>
|
||
! | | | | | | | set zoom<br>
|
||
! | | | | | | | | set scan area<br>
|
||
! | | | | | | | | | set brightness<br>
|
||
! | | | | | | | | | | set gamma<br>
|
||
! | | | | | | | | | | | set halftoning<br>
|
||
! | | | | | | | | | | | | set color correction<br>
|
||
! | | | | | | | | | | | | | initialize scanner<br>
|
||
! | | | | | | | | | | | | | | set speed<br>
|
||
! | | | | | | | | | | | | | | | set lcount<br>
|
||
! | | | | | | | | | | | | | | | |<br>
|
||
*/<br>
|
||
! {"A1", 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1}<br>
|
||
,<br>
|
||
! {"A2", 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B1", 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1}<br>
|
||
,<br>
|
||
! {"B2", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B3", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B4", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B5", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B6", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
};<br>
|
||
=20<br>
|
||
/* TODO: speed */<br>
|
||
--- 117,169 ----<br>
|
||
#define EPSON_LEVEL_B4 5<br>
|
||
#define EPSON_LEVEL_B5 6<br>
|
||
#define EPSON_LEVEL_B6 7<br>
|
||
+ #define EPSON_LEVEL_B7 8<br>
|
||
+ #define EPSON_LEVEL_B8 9<br>
|
||
=20<br>
|
||
#define EPSON_LEVEL_DEFAULT EPSON_LEVEL_B3<br>
|
||
=20<br>
|
||
static EpsonCmdRec epson_cmd[] =3D<br>
|
||
{<br>
|
||
/*<br>
|
||
! set mirroring<br>
|
||
! | auto area segmentation<br>
|
||
! | | request identity<br>
|
||
! | | | request status<br>
|
||
! | | | | request condition<br>
|
||
! | | | | | set color mode<br>
|
||
! | | | | | | start scanning<br>
|
||
! | | | | | | | set data format<br>
|
||
! | | | | | | | | set resolution<br>
|
||
! | | | | | | | | | set zoom<br>
|
||
! | | | | | | | | | | set scan area<br>
|
||
! | | | | | | | | | | | set brightness<br>
|
||
! | | | | | | | | | | | | set gamma<br>
|
||
! | | | | | | | | | | | | | set halftoning<br>
|
||
! | | | | | | | | | | | | | | set color correction<br>
|
||
! | | | | | | | | | | | | | | | initialize scanner<br>
|
||
! | | | | | | | | | | | | | | | | set speed<br>
|
||
! | | | | | | | | | | | | | | | | | set lcount<br>
|
||
! | | | | | | | | | | | | | | | | | |<br>
|
||
*/<br>
|
||
! {"A1", 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1}<br>
|
||
,<br>
|
||
! {"A2", 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B1", 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1}<br>
|
||
,<br>
|
||
! {"B2", 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B3", 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B4", 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B5", 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
,<br>
|
||
! {"B6", 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
! ,<br>
|
||
! {"B7", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
! ,<br>
|
||
! {"B8", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}<br>
|
||
};<br>
|
||
=20<br>
|
||
/* TODO: speed */<br>
|
||
***************<br>
|
||
*** 482,487 ****<br>
|
||
--- 506,568 ----<br>
|
||
}<br>
|
||
=20<br>
|
||
static SANE_Status<br>
|
||
+ set_mirror (Epson_Scanner * s, int mirror)<br>
|
||
+ {<br>
|
||
+ SANE_Status status;<br>
|
||
+ unsigned char params[1];<br>
|
||
+=20<br>
|
||
+ if (!s->hw->cmd->K)<br>
|
||
+ return SANE_STATUS_GOOD;<br>
|
||
+=20<br>
|
||
+ send (s, "\033K", 2, &status);<br>
|
||
+ status =3D expect_ack (s);<br>
|
||
+ if (status !=3D SANE_STATUS_GOOD)<br>
|
||
+ return status;<br>
|
||
+ params[0] =3D mirror;<br>
|
||
+ send (s, params, 1, &status);<br>
|
||
+ status =3D expect_ack (s);<br>
|
||
+ return status;<br>
|
||
+ }<br>
|
||
+=20<br>
|
||
+ static SANE_Status<br>
|
||
+ set_sharpness (Epson_Scanner * s, int sharpness)<br>
|
||
+ {<br>
|
||
+ SANE_Status status;<br>
|
||
+ unsigned char params[1];<br>
|
||
+=20<br>
|
||
+ if (!s->hw->cmd->L)<br>
|
||
+ return SANE_STATUS_GOOD;<br>
|
||
+=20<br>
|
||
+ send (s, "\033Q", 2, &status);<br>
|
||
+ status =3D expect_ack (s);<br>
|
||
+ if (status !=3D SANE_STATUS_GOOD)<br>
|
||
+ return status;<br>
|
||
+ params[0] =3D sharpness;<br>
|
||
+ send (s, params, 1, &status);<br>
|
||
+ status =3D expect_ack (s);<br>
|
||
+ return status;<br>
|
||
+ }<br>
|
||
+=20<br>
|
||
+ static SANE_Status<br>
|
||
+ set_autosegment (Epson_Scanner * s, int autosegment)<br>
|
||
+ {<br>
|
||
+ SANE_Status status;<br>
|
||
+ unsigned char params[1];<br>
|
||
+=20<br>
|
||
+ if (!s->hw->cmd->s)<br>
|
||
+ return SANE_STATUS_GOOD;<br>
|
||
+=20<br>
|
||
+ send (s, "\033s", 2, &status);<br>
|
||
+ status =3D expect_ack (s);<br>
|
||
+ if (status !=3D SANE_STATUS_GOOD)<br>
|
||
+ return status;<br>
|
||
+ params[0] =3D autosegment;<br>
|
||
+ send (s, params, 1, &status);<br>
|
||
+ status =3D expect_ack (s);<br>
|
||
+ return status;<br>
|
||
+ }<br>
|
||
+=20<br>
|
||
+ static SANE_Status<br>
|
||
reset (Epson_Scanner * s)<br>
|
||
{<br>
|
||
SANE_Status status;<br>
|
||
***************<br>
|
||
*** 611,616 ****<br>
|
||
--- 692,712 ----<br>
|
||
=20<br>
|
||
#endif<br>
|
||
=20<br>
|
||
+ static size_t<br>
|
||
+ max_string_size (const SANE_String_Const strings[])<br>
|
||
+ {<br>
|
||
+ size_t size, max_size =3D 0;<br>
|
||
+ int i;<br>
|
||
+=20<br>
|
||
+ for (i =3D 0; strings[i]; ++i)<br>
|
||
+ {<br>
|
||
+ size =3D strlen (strings[i]) + 1;<br>
|
||
+ if (size > max_size)<br>
|
||
+ max_size =3D size;<br>
|
||
+ }<br>
|
||
+ return max_size;<br>
|
||
+ }<br>
|
||
+=20<br>
|
||
#if 1<br>
|
||
static EpsonHdr=20<br>
|
||
command (Epson_Scanner * s, const u_char * cmd, size_t cmd_size, SANE_Sta=<br>
|
||
tus * status)<br>
|
||
***************<br>
|
||
*** 932,938 ****<br>
|
||
{<br>
|
||
{0, 0x00, 0x30, 1},<br>
|
||
{0, 0x00, 0x30, 8},<br>
|
||
! {1, 0x02, 0x00, 8},<br>
|
||
};<br>
|
||
=20<br>
|
||
static const SANE_String_Const mode_list[] =3D<br>
|
||
--- 1028,1034 ----<br>
|
||
{<br>
|
||
{0, 0x00, 0x30, 1},<br>
|
||
{0, 0x00, 0x30, 8},<br>
|
||
! {1, 0x02, 0x00, 8}<br>
|
||
};<br>
|
||
=20<br>
|
||
static const SANE_String_Const mode_list[] =3D<br>
|
||
***************<br>
|
||
*** 952,958 ****<br>
|
||
0x80,<br>
|
||
0x90,<br>
|
||
0xa0,<br>
|
||
! 0xb0<br>
|
||
};<br>
|
||
=20<br>
|
||
static const SANE_String_Const halftone_list[] =3D<br>
|
||
--- 1048,1059 ----<br>
|
||
0x80,<br>
|
||
0x90,<br>
|
||
0xa0,<br>
|
||
! 0xb0,<br>
|
||
! 0x03,<br>
|
||
! #if 0<br>
|
||
! 0xc0,<br>
|
||
! 0xd0,<br>
|
||
! #endif<br>
|
||
};<br>
|
||
=20<br>
|
||
static const SANE_String_Const halftone_list[] =3D<br>
|
||
***************<br>
|
||
*** 974,979 ****<br>
|
||
--- 1075,1085 ----<br>
|
||
"Dither B",<br>
|
||
"Dither C",<br>
|
||
"Dither D",<br>
|
||
+ "Text Enhanced Technology",<br>
|
||
+ #if 0<br>
|
||
+ "Download pattern A",<br>
|
||
+ "Download pattern B",<br>
|
||
+ #endif<br>
|
||
NULL<br>
|
||
};<br>
|
||
=20<br>
|
||
***************<br>
|
||
*** 982,988 ****<br>
|
||
0x00,<br>
|
||
0x10,<br>
|
||
0x20,<br>
|
||
! 0x30,<br>
|
||
};<br>
|
||
=20<br>
|
||
static const SANE_String_Const dropout_list[] =3D<br>
|
||
--- 1088,1094 ----<br>
|
||
0x00,<br>
|
||
0x10,<br>
|
||
0x20,<br>
|
||
! 0x30<br>
|
||
};<br>
|
||
=20<br>
|
||
static const SANE_String_Const dropout_list[] =3D<br>
|
||
***************<br>
|
||
*** 999,1012 ****<br>
|
||
=20<br>
|
||
static const SANE_String_Const brightness_list[] =3D<br>
|
||
{<br>
|
||
! "Very light"<br>
|
||
! ,"Lighter"<br>
|
||
! ,"Light"<br>
|
||
! ,"Normal"<br>
|
||
! ,"Dark"<br>
|
||
! ,"Darker"<br>
|
||
! ,"Very dark"<br>
|
||
! ,NULL<br>
|
||
};<br>
|
||
=20<br>
|
||
static SANE_Status<br>
|
||
--- 1105,1185 ----<br>
|
||
=20<br>
|
||
static const SANE_String_Const brightness_list[] =3D<br>
|
||
{<br>
|
||
! "Very light",<br>
|
||
! "Lighter",<br>
|
||
! "Light",<br>
|
||
! "Normal",<br>
|
||
! "Dark",<br>
|
||
! "Darker",<br>
|
||
! "Very dark",<br>
|
||
! NULL<br>
|
||
! };<br>
|
||
!=20<br>
|
||
! static int sharpness_params[] =3D<br>
|
||
! {<br>
|
||
! 0xfe,<br>
|
||
! 0xff,<br>
|
||
! 0x00,<br>
|
||
! 0x01,<br>
|
||
! 0x02<br>
|
||
! };<br>
|
||
!=20<br>
|
||
! static const SANE_String_Const sharpness_list[] =3D<br>
|
||
! {<br>
|
||
! "Defocus",<br>
|
||
! "Defocus slightly",<br>
|
||
! "Normal",<br>
|
||
! "Sharpness slightly",<br>
|
||
! "Sharpness",<br>
|
||
! NULL<br>
|
||
! };<br>
|
||
!=20<br>
|
||
! static int gamma_params[] =3D<br>
|
||
! {<br>
|
||
! 0x01,<br>
|
||
! 0x02,<br>
|
||
! #if 0 =20<br>
|
||
! 0x03,<br>
|
||
! 0x04,<br>
|
||
! #endif =20<br>
|
||
! 0x00,<br>
|
||
! 0x10,<br>
|
||
! 0x20<br>
|
||
! };<br>
|
||
!=20<br>
|
||
! static const SANE_String_Const gamma_list[] =3D<br>
|
||
! {<br>
|
||
! "CRT A, bi-level data",<br>
|
||
! "CRT B, multi-level data",<br>
|
||
! #if 0<br>
|
||
! "User defined table, gamma =3D 1.0",<br>
|
||
! "User defined table, gamma =3D 1.8",<br>
|
||
! #endif =20<br>
|
||
! "High density printer",<br>
|
||
! "Low density printer",<br>
|
||
! "High contrast printer",<br>
|
||
! NULL<br>
|
||
! };<br>
|
||
!=20<br>
|
||
! static int color_params[] =3D<br>
|
||
! {<br>
|
||
! 0x00,<br>
|
||
! 0x01,<br>
|
||
! 0x10,<br>
|
||
! 0x20,<br>
|
||
! 0x40,<br>
|
||
! 0x80<br>
|
||
! };<br>
|
||
!=20<br>
|
||
! static const SANE_String_Const color_list[] =3D<br>
|
||
! {<br>
|
||
! "No Correction",<br>
|
||
! "User defined",<br>
|
||
! "Impact-dot printers",<br>
|
||
! "Thermal printers",<br>
|
||
! "Inkjet printers",<br>
|
||
! "CRT monitors",<br>
|
||
! NULL<br>
|
||
};<br>
|
||
=20<br>
|
||
static SANE_Status<br>
|
||
***************<br>
|
||
*** 1135,1140 ****<br>
|
||
--- 1308,1371 ----<br>
|
||
s->opt[OPT_BR_Y].constraint.range =3D &s->hw->y_range;<br>
|
||
s->val[OPT_BR_Y] =3D s->hw->y_range.max;<br>
|
||
=20<br>
|
||
+ /* sharpness */<br>
|
||
+ s->opt[OPT_SHARPNESS].name =3D "sharpness";<br>
|
||
+ s->opt[OPT_SHARPNESS].title =3D "Sharpness";<br>
|
||
+ s->opt[OPT_SHARPNESS].desc =3D "Control the sharpness of the image";<br>
|
||
+ s->opt[OPT_SHARPNESS].type =3D SANE_TYPE_STRING;<br>
|
||
+ s->opt[OPT_SHARPNESS].size =3D max_string_size(sharpness_list);<br>
|
||
+ s->opt[OPT_SHARPNESS].constraint_type =3D SANE_CONSTRAINT_STRING_LIST;<br>
|
||
+ s->opt[OPT_SHARPNESS].constraint.string_list =3D sharpness_list;<br>
|
||
+ s->val[OPT_SHARPNESS] =3D 2; /* normal */<br>
|
||
+=20<br>
|
||
+ /* gamma correction */<br>
|
||
+ s->opt[OPT_GAMMA].name =3D "gamma";<br>
|
||
+ s->opt[OPT_GAMMA].title =3D "Gamma Correction";<br>
|
||
+ s->opt[OPT_GAMMA].desc =3D "Control the gamma correction";<br>
|
||
+ s->opt[OPT_GAMMA].type =3D SANE_TYPE_STRING;<br>
|
||
+ s->opt[OPT_GAMMA].size =3D max_string_size(gamma_list);<br>
|
||
+ s->opt[OPT_GAMMA].constraint_type =3D SANE_CONSTRAINT_STRING_LIST;<br>
|
||
+ s->opt[OPT_GAMMA].constraint.string_list =3D gamma_list;<br>
|
||
+ s->val[OPT_GAMMA] =3D 0; /* CRT 1 */<br>
|
||
+=20<br>
|
||
+ /* color correction */<br>
|
||
+ s->opt[OPT_COLOR].name =3D "color";<br>
|
||
+ s->opt[OPT_COLOR].title =3D "Color Correction";<br>
|
||
+ s->opt[OPT_COLOR].desc =3D "Control the color correction";<br>
|
||
+ s->opt[OPT_COLOR].type =3D SANE_TYPE_STRING;<br>
|
||
+ s->opt[OPT_COLOR].size =3D max_string_size(color_list);<br>
|
||
+ s->opt[OPT_COLOR].constraint_type =3D SANE_CONSTRAINT_STRING_LIST;<br>
|
||
+ s->opt[OPT_COLOR].constraint.string_list =3D color_list;<br>
|
||
+ s->val[OPT_COLOR] =3D 5; /* CRT monitor */<br>
|
||
+=20<br>
|
||
+ /* "Misc" group: */<br>
|
||
+=20<br>
|
||
+ s->opt[OPT_MISC_GROUP].title =3D "Misc";<br>
|
||
+ s->opt[OPT_MISC_GROUP].desc =3D "";<br>
|
||
+ s->opt[OPT_MISC_GROUP].type =3D SANE_TYPE_GROUP;<br>
|
||
+ s->opt[OPT_MISC_GROUP].cap =3D SANE_CAP_ADVANCED;<br>
|
||
+=20<br>
|
||
+ /* mirroring */<br>
|
||
+ s->opt[OPT_MIRROR].name =3D "mirror";<br>
|
||
+ s->opt[OPT_MIRROR].title =3D "Mirror Image";<br>
|
||
+ s->opt[OPT_MIRROR].desc =3D "Mirror the image horizontally";<br>
|
||
+ s->opt[OPT_MIRROR].type =3D SANE_TYPE_BOOL;<br>
|
||
+ s->opt[OPT_MIRROR].size =3D sizeof(SANE_Word);<br>
|
||
+ s->opt[OPT_MIRROR].constraint_type =3D SANE_CONSTRAINT_NONE;<br>
|
||
+ s->val[OPT_MIRROR] =3D SANE_FALSE;<br>
|
||
+=20<br>
|
||
+ /* auto segmentation */<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].name =3D "aas";<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].title =3D "AAS";<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].desc =3D "AAS";<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].type =3D SANE_TYPE_BOOL;<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].size =3D sizeof(SANE_Word);<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].constraint_type =3D SANE_CONSTRAINT_NONE;<br>
|
||
+ s->val[OPT_AUTOSEGMENT] =3D SANE_FALSE;<br>
|
||
+ /* disable AAS control for scanners that are don't have this capability=<br>
|
||
*/<br>
|
||
+ if (!s->hw->cmd->s)<br>
|
||
+ s->opt[OPT_AUTOSEGMENT].cap |=3D SANE_CAP_INACTIVE;<br>
|
||
+=20<br>
|
||
return SANE_STATUS_GOOD;<br>
|
||
}<br>
|
||
=20<br>
|
||
***************<br>
|
||
*** 1225,1236 ****<br>
|
||
--- 1456,1472 ----<br>
|
||
case OPT_TL_Y:<br>
|
||
case OPT_BR_X:<br>
|
||
case OPT_BR_Y:<br>
|
||
+ case OPT_MIRROR:<br>
|
||
+ case OPT_AUTOSEGMENT:<br>
|
||
*(SANE_Word *) value =3D s->val[option];<br>
|
||
break;<br>
|
||
case OPT_MODE:<br>
|
||
case OPT_HALFTONE:<br>
|
||
case OPT_DROPOUT:<br>
|
||
case OPT_BRIGHTNESS:<br>
|
||
+ case OPT_SHARPNESS:<br>
|
||
+ case OPT_GAMMA:<br>
|
||
+ case OPT_COLOR:<br>
|
||
strcpy ((char *) value,<br>
|
||
s->opt[option].constraint.string_list[s->val[option]]);<br>
|
||
break;<br>
|
||
***************<br>
|
||
*** 1284,1294 ****<br>
|
||
if (info !=3D NULL)<br>
|
||
*info |=3D SANE_INFO_RELOAD_PARAMS;<br>
|
||
break;<br>
|
||
case OPT_MODE:<br>
|
||
if (mode_params[optval - mode_list].depth !=3D 1)<br>
|
||
! s->opt[OPT_HALFTONE].cap |=3D SANE_CAP_INACTIVE;<br>
|
||
else<br>
|
||
! s->opt[OPT_HALFTONE].cap &=3D ~SANE_CAP_INACTIVE;<br>
|
||
if (mode_params[optval - mode_list].color)<br>
|
||
s->opt[OPT_DROPOUT].cap |=3D SANE_CAP_INACTIVE;<br>
|
||
else<br>
|
||
--- 1520,1556 ----<br>
|
||
if (info !=3D NULL)<br>
|
||
*info |=3D SANE_INFO_RELOAD_PARAMS;<br>
|
||
break;<br>
|
||
+ case OPT_MIRROR:<br>
|
||
+ case OPT_AUTOSEGMENT:<br>
|
||
+ s->val[option] =3D *(SANE_Word *) value;<br>
|
||
+ break;<br>
|
||
case OPT_MODE:<br>
|
||
if (mode_params[optval - mode_list].depth !=3D 1)<br>
|
||
! {<br>
|
||
! s->opt[OPT_HALFTONE].cap |=3D SANE_CAP_INACTIVE;<br>
|
||
! /*<br>
|
||
! * We are switching to a multi-bit mode. If the=20<br>
|
||
! * scanner is in grayscale mode, then set the default=20<br>
|
||
! * to CRT B (multi bit). This mimics the old<br>
|
||
! * behavior where CRT A was used for single bit and<br>
|
||
! * CRT B for multi bit. If the user selected anything<br>
|
||
! * else, then the gamma setting is not modified.<br>
|
||
! */<br>
|
||
! if (!mode_params[optval - mode_list].color)<br>
|
||
! s->val[OPT_GAMMA] =3D 1;<br>
|
||
! }<br>
|
||
else<br>
|
||
! {<br>
|
||
! s->opt[OPT_HALFTONE].cap &=3D ~SANE_CAP_INACTIVE;<br>
|
||
! /*<br>
|
||
! * We are switching to a single-bit mode. Set the=20<br>
|
||
! * default to CRT A (single bit). This mimics the old<br>
|
||
! * behavior where CRT A was used for single bit and<br>
|
||
! * CRT B for multi bit. If the user selected anything<br>
|
||
! * else, then the gamma setting is not modified.<br>
|
||
! */<br>
|
||
! s->val[OPT_GAMMA] =3D 0;<br>
|
||
! }<br>
|
||
if (mode_params[optval - mode_list].color)<br>
|
||
s->opt[OPT_DROPOUT].cap |=3D SANE_CAP_INACTIVE;<br>
|
||
else<br>
|
||
***************<br>
|
||
*** 1299,1304 ****<br>
|
||
--- 1561,1569 ----<br>
|
||
case OPT_HALFTONE:<br>
|
||
case OPT_DROPOUT:<br>
|
||
case OPT_BRIGHTNESS:<br>
|
||
+ case OPT_COLOR:<br>
|
||
+ case OPT_GAMMA:<br>
|
||
+ case OPT_SHARPNESS:<br>
|
||
s->val[option] =3D optval - s->opt[option].constraint.string_list;<br>
|
||
break;<br>
|
||
default:<br>
|
||
***************<br>
|
||
*** 1410,1425 ****<br>
|
||
DBG (1, "sane_start: set_brightness failed: %s\n", sane_strstatus (=<br>
|
||
status));<br>
|
||
return status;<br>
|
||
}<br>
|
||
! status =3D set_gamma (s, s->params.depth =3D=3D 1 ? 1 : 2);<br>
|
||
if (status !=3D SANE_STATUS_GOOD)<br>
|
||
{<br>
|
||
DBG (1, "sane_start: set_gamma failed: %s\n", sane_strstatus (statu=<br>
|
||
s));<br>
|
||
return status;<br>
|
||
}<br>
|
||
! status =3D set_color (s, 0x80);<br>
|
||
if (status !=3D SANE_STATUS_GOOD)<br>
|
||
{<br>
|
||
DBG (1, "sane_start: set_color failed: %s\n", sane_strstatus (statu=<br>
|
||
s));<br>
|
||
return status;<br>
|
||
}<br>
|
||
status =3D set_speed (s, mode_params[s->val[OPT_MODE]].depth =3D=3D 1 ?=<br>
|
||
1 : 0);<br>
|
||
--- 1675,1708 ----<br>
|
||
DBG (1, "sane_start: set_brightness failed: %s\n", sane_strstatus (=<br>
|
||
status));<br>
|
||
return status;<br>
|
||
}<br>
|
||
! status =3D set_gamma (s, gamma_params[s->val[OPT_GAMMA]]);<br>
|
||
if (status !=3D SANE_STATUS_GOOD)<br>
|
||
{<br>
|
||
DBG (1, "sane_start: set_gamma failed: %s\n", sane_strstatus (statu=<br>
|
||
s));<br>
|
||
return status;<br>
|
||
}<br>
|
||
! status =3D set_color (s, color_params[s->val[OPT_COLOR]]);<br>
|
||
if (status !=3D SANE_STATUS_GOOD)<br>
|
||
{<br>
|
||
DBG (1, "sane_start: set_color failed: %s\n", sane_strstatus (statu=<br>
|
||
s));<br>
|
||
+ return status;<br>
|
||
+ }<br>
|
||
+ status =3D set_mirror (s, s->val[OPT_MIRROR]);<br>
|
||
+ if (status !=3D SANE_STATUS_GOOD)<br>
|
||
+ {<br>
|
||
+ DBG (1, "sane_start: set_mirror failed: %s\n", sane_strstatus (stat=<br>
|
||
us));<br>
|
||
+ return status;<br>
|
||
+ }<br>
|
||
+ status =3D set_autosegment (s, s->val[OPT_AUTOSEGMENT]);<br>
|
||
+ if (status !=3D SANE_STATUS_GOOD)<br>
|
||
+ {<br>
|
||
+ DBG (1, "sane_start: set_autosegment failed: %s\n", sane_strstatus =<br>
|
||
(status));<br>
|
||
+ return status;<br>
|
||
+ }<br>
|
||
+ status =3D set_sharpness (s, sharpness_params[s->val[OPT_SHARPNESS]]);<br>
|
||
+ if (status !=3D SANE_STATUS_GOOD)<br>
|
||
+ {<br>
|
||
+ DBG (1, "sane_start: set_sharpness failed: %s\n", sane_strstatus (s=<br>
|
||
tatus));<br>
|
||
return status;<br>
|
||
}<br>
|
||
status =3D set_speed (s, mode_params[s->val[OPT_MODE]].depth =3D=3D 1 ?=<br>
|
||
1 : 0);<br>
|
||
*** epson.h.ORIG Sat Dec 25 09:22:41 1999<br>
|
||
--- epson.h Sat Dec 25 19:44:03 1999<br>
|
||
***************<br>
|
||
*** 55,61 ****<br>
|
||
{<br>
|
||
char *level;<br>
|
||
=20<br>
|
||
! int I:1 /* request identity */<br>
|
||
,F:1 /* request status */<br>
|
||
,S:1 /* request condition */<br>
|
||
,C:1 /* set color mode */<br>
|
||
--- 55,64 ----<br>
|
||
{<br>
|
||
char *level;<br>
|
||
=20<br>
|
||
! int=20<br>
|
||
! K:1 /* set mirroring */<br>
|
||
! ,s:1 /* auto area segmentation */<br>
|
||
! ,I:1 /* request identity */<br>
|
||
,F:1 /* request status */<br>
|
||
,S:1 /* request condition */<br>
|
||
,C:1 /* set color mode */<br>
|
||
***************<br>
|
||
*** 84,95 ****<br>
|
||
--- 87,104 ----<br>
|
||
OPT_HALFTONE,<br>
|
||
OPT_DROPOUT,<br>
|
||
OPT_BRIGHTNESS,<br>
|
||
+ OPT_GAMMA,<br>
|
||
+ OPT_COLOR,<br>
|
||
+ OPT_SHARPNESS,<br>
|
||
OPT_RESOLUTION,<br>
|
||
OPT_GEOMETRY_GROUP,<br>
|
||
OPT_TL_X,<br>
|
||
OPT_TL_Y,<br>
|
||
OPT_BR_X,<br>
|
||
OPT_BR_Y,<br>
|
||
+ OPT_MISC_GROUP,<br>
|
||
+ OPT_MIRROR,<br>
|
||
+ OPT_AUTOSEGMENT,<br>
|
||
NUM_OPTIONS<br>
|
||
};<br>
|
||
=20<br>
|
||
<p>
|
||
--uAKRQypu60I7Lcqm--<br>
|
||
<p>
|
||
--DBIVS5p969aUjpLe<br>
|
||
Content-Type: application/pgp-signature<br>
|
||
<p>
|
||
-----BEGIN PGP SIGNATURE-----<br>
|
||
Version: PGP 6.5.2<br>
|
||
<p>
|
||
iQCVAwUBOGfBVx4KmkKPBVxtAQEQSgP/R4m0PQws8kjy03dX772TTDWwxH/seE4n<br>
|
||
6+BI78R8ZhA+DHG+QzfVFUePWVZFaF+NPRoxw2vZpnwrW7TVKutEk2NFMxjfb0qw<br>
|
||
u8ZGkX24O+a2IPOP7/K+INxKrlJO0N8gYkYh6vobrGXlflHJxH+/tnd6TX9Fakff<br>
|
||
uuy3jiMAQOI=<br>
|
||
=ld5o<br>
|
||
-----END PGP SIGNATURE-----<br>
|
||
<p>
|
||
--DBIVS5p969aUjpLe--<br>
|
||
<p>
|
||
<pre>
|
||
--
|
||
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
|
||
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
|
||
</pre>
|
||
<!-- body="end" -->
|
||
<p>
|
||
<ul>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0181.html">David Turley: "compile problem"</a>
|
||
<li> <b>Previous message:</b> <a href="0179.html">Leonard Bottleman: "Re: Update for Epson Backend / Perfection 1200S Support"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|