mailto: blog -at- heyrick -dot- eu

Pasta sauce and beeeeeanz!

After work, I decided to stop by the supermarket at the other side of town. This was through a maze of winding roads when school was letting out. Not so much dodgems as ten pin bowling, with the SUVs being the big heavy ball and the rest of us, the pins.

I wanted to see if they had any of the Panzani Chicken Bolognaise sauce. My habitual supermarket stopped selling it, replacing it with their own brand. I would like so say "inferior" but it isn't really, it just tastes completely different (aubergine and cinnamon are what I get from it), so it's as if somebody did away with coke and put up bottles of lemonade instead.

Long story short, they had some. So I bought them all.

I really like this pasta sauce as it is a chicken bolognaise. I just don't feel that beef tastes right when drowned in tomatoes. I know fifty nine million Italians might disagree, but that's just how I feel. Beef bolognaise is icky.
I would like to say that my favourite sauce is carbonara, but unfortunately that comes with added pig bits (that I usually pull out), so this is my favourite.

Yes, other people say I'm a fussy eater. For me, it's simply omitting the unpleasant parts.
You may have noticed that my main way of eating pasta is to simply butter and pepper it. Good pasta has a pleasant taste, and one can better enjoy and appreciate the various shapes and textures when it's not covered in some sort of sauce.

I then went to get some of their own-brand cat food as it was still 100g sachets. Felix quietly switched to 85g during the pandemic, but as you'd expect the price didn't drop by the missing 15%.

As I was heading back to the tills, I went by the foreign food section. Quite an extensive range of instant noodles. Expensive, in my opinion, but plenty of choices.
I wonder if they had anything English? They sort of tried a half-hearted attempt at it a while back, but it fizzled out.
Well, I didn't see anything. Then I did. Baked beans. And proper beans, not those stupid "beans and pork sausages" selling for nearly three euros a tin (any wonder nobody buys them?).
Well, these were €1,45 which is pretty steep but I can't help but feel that import duty is an issue these days.
I bought them all.

So, beans on toast for dinner?
So, beans on toast for dinner?

 

Pi gamma correction

RISC OS can provide gamma correction of the screen. This is to say, the colour lookup can be altered in order to correct for the specific gamma of the display.
What this means is that every monitor reproduces colours slightly differently. Partially this is due to the technology used, and partly it is due to age. Old CRT monitors, for example, tended to shift towards red as they got older, while it seems that my LCD monitor has weaker reds (or, rather, a bluer backlight).

The process of gamma correction is to fudge the colours sent to the monitor in order that - in theory the same picture will have exactly the same colours on different, corrected, monitors.

The way this is done is by generating a non-linear lookup table that describes the colour reproduction of the monitor.

The first thing to do is to know the gamma values for your monitor. For this, I used the Monitor Calibration built into PhotoDesk.

Monitor calibration, PhotoDesk.
Monitor calibration, PhotoDesk.

After setting the monitor's options to default, you should make sure that all of the shades between white and black are distinct and visible. If this is not the case, adjust the brightness and contrast until it is.

Then adjust the grey until you can't tell the difference between the solid 50% grey, and the parts that are made from black and white pixels (that your eye will average out to be 50%). If you can't make this work, it might help to sit back a bit.

That will give a baseline for the correction. If the red, green, or blue don't look correct - these also should average out to be a line with no difference between the solid colour and the dotted colour - then adjust the values until they do look right.

If you have gamma values from another OS that only set up the R, G, and B then assume the grey is 1.00.

Now, it's all very well PhotoDesk fiddling the system gamma settings when it loads, but how about we have this on startup?

Here's some code. It's actually kind of simple.

REM >gammafudge
REM By Rick Murray
REM https://heyrick.eu/blog/index.php?diary=20221122

REM Set your gamma values here
grey  = 1.00
red   = 1.31 : REM <-- it's an old LCD with weaker reds
green = 1.16
blue  = 1.12

REM Allocate and blank the lookup tables
DIM red% 256, green% 256, blue% 256
FOR loop% = 0 TO 255
  red%?loop% = 0
  green%?loop% = 0
  blue%?loop% = 0
NEXT

REM Work out the fudge factor
redtemp = 1 / (grey * red)
grntemp = 1 / (grey * green)
blutemp = 1 / (grey * blue)

REM Now build the tables
FOR loop% = 1 TO 255
  red%?loop%   = 255 * (( loop% / 255) ^ redtemp)
  green%?loop% = 255 * (( loop% / 255) ^ grntemp)
  blue%?loop%  = 255 * (( loop% / 255) ^ blutemp)
NEXT

REM Call PaletteV to update the gamma lookup tables
SYS "OS_CallAVector", red%, green%, blue%,, 9,,,,, 35

This will take the values supplied and adjust the gamma response accordingly. The gamma table is, when linear, a simple count from 0 to 255. But when correction is to be applied, the table looks more like this:

Visualisation of gamma table.
Visualisation of gamma table.

Save this in your Library ($.!Boot.Library) as something like "GammaFudge", and you can drop in a reference to that in your boot startup.

It may be worth having a "GammaReset" program as well. This is really simple...

REM >gammareset
REM By Rick Murray
REM https://heyrick.eu/blog/index.php?diary=20221122

REM Allocate and define the lookup tables
DIM red% 256, green% 256, blue% 256
FOR loop% = 0 TO 255
  red%?loop% = loop%
  green%?loop% = loop%
  blue%?loop% = loop%
NEXT

REM Call PaletteV to update the gamma lookup tables
SYS "OS_CallAVector", red%, green%, blue%,, 9,,,,, 35

 

This should work on a RiscPC as the VIDC2 has a LUT. It was developed on my Pi 3B+ so it'll work on that, and presumably other members of the Pi family (pretty much the same GPU). For other devices, I cannot say. Let me know in the comments below.

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

Anon, 23rd November 2022, 17:07
Nothing says British humour quite like spelling out 'T-W-A-T' with someone's Alphabetti Spaghetti...
Rick, 23rd November 2022, 17:29
Until they look at it and ask "what does twOt mean?". 
Anon, 23rd November 2022, 20:39
Also I just discovered that Windows 10 and 11 have built-in display calibration (including gamma correction). Previous versions had the feature but no user interface to set it. There was a tool that came with older versions of Photoshop (CS2 and possibly CS3) that could configure the gamma and create an ICC profile, but nothing built in to Windows itself. 
 
No idea about Windows 8, it was so horrific with that "start screen" that I (along with most people) refused to use it and stayed with Win7 until long after Win10 came out. Anyway I'm now looking at HeyRick on a properly calibrated monitor. Just make sure you save your JPEG images in sRGB colour space. :)
Zerosquare, 24th November 2022, 02:59
Does RiscOS allow you to tweak the lookup curves freely, or is it limited to gamma? Gamma is only one parameter of monitor calibration - in particular, the start and end points of the curves are fixed, so you can't compensate for a channel being weaker than another, for example.
Rick, 24th November 2022, 06:50
Zerosquare - I'm not sure. 
I think the interface exposed is only for "gamma"...or, more specifically, adjusting the colour lookup tables used to adjust the physical colour output. It's based upon what the VIDC2 did. 
 

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 56602 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   November 2022   »
MonTueWedThuFriSatSun
 23456
789101213
141516171820
212425
2830    

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Thank you:
  • Fred
  • Bernard
  • Michael
  • David

Last read at 13:13 on 2022/12/02.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2022 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2022/11/23
Return to top of page