first cs depend case: brighness,contrast
Casper Boemann
cbr at boemann.dk
Mon Jun 6 22:46:58 CEST 2005
Hi
I have indentified that the brightness contrast filter assumes rgb (or at
least liniar tristimulas values).
This is naturally wrong and the question is how to solve it. I have two
suggestions:
1:
for each pixel {
cs->adjustbrightness(pixel, level);
}
2:
for each pixel {
cs->setBrightness(pixel, (cs->getBrightness(pixel) * level);
}
#1 is simpler to use. Probably is faster and more accurate. But we run the
risk of bloating the colorspaces, with many specific functions
#2 is more complex to use, but by using simpler functions we might be able to
reuse them in another context.
What do you think, or do you have other alternatives?
--
best regards / venlig hilsen
Casper Boemann
More information about the kimageshop
mailing list