%BEG 'OK0X'SEP-0001.TXT *********************************2011-04-01 %********************************************************************* /trans_rgb3*_cmyn4*ioF {%BEG Procedure trans_rgb3*_cmyn4*ioF %assumes input of olv* o* 0 le {/o* 0.0000 def} if l* 0 le {/l* 0.0000 def} if v* 0 le {/v* 0.0000 def} if o* 1 ge {/o* 1.0000 def} if l* 1 ge {/l* 1.0000 def} if v* 1 ge {/v* 1.0000 def} if /tdel 0 def v* l* ge l* o* ge and tdel 0 eq and % v* >= l* >= o* equal y* <= m* <= c* %sector C-V of C-M, C>=M: i*p=0 {/n*n 1 v* sub def /w*w o* def /tdel 1 def } if % v* >= l* >= o* v* o* ge o* l* ge and tdel 0 eq and % v* >= o* >= l* equal y* <= c* <= m* %sector V-M of C-M, M>=C: i*p=1 {/n*n 1 v* sub def /w*w l* def /tdel 1 def } if % v* >= o* >= l* o* v* ge v* l* ge and tdel 0 eq and % o* >= v* >= l* equal c* <= y* <= m* %sector M-O of M-Y, M>=Y: i*p=2 {/n*n 1 o* sub def /w*w l* def /tdel 1 def } if % o* >= v* >= l* o* l* ge l* v* ge and tdel 0 eq and % o* >= l* >= v* equal c* <= m* <= y* %sector O-Y of M-Y, Y>=M: i*p=3 {/n*n 1 o* sub def /w*w v* def /tdel 1 def } if % o* >= l* >= v* l* o* ge o* v* ge and tdel 0 eq and % l* >= o* >= v* equal m* <= c* <= y* %sector Y-L of Y-C, Y>=C: i*p=4 {/n*n 1 l* sub def /w*w v* def /tdel 1 def } if % l* >= o* >= v* l* v* ge v* o* ge and tdel 0 eq and % l* >= v* >= o* equal m* <= y* <= c* %sector L-C of Y-C, C>=Y: i*p=5 {/n*n 1 l* sub def /w*w o* def /tdel 1 def } if % l* >= v* >= o* %achromatic %W: o*, l*, v* = 1.00 1.0 o* sub abs 0.001 le 1.0 l* sub abs 0.001 le and 1.0 v* sub abs 0.001 le and %W special case {/n*n 0 def /w*w 1 def %W } if %N: o*, l*, v* <= 0.001 o* abs 0.001 le l* abs 0.001 le and v* abs 0.001 le and %N special case {/n*n 1 def /w*w 0 def %N } if %Achromatic o* l* sub abs 0.001 le l* v* sub abs 0.001 le and %Achromatic special case {/n*n 1 o* sub def /w*w o* def %grey } if /lab*wFa w*w def /lab*nFa n*n def /c3*Fa 1 o* sub def /m3*Fa 1 l* sub def /y3*Fa 1 v* sub def /c4*Fa c3*Fa lab*nFa sub def %at least one of cmy will be cero /m4*Fa m3*Fa lab*nFa sub def /y4*Fa y3*Fa lab*nFa sub def /n4*Fa lab*nFa def %cmyn4* /o4*Fa 1 c4*Fa sub def /l4*Fa 1 m4*Fa sub def /v4*Fa 1 y4*Fa sub def /i4*Fa 1 n4*Fa sub def } bind def %END Procedure trans_rgb3*_cmyn4*ioF %******************************************************************* %END 'OK0X'SEP-0001.TXT *********************************2011-04-01