klausdoege
Germany
389 Posts |
Posted - Aug 24 2011 : 14:07:11
|
Hello, a part of the function IERGB2CMYK looks so. function IERGB2CMYK(const rgb: TRGB,: TCMYK; var...... begin ..... result.y:=255 - cmyk16.y shr 8; result.k:=255 - cmyk16.k shr 8; end else with rgb, result do begin k := imax(r, imax(g, b)); if k = 0 then k :=1; C := r * 255 div k; M := g * 255 div k; Y := b * 255 div k; end; end; Then IERGB2CMYK(0,0,0) --> CMYK(0,0,0,1) that is certain wrong i think. I believe better, this function is, can maybe your that alters.
function IERGB2CMYK(const rgb: TRGB,: TCMYK; var.......... begin .................. result.y:=255 - cmyk16.y shr 8; result.k:=255 - cmyk16.k shr 8; end else with rgb, result do, begin k := imax(r, imax(g, b)); if k = 0 then begin C:=255; M:=255; Y:=255; end else begin C := r * 255 div k; M := g * 255 div k; Y := b * 255 div k; end; end; end; many greetings Klaus
Klaus |
|