gamma4scanimage(1)
π gamma4scanimage β the SANE era π
okay bestie, so this is gamma4scanimage(1), part of SANE β Scanner Access Now Easy (which, iconic name, they ate with that acronym). she's a lil command-line cutie whose whole job is making gamma tables for scanimage. no cap.
β¨ NAME β¨
gamma4scanimage β create a gamma table for scanimage
π SYNOPSIS π
gamma4scanimage gamma [shadow [highlight [maxin [maxout]]]]
π¦ DESCRIPTION π¦
so gamma4scanimage literally builds a gamma table in the exact format that scanimage expects. like, that's her whole thing. you get to define a gamma, a shadow, and a highlight value. you can also set the size of the table (maxin) and the max output value (maxout). very customizable, very main character.
gammaβ a floating point value, and the neutral, do-nothing value is1.0. if you go larger than 1.0, the image comes out brighter. β¨shadowβ this one defines the minimum input value that's actually needed to make an output value bigger than zero.shadowhas to live in the range[0..maxin]. her default is0.highlightβ this defines the maximum input value that still produces an output value smaller thanmaxout.highlightmust be in the range[0..maxin]and larger thanshadow. her default is the same asmaxin(so16383if nothing's set).maxinβ defines the size of the gamma table. ngl this depends on your scanner/backend, so listen up:- 8 bit gamma input β
maxinmust be255 - 10 bits β
1023 - 12 bits β
4095 - 14 bits β
16383
- 8 bit gamma input β
the default is 16383. and to find out what value maxin needs to be for your scanner, call scanimage(1) with a very large gamma table [0]0-[99999]255 and scanimage(1) will print an error message telling you the gamma table size it actually needs. cute, right? she snitches on herself. π
maxoutβ defines the maximum output value. take a peek at the output ofscanimage -hto figure out whatmaxoutneeds to be. her default is255.
π₯ EXAMPLE π₯
scanimage --custom-gamma=yes --gamma-table `gamma4scanimage 1.8 0 11500 16383 255` >image.pnm
periodt. that's the whole vibe.
π SEE ALSO π
π AUTHOR π
Oliver Rauch
π§ EMAIL-CONTACT π§
Oliver.Rauch@Rauch-Domain.DE
and that's a wrap, bestie π this lil page is from the SANE Scanner Access Now Easy fam, dated 10 Jul 2008 β yeah she's a vintage queen but she still serves. go make some gamma tables, you got this π«Άβ¨
π¦ where this page comes from
- alpine 3.24: sane-doc 1.4.0-r4 Β· GPL-2.0-or-later GPL-2.0-or-later-with-sane-exception Public-Domain
- arch rolling: sane 1.4.0-4 Β· GPL-2.0-or-later AND LicenseRef-GPL-2.0-or-later-with-linking-exception
- debian bookworm: sane-utils 1.2.1-2 Β· GPL-2.0-or-later WITH sane exception
- debian trixie: sane-utils 1.3.1-3+b1 Β· GPL-2.0-or-later WITH sane exception
- nixos 26.05: sane-backends 1.4.0
- nixpkgs unstable: sane-backends 1.4.0
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 Β· GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 Β· GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 Β· GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 Β· GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- ubuntu jammy: sane-utils 1.1.1-5 Β· GPL-2.0-or-later WITH sane exception
- ubuntu noble: sane-utils 1.2.1-7build4 Β· GPL-2.0-or-later WITH sane exception
- ubuntu questing: sane-utils 1.3.1-4build1
- ubuntu resolute: sane-utils 1.4.0-1ubuntu1 Β· GPL-2.0-or-later WITH sane exception
- ubuntu stonking: sane-utils 1.4.0-1ubuntu2 Β· GPL-2.0-or-later WITH sane exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms