[sane-devel] Re: Problems about Lineart mode

Rodolfo Medina rodolfo.medina at gmail.com
Fri Jan 26 23:52:21 CET 2007

Rodolfo Medina <rodolfo.medina at gmail.com> writes:

> I scan a document with:
>  $ scanimage --mode Lineart --resolution 150 -x 215 -y 297 > document
> , so obtaining a fine image about 250Kb big. But, the problem is that MS
> Windows can't apparently see the file, and I need to send it to other people
> non Linux users. On the other hand, if I omit the `--mode Lineart' option the
> file comes up too big: 6Mb or so.
> Can anyone suggest a way to aquire a document so that the resultant file is:
> 1) readable by MS Windows;
> 2) as small as some 200Kb?

"m. allan noah" <kitno455 at gmail.com> writes:

> by default, scanimage outputs in the format 'PNM', so if they have a
> viewer for that type on windows, they can view it. if they dont, you
> can easily convert it to many other formats using a wide variety of
> utilities on your linux box. which one you choose depends on what the
> windows users will do with the file. my suggestion:
> scanimage --mode Lineart --resolution 150 -x 215 -y 297 | pnmtopng >
> document.png
> you will have to have the utility pnmtopng installed, it is part of
> the netpbm utils package.
> the files will be readable in IE.
> another option instead is to use the tiff output format of scanimage
> (--format tiff)

Thanks indeed, your suggestion seems to work perfectly.
But, when I try to use `pnmtopng' alone, with:

 # pnmtopng document.pnm

, the program fails: I get some messed output and nothing else.


More information about the sane-devel mailing list