
17 Mar
2010
17 Mar
'10
4:26 p.m.
Yitzchak Gale wrote:
Andrew Coppin wrote:
I just uploaded a new version of the AC-Colour package...
Thanks for this.
Your algorithm for scaling brightness is not correct however. The RGB values in all popular image formats are not linear. They use a gamma transfer function.
My code operates in the linear RGB colourspace. If you want to operate on some other colourspace (e.g., sRGB), you're going to need to convert from it after you load data, and convert to it before you save data. (Personally, I've always considered the gamma transfer function to be a bug. It only exists due to the faulty design of early CRT systems, and it really should have been done away with years ago, but never mind...)