[sane-devel] Sane API

Jürgen Mellinger juergen.mellinger at t-online.de
Wed Oct 14 12:30:32 BST 2020

Hi Olaf,

thank you for your answer.

> I guess what you as a user really want is a frontend giving you an
> option to set a gamma correction some way.  Single value for RGB, maybe
> three values for R, G and B each or even hand-crafted profiles.  What
> you as a frontend implementer really want is
> - a way to tell the backend to not muck with gamma at all and do
>   everything in software yourself, or
> - a way to pass those settings to the backend and let that figure out
>   the best way to achieve what it's been asked to do (maybe with a hint
>   as to what constitutes best, e.g. speed, memory, image quality, etc.)

No, that is not what I want. As a user, I want an option in the frontend that
results in a reasonable default gamma correction, so I don’t have to choose
anything in order to get a reasonably looking scan. Especially, I don’t want
to calibrate my individual scanner just to obtain information that is the same
for all scanners of that kind.

To put it differently, the information about a scanner’s native gamma value, 
given by its CCD properties, is a natural property of the backend. Any gamma
correction applied by hardware and/or in the backend is also a natural property
of the backend.
There should be a way to communicate resulting gamma from the backend to a
frontend, so it can choose an appropriate default gamma correction.

> The SANE backends are very much like a filter between the device and
> your frontend.  There was also talk about "middleware" and if that
> enters the picture you really need to make sure who's going to take
> responsibility for what so that what arrives at the frontend is the way
> it's supposed to be.

I am aware that multiple gamma correction is detrimental for quality, this is why
an option to choose the gamma of backend output would be preferable over
a read-only option to obtain the actual gamma.


>>> Am 13.10.2020 um 10:45 schrieb Olaf Meeuwissen <paddy-hack at member.fsf.org>:
>>> Hi Jürgen,
>>> Jürgen Mellinger writes:
>>>> Specifying a gamma value for acquired scan data would greatly add to
>>>> usability as well.
>>> That's already in the version 2 draft.  See
>>> https://sane-project.gitlab.io/standard/draft-2/api.html#gamma-table-options
>>> https://sane-project.gitlab.io/standard/draft-2/api.html#analog-gamma
>>> Both are for device-side gamma support and the standard discourages
>>> emulation in the backend of the former and forbids for the latter.
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
> GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
> Support Free Software                        https://my.fsf.org/donate
> Join the Free Software Foundation              https://my.fsf.org/join

More information about the sane-devel mailing list