Page 1 of 1

invert screen colors?

Posted: Thu Oct 25, 2018 5:48 pm
by erg
Hi all,

Is it possible to invert screen colors in Raspbian at all?

I've tried 'xcalib -i -a' but no joy. I've the libxxf86vm-dev package which seems necessary for xcalib to work installed, btw

Is there a way?

Re: invert screen colors?

Posted: Thu Oct 25, 2018 6:59 pm
by jamesh
Bizarrely I was working on this in the firmware only today. I'm planning to add gamma correction (which you can use to invert) and colour correction matrix correction to the firmware over the next week. Takes a bit longer to get it out to the public.

This is on the entire output, not selective at all.

Re: invert screen colors?

Posted: Thu Oct 25, 2018 8:11 pm
by erg
Awesome. Can't wait. It does come handy, I'm keeping fingers crossed, I guess, that much I can do to help ...

Re: invert screen colors?

Posted: Fri Dec 07, 2018 8:14 am
by erg
jamesh:
Is there any progress on that? Are we going to see this feature anytime soon? Could you be so kind and let know on this forum if and when this is released and how to use it?
Regards,
erg

Re: invert screen colors?

Posted: Fri Dec 07, 2018 10:20 am
by jamesh
Hmm, forgotten about that one. Thought it had been merged. Will check.

Re: invert screen colors?

Posted: Fri Dec 07, 2018 11:33 am
by jamesh
OK, not merged yet. Might have to make a couple of small changes to get through code review.

There will be a palette function (mapping RGB->RGB which you can use to invert) and also the ability to set a colour correction matrix.

Re: invert screen colors?

Posted: Fri Dec 07, 2018 1:43 pm
by jamesh
jamesh wrote:
Fri Dec 07, 2018 11:33 am
OK, not merged yet. Might have to make a couple of small changes to get through code review.

There will be a palette function (mapping RGB->RGB which you can use to invert) and also the ability to set a colour correction matrix.
Note, CCM is done via config.txt, palette requires sending data to a mailbox - see here https://github.com/JamesH65/setgamma/bl ... setgamma.c

Re: invert screen colors?

Posted: Tue Feb 19, 2019 3:54 am
by dandock
Is this something I can test now? Being able to invert colors with the pi itself will help me avoid a hardware solution!

Thanks!

Re: invert screen colors?

Posted: Thu Feb 21, 2019 9:22 am
by tvjon
Yes, it actually looks rather useful.

For example if you need something on screen to attract your attention, just do

$ sudo ./setgamma -l 7 -d 1000 -c 3

There are several

mailbox.h

files around in rpi land, but you need the one jamesh supplies, so just go to:

https://github.com/JamesH65/setgamma

where you'll find the relevant files along with instructions.

HTH

Re: invert screen colors?

Posted: Thu Feb 21, 2019 11:56 am
by tvjon
I've added an extra argument now for the display number, & even more usefully, it works fine on the Foundation TFT display, & anything connected via the DPI interface as well as HDMI/composite.

I don't own a Foundation display any longer, but usefully a friend lent me his display recently for a particular job. It has a 3A rpi board attached, along with a 4.14 kernel Raspbian.

Initially, it failed running setgamma, with an IOCTL error. Friend's µSD card needed updating anyway, & after:

sudo BRANCH=next rpi-update

setgamma works fine on his TFT.


Thank you James!