sane-project-website/old-archive/2001-02/0176.html

137 wiersze
4.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Epson 610 color output truncated with scanimage</TITLE>
<META NAME="Author" CONTENT="Kees Lemmens (C.W.J.Lemmens@its.tudelft.nl)">
<META NAME="Subject" CONTENT="Re: Epson 610 color output truncated with scanimage">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Epson 610 color output truncated with scanimage</H1>
<!-- received="Sun Feb 18 04:46:55 2001" -->
<!-- isoreceived="20010218124655" -->
<!-- sent="Sun, 18 Feb 2001 13:45:31 +0100" -->
<!-- isosent="20010218124531" -->
<!-- name="Kees Lemmens" -->
<!-- email="C.W.J.Lemmens@its.tudelft.nl" -->
<!-- subject="Re: Epson 610 color output truncated with scanimage" -->
<!-- id="01021813542600.02535@giant" -->
<!-- inreplyto="Epson 610 color output truncated with scanimage" -->
<STRONG>From:</STRONG> Kees Lemmens (<A HREF="mailto:C.W.J.Lemmens@its.tudelft.nl?Subject=Re:%20Epson%20610%20color%20output%20truncated%20with%20scanimage&In-Reply-To=&lt;01021813542600.02535@giant&gt;"><EM>C.W.J.Lemmens@its.tudelft.nl</EM></A>)<BR>
<STRONG>Date:</STRONG> Sun Feb 18 2001 - 04:45:31 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0177.html">j.steindlberger@gmx.de: "Re: HP5300C - USB-problems?"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0175.html">Shea Martin: "preview in b/w"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#176">[ date ]</A>
<A HREF="index.html#176">[ thread ]</A>
<A HREF="subject.html#176">[ subject ]</A>
<A HREF="author.html#176">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>Sorry to bother you again, but I improved the scanimage color hack for Epson
<BR>
Perfection 610 somewhat to work for all resolutions (75-150-300-600).
<BR>
<P>It may be useful for other people with a Perfection 610, so that is why I
<BR>
bother you all once more.
<BR>
<P>static void
<BR>
write_pnm_header (SANE_Frame format, int width, int height, int depth)
<BR>
{
<BR>
&nbsp;&nbsp;/* The netpbm-package does not define raw image data with maxval &gt; 255. */
<BR>
&nbsp;&nbsp;/* But writing maxval 65535 for 16bit data gives at least a chance */
<BR>
&nbsp;&nbsp;/* to read the image. */
<BR>
+ #ifdef EPSON610_COLOR_HACK
<BR>
+ static int get_resolution (void);
<BR>
+ #endif
<BR>
<P>&nbsp;&nbsp;switch (format)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;case SANE_FRAME_RED:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;case SANE_FRAME_GREEN:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;case SANE_FRAME_BLUE:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;case SANE_FRAME_RGB:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf (&quot;P6\n# SANE data follows\n%d %d\n%d\n&quot;,
<BR>
+ #ifdef EPSON610_COLOR_HACK
<BR>
+ width,height -get_resolution() / 15,
<BR>
+ #else
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width,height,
<BR>
+ #endif
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(depth &lt;= 8) ? 255 : 65535);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
<BR>
<P>Now recompiling with with -DEPSON610_COLOR_HACK produces ppm files with the
<BR>
height parameter adjusted to fit (more or less) the actual image size (only for
<BR>
color !)
<BR>
<P>best regards,
<BR>
<PRE>
--
Kees Lemmens,
Email: <A HREF="mailto:C.W.J.Lemmens@its.tudelft.nl?Subject=Re:%20Epson%20610%20color%20output%20truncated%20with%20scanimage&In-Reply-To=&lt;01021813542600.02535@giant&gt;">C.W.J.Lemmens@its.tudelft.nl</A>,
WWW : <A HREF="http://ta.twi.tudelft.nl/DV/Staff/Lemmens/index.html">http://ta.twi.tudelft.nl/DV/Staff/Lemmens/index.html</A>
Home : 010-4742919/4740254, Office: 015-2787224, Fax/XOIP: 020-8666099
<P>--
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?Subject=Re:%20Epson%20610%20color%20output%20truncated%20with%20scanimage&In-Reply-To=&lt;01021813542600.02535@giant&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0177.html">j.steindlberger@gmx.de: "Re: HP5300C - USB-problems?"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0175.html">Shea Martin: "preview in b/w"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#176">[ date ]</A>
<A HREF="index.html#176">[ thread ]</A>
<A HREF="subject.html#176">[ subject ]</A>
<A HREF="author.html#176">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Sun Feb 18 2001 - 04:51:59 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>