Output formats

 

 
 
 

 

Supported output formats:

You can select the output format by the filename extension (menu = "by ext") or by selecting the file format in the menu. Possible are: pnm, png, ps, jpeg, raw and tiff.
Pnm and ps (and raw) are always available. The other formats are only available if necessary libraries are present (at compilation time AND while xsane is executed). For png you need libpng and libz, for jpeg you need jpeglib, for tiff you need libtiff.
The raw format is a 16 bit binary format. The pnm formats only support 8 bit binary and ascii and 16 bit ascii. There are no programs that do support the raw format, you have to write your own application for it. The fileheader looks like this:
SANE_RGB_RAW\n
100 200\n
65535\n
where 100 is the with in pixels and 200 is the number of lines. The image data starts in the next following line in the order RRGGBBRRGGBBRRGGBB... where "RR" is a 16 bit value for red, "GG" for green and "BB" for blue.  On big endian machines the first byte is the MSB, on little endian machines it is the LSB.
The supported output formats depend on the bit depth of the scanned image:

1 bit/pixel black/white mode:

pnm = pbm, png
ps, jpeg and tiff are converted to 8 bit grayscale mode.

8 bits/pixel grayscale mode:

pnm = pgm, png, ps, jpeg and tiff

16 bits/pixel grayscale mode (9-16 bits):

pnm (ascii), png and raw

24 bits/pixel RGB-color mode (8 bits/color):

pnm = ppm, png, ps, jpeg and tiff

48 bits/pixel RGB-color mode (9-16 bits/color):

pnm (ascii), png and raw

32 bits/pixel RGBA-color mode (8 bits/color):

rgba (raw) and png with alpha channel

64 bits/pixel RGBA-color mode (9-16 bits/color):

rgba (raw) and png with alpha channel


INDEX