Forum: Multimedia
Delphi
by Medium,
4. Dez 2010
Too few infos. What type is "Luminosity" of, and how is IntToByte() implemented?
Also, it usually is a good idea to re-order your calculation, and go with floats as long as possible to avoid nasty early rounding errors:
var
L: Byte;
temp: Single;
C, M, Y: Single;
Forum: Multimedia
Delphi
by Medium,
4. Dez 2010
Uhm, I wasn't aware of that PS permits values <0%. In that case you simply flow under "MinChannelValue", which is basically the same as the overflow as with too big values, just from the other side. Simply limit Luminosity to 0 (i.e.: L = max(L, 0) as a last step).