Steve_au
Posts: 4
Joined: Sun Mar 10, 2019 4:25 am

Grayscale output

Sun Mar 10, 2019 4:33 am

Just curious if anyone knows of any way to configure the official touchscreen to show a black and white/grayscale display. I think ideally I want to customise the saturation/digital vibrance. I'm trying to create a retro device so black and white suits the aesthetic.

I've messed around with various methods with no luck including xrandr, xgamma, configuring x11 conf files with grayscale etc but I think the nature of the graphics drivers means these are all unsupported.

I did have some success with xephyr and it's grayscale emulation but that's causing videos to be very blocky and low quality, so I'm hoping for a better solution?

I'd really appreciate any advice or help!

Thanks

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22660
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale output

Sun Mar 10, 2019 9:42 am

I put in a mailbox call to allow setting of palettes/gamma for the display. That will work.

Example code here https://github.com/JamesH65/setgamma

Edit. Hold on, might be thinking of some CCM code I also did that hasn't been merged yet. Anyway, this might help.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Steve_au
Posts: 4
Joined: Sun Mar 10, 2019 4:25 am

Re: Grayscale output

Tue Mar 12, 2019 10:57 am

Thanks James - code downloaded, compiled and experimented with.

Can see how you can invert colors et al using the mailbox, but suspect I would need the CCM if I wanted to actually adjust the colours to grayscale?

Steve_au
Posts: 4
Joined: Sun Mar 10, 2019 4:25 am

Re: Grayscale output

Wed Mar 13, 2019 1:22 pm

Looks like my best option at this point is just compile a custom fbdev driver with the grayscale transformation?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22660
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale output

Wed Mar 13, 2019 2:09 pm

Steve_au wrote:
Wed Mar 13, 2019 1:22 pm
Looks like my best option at this point is just compile a custom fbdev driver with the grayscale transformation?
That's going to soak up a lot of CPU, but we are backlogged at the moment, so getting the CCM stuff through might take a while.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Steve_au
Posts: 4
Joined: Sun Mar 10, 2019 4:25 am

Re: Grayscale output

Thu Mar 14, 2019 6:59 am

OK I might concentrate on other features for now and check back in a few months.

Thanks for your help. :-)

bedtime
Posts: 66
Joined: Thu Dec 13, 2018 6:02 pm

Re: Grayscale output

Thu May 09, 2019 6:14 pm

I've downloaded and compiled setgamma. Perhaps it's me, but I just can't seem to figure out how to use it. I would like to fade the 'red' channel to make the colours more cyan (to go with my system theme).

Any ideas? I'm on 3b+ using the 7" official screen

Return to “Official Foundation Display”