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 is 1.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. shadow has to live in the range [0..maxin]. her default is 0.
  • highlight β€” this defines the maximum input value that still produces an output value smaller than maxout. highlight must be in the range [0..maxin] and larger than shadow. her default is the same as maxin (so 16383 if 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 β†’ maxin must be 255
    • 10 bits β†’ 1023
    • 12 bits β†’ 4095
    • 14 bits β†’ 16383

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 of scanimage -h to figure out what maxout needs to be. her default is 255.

πŸ”₯ 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