Re: Gamma and xsane

Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Sun, 23 May 1999 07:09:59 +0200

Andreas Dilger wrote:

> Oliver writes:
> > If you have a 8/24 bit scanner you reduce the number of used colors.
> > On 30 or 36 bit scanners you can use small gamma value changes (0.x-1.y)
> > without loosing any or much used colors.
>
> If you subsequently convert the 30/36 bit color images to 24-bit color, you
> shouldn't have any loss of color resolution.

8 bit output 8 bit output 8 bit output
Raw 10bit,gamma=2 10bit, gamma=3 12bit, gamma=3
0 0 0 0
1 8 25 16
2 11 32 20
3 14 37 23
4 16 40 25
...
32 45 80 51

lost 20 50 30
colors
(not exact)
-----------------------------------------------
%loss 8 20 12

So gamma values between 0.5-2.0 have no relevant color resolution loss
on 10 and 12 bit scanners, but on a 10 bit scanner you loose already
20% of the colors when using a gamma value of 3.0

> > That works with linux too, but if you want that your image looks ok on other
> > systems, you have to correct the colors that they look ok without any further
> > corrections! If you use gamma=1.0 the images are all too dark!
>
> If you use PNG format images, and if xsane writes a gAMA chunk (it should!),
> then you won't have any such problems. This is one of reasons why PNG is
> becoming more popular. Also, there are other features that PNG has that
> xsane should take advantage of - like pHYs to record the original pixel
> size characteristics (dpi), sBIT to record the original bit depth, tIME to
> hold the image scanning time, tEXt to hold Software and Source comments...
> Info that xsane already has and you might need in the future when working
> with the image.
>

In the moment only sBIT is set. Others will come!

Bye
Oliver

--
EMAIL: Oliver.Rauch@Wolfsburg.DE
WWW: http://www.wolfsburg.de/~rauch

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com