[Openchrome-users] Brightness/contrast controls?

Gonzalo A. de la Vega gadelavega
Tue May 1 18:56:42 PDT 2007


On 5/1/07, Andrei Formiga <andrei.formiga at gmail.com> wrote:
>
> On 5/1/07, Gonzalo A. de la Vega <gadelavega at gmail.com> wrote:
> >
> > I'll share my experience FWIW (I'm a telecom engineer, so my programming
> > sucks)
> > I had a similar problem with my laptop's display, and I ended up "hard"
> > conding the contrast/brightnes correction into the driver.
>
> That's precisely what I'm thinking about doing, for the time being. I
> can't wait until the right way is in place. Did you do it for the
> openchrome drivers? Any pointers for where I should start looking to
> play with this? Thanks.


Here is the patch against the latest svn. This is only for 24bpp, you can
easily figure out where to change it for 16bpp if you need so. Note there is
no separate brightness/contrast values, but a single factor. Maybe you could
use a file to store the multiplying factors (all 0.75 for me), and change
those. To update the B/C, you may use xgamma, which calls the function that
executes this code.

> I found no
> > "comfortable" way of using any X interface to apply a proper colormap
> (which
> > I believe would be the correct way of doing it), every time I tried to
> > change the colormap, X complained about me trying to write read only
> data.
> > I understand the solution would be a driver specific thing, but I don't
> know
> > how to do this without violating all the X programming rules.
> >
> > Gonzalo A. de la Vega
>
> --
> []s, Andrei Formiga
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wiki.openchrome.org/pipermail/openchrome-users/attachments/20070502/d42b1adc/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hardcode_bc.diff
Type: text/x-patch
Size: 765 bytes
Desc: not available
Url : http://wiki.openchrome.org/pipermail/openchrome-users/attachments/20070502/d42b1adc/hardcode_bc.bin



More information about the Openchrome-users mailing list