In principle, a test of the actual gamma can easily be performed. See http://www.lagom.nl/lcd-test/gamma_calibration.php
If pixels or lines next to each other in turn get zero or maximum color, the pixels will merge visually at some distance into a color with half the maximum value. If you then embed this pattern in a field with an even color, you can adjust the size of the programmed color so that the displayed color in the overall image appears to be visually even. The gamma can then be calculated from the ratio between the set color value and half the maximum value.
The accompanying test images are based on this principle.
In the attached zip-file are two testimages. The file "gamma-test-1.jpg" contains a black and white version with lines that are black or maximum white, embedded in fields with various grey values determined by the indicated gamma.
The file "gamma-test-2.jpg" contains a color version with three different maximum values. On the Mac, around the gamma value 2.2, the coloured bars should appear uniform in color. An enlarged part of that test image is: It is important that the test images are displayed without post-processing and without anti-aliasing.
In the accompanying program this is achieved by loading the test images with a scale equal to Scale=1/SCRSCALE.
Code: Select all
'Gamma test 'show images with gamma test patterns 'by "Dutchman" Ton Nillesen, September 2019 ' '==== User settings Wait=5 ' delay between pictures Dir$="/My stuff/Images/" DIM Img() = Dir$+"gamma-test-1.jpg", Dir$+"gamma-test-2.png" Scale=1/SCRSCALE ' picture directlly written to pixels? PRINT "Scale =";scale ' '=== Main nn=SIZE OF Img '--- load images FOR n=0 TO nn-1 IF NOT FILE EXISTS Img(n) PRINT "File """+img(n)+""" not found.": STOP ENDIF DRAW IMAGE Img(n) 0 0 scale DELAY Wait NEXT
In the future I certainly will program a test image with a slider or buttons for setting the correct gamma. For that I would like to have a "DRAW PIXEL TO x, y" command to be able to easily draw lines at the pixel level.
On the Mac, the gamma can be set with
Apple> System Preferences> Displays> Color> Calibrate> Gamma