I want to build a constant array(1..200) of single numbers to make a 'lookup table' to convert the position of the scrollbar which has values 1 - 200 to a value to use for applying gamma correction to an image.
The first array value would have a value somewhere anound 7.0 - 9.9 (photoshop uses 9.9). The middle one, array value 100, would need to be 1.0 exactly. Array value 200 would be about 0.01.
Can anyone tell me which algorithm to use?
I have been attempting to make the array using 'trial and error' in some test code based around the function Power(i, 2.2), but got nowhere.
I am using Delphi. I'm not asking the code though, just a steer in the right direction. Any help would be much appreciated.