On Sat, 19 Aug 2006, abel deuring wrote: > Shashi Kumar M.S. wrote: > > iam searching a scanner that supports at about 300 dpi and 4 bit /pixel grey > > scanner. i found from the scanner that most of the scanner support 8/16 bit > > depth in grey mode. > > > > is there any way to modify this code to support 4 bit grey scale depth per > > pixel.
Why? What constitutes a good answer might depend on it. > - look for a (documented) file format that supports 4 bit images (or > define your own format ;) > - patch scanimage or another frontend so that it can write the scan > data in the format you selected. Alternatively, you can convert > existing 8 bit images, as produced by a Sane frontend, with a > converter program. I am not aware of any 4 bit image formats, but > if they exist, you might already find such a converter in the > usual Linux distributions. Otherwise, write one. The PPM, PGM, PBM > formats (default for scanimage output) are very simple, and it is None of those formats support 4-bit data. They do support maxlevel=15 data, but the data are represented with 8-bits. PBM (P4) is one bit per pixel. If you want you could stack 4 pbm images. > quite straightforward to read them with C, Python, Perl, Java or > whichever other programming language. -- Mike [email protected] "it stands to reason that they weren't always called the ancients." -- Daniel Jackson
