kopia lustrzana https://gitlab.com/sane-project/backends
2002-08-18 Oliver Rauch <Oliver.Rauch@rauch-domain.de>
* tools/gamma4scanimage.c: Bugfix (atof->atoi) * tools/README: added gamma4scanimage * doc/Makefile.in: added manpage for gamma4scanimage * doc/gamma4scanimage.man: added manpage for gamma4scanimageDEVEL_2_0_BRANCH-1
rodzic
df3b61cd20
commit
69d6156402
|
@ -36,7 +36,7 @@ DISTCLEAN_FILES = @DISTCLEAN_FILES@
|
|||
|
||||
@SET_MAKE@
|
||||
|
||||
SECT1 = saned.1 scanimage.1 sane-find-scanner.1
|
||||
SECT1 = saned.1 scanimage.1 sane-find-scanner.1 gamma4scanimage.1
|
||||
SECT5 = sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-as6e.5 sane-dll.5 \
|
||||
sane-dc25.5 sane-dmc.5 sane-epson.5 sane-hp.5 sane-gphoto2.5 \
|
||||
sane-leo.5 sane-matsushita.5 sane-microtek.5 \
|
||||
|
@ -85,7 +85,8 @@ DISTFILES = Makefile.in backend-writing.txt descriptions.txt \
|
|||
sane-st400.man sane-tamarack.man sane-umax.man sane-umax1220u.man \
|
||||
sane-umax_pp.man sane-usb.man sane-v4l.man sane.man sane.png \
|
||||
sane.tex saned.man scanimage.man sane-sceptre.man sane-canon_pp.man \
|
||||
sane-teco1.man sane-teco3.man sane-test.man sane-sp15c.man sane-hpsj5s.man
|
||||
sane-teco1.man sane-teco3.man sane-test.man sane-sp15c.man sane-hpsj5s.man \
|
||||
gamma4scanimage.man
|
||||
|
||||
.PHONY: all clean depend dist distclean html html-man install \
|
||||
install-mostang sane-html uninstall
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
.TH gamma4scanimage 1 "18 august 2002"
|
||||
.IX sane-umax
|
||||
|
||||
.SH NAME
|
||||
gamma4scanimage
|
||||
|
||||
.SH ABOUT THIS FILE
|
||||
|
||||
This file gives a short information about the usage and options of gamma4scanimage
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
The tool
|
||||
.B gamma4scanimage
|
||||
creates a gamma table in the format expected by scanimage. You can define a
|
||||
.BR gamma,
|
||||
a
|
||||
.BR shadow
|
||||
and a
|
||||
.BR highlight
|
||||
value. You also have to specify the size (
|
||||
.BR maxin
|
||||
) and maximum output value (
|
||||
.BR maxout
|
||||
)
|
||||
of the gamma table.
|
||||
|
||||
Usage: gamma4scanimage gamma [shadow [highlight [maxin [maxout]]]]
|
||||
|
||||
.BR gamma
|
||||
is a floating point value, neutral value is 1.0, if the value is larger than 1.0
|
||||
then the image gets brighter.
|
||||
|
||||
.BR shadow
|
||||
defines the minmum input value that is necessary to create an output value larger than zero.
|
||||
shadow has to be in the range [0..maxin].
|
||||
|
||||
.BR highlight
|
||||
defines the maximum input value that produces an output value smaller than maxout.
|
||||
highlight has to be in the range [0..maxin], highlight has to be larger than shadow.
|
||||
|
||||
.BR maxin
|
||||
defines the size of the gamma table. The size depends on the scanner/backend.
|
||||
If the scanner uses 8 bits gamma input then maxin has to be set to 255, for 10 bits
|
||||
1023, for 12 bits 4095, for 14 bits 16383. The default is 16383.
|
||||
To find out what value maxin has to be call scanimage with a very large gamma table
|
||||
[0]0-99999[255] then scanimage prints an error message with the needed size of the
|
||||
gamma table.
|
||||
|
||||
.BR maxout
|
||||
defines the maximum output value. Take a look at the output of scanimage -h to find out
|
||||
what maxout has to be.
|
||||
|
||||
.SH Example:
|
||||
scanimage --custom-gamma=yes --gamma-table `gamma4scanimage 1.8 0 11500 16383 255` >image.pnm
|
||||
|
||||
.SH SEE ALSO
|
||||
scanimage(7)
|
||||
|
||||
.SH AUTHOR
|
||||
|
||||
Oliver Rauch
|
||||
|
||||
.SH EMAIL-CONTACT
|
||||
Oliver.Rauch@Rauch-Domain.DE
|
|
@ -26,6 +26,10 @@ This directory contains various tools that may be useful:
|
|||
1600P and 2000P, without using the backend. So that
|
||||
scanner protocol can be tested directly.
|
||||
|
||||
gamma4scanimage: creates a gamma table in the format expected by scanimage.
|
||||
You can define a gamma value, shadow and highlight.
|
||||
Take a look at manual page gamma4scanimage for further information.
|
||||
|
||||
Maybe useful for SANE developers:
|
||||
|
||||
sane-desc:
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
double gamma = 1.0;
|
||||
int maxin = 16383; /* 14 bit gamma input */
|
||||
int maxout = 255; /* 8 bit gamma output */
|
||||
int shadow = 0;
|
||||
int highlight = 16383;
|
||||
int maxin = 16383;
|
||||
int maxout = 255;
|
||||
int highlight = maxin;
|
||||
int in, out;
|
||||
float f;
|
||||
|
||||
|
@ -52,22 +52,22 @@ int main(int argc, char **argv)
|
|||
|
||||
if (argc>2)
|
||||
{
|
||||
shadow = atof(argv[2]);
|
||||
shadow = atoi(argv[2]);
|
||||
}
|
||||
|
||||
if (argc>3)
|
||||
{
|
||||
highlight = atof(argv[3]);
|
||||
highlight = atoi(argv[3]);
|
||||
}
|
||||
|
||||
if (argc>4)
|
||||
{
|
||||
maxin = atof(argv[4]);
|
||||
maxin = atoi(argv[4]);
|
||||
}
|
||||
|
||||
if (argc>5)
|
||||
{
|
||||
maxout = atof(argv[5]);
|
||||
maxout = atoi(argv[5]);
|
||||
}
|
||||
|
||||
if (shadow < 0)
|
||||
|
|
Ładowanie…
Reference in New Issue