%BEG ACG60/10L/L60G00ZED Output Linearization (OL) LAB* -> cmyolvnw* 20030501 %BEG ACG60/10L/EARLY BINDING AND SYSTEM OUTLIN11.PS %OUTLIN11.PS /iTAB 0 def %iTAB=0,3 for example dark scaling 1.0, 0.5, 2.0, 1.5 exp %FILE PREPARED FOR MIXED MODE, e. g. input ORS and output TLS %/IMES 0 def %0=LAB* used, no reflection factor necessary /IMES 1 def /Yre 0.00 def %1=XYZ measurement and standard device reflection /i*ptrsc 0 def %LAB* setcolor to cmy0* / 000n* setcmykcolor %/i*ptrsc 1 def %LAB* setcolor to olv* setrgbcolor / w* setgray %/i*ptrsc 2 def %LAB* setcolor to cmy0* / nnn0* setcmykcolor %/i*ptrsc 3 def %LAB* setcolor to olv* / www* setrgbcolor %/i*ptrsc 4 def %LAB* setcolor to lab* setcolor %/i*ptrsc 5 def %LAB* setcolor to LAB* setcolor %/i*ptrsc 6 def %LAB* setcolor to 000n* setcmykcolor %/i*ptrsc 7 def %LAB* setcolor to w* setgray %/ISYSLAB 0 def %default input for Offset Reflective System (ORS18) %/ISYSTEM 0 def %default output for Offset Reflective System (ORS18) /ISYSLAB 1 def %input for Television Luminous System (TLS00) /ISYSTEM 1 def %output for Television Luminous System (TLS00) %/ISYSLAB 2 def %input for Device Reflective measurement system (DRS) %/ISYSTEM 2 def %output for Device Reflective measurement system (DRS) %/ISYSLAB 3 def %input for Television Luminous Reflection System (TLR) %/ISYSTEM 3 def %output for Television Luminous Reflection System (TLR) %/ISYSLAB 4 def %input for Device Luminous measurement system (DLS) %/ISYSTEM 4 def %output for Device Luminous measurement system (DLS) /iLAB 0 def % for preparing input-output system data only once %END CG60/10L/EARLY BINDING %line 36*************************************************************** %BEG ACG60/10L/OUTLIN1XFA.PS MXYZ_to_LAB* 20020101 %OUTLIN1X.PS %END ACG60/10L/OUTLIN1XFA.PS MXYZ_to_LAB* 20020101 %line 38*************************************************************** %Early definition of MTLset(cmykcolor/gray/rgbcolor) equal to standard operator %Four Grey (G) functions based on CIELAB L* data (=MGL code) /MTLwgrey {setgray} bind def /MTLsetnnnngrey {setcmykcolor} bind def /MTLsetwwwgrey {setrgbcolor} bind def /LAB*c 63 array def /XYZc 63 array def /LAB*rc 63 array def /MTLoutarrS1g 16 array def %datan in L* or Y %linear scaled output for ergonomics, visual displays, ISO 9241-306 %standard L* data of linear CIELAB output /MTLoutarrS1gL0 [ 0.00 6.36 12.72 19.08 25.44 31.80 38.16 44.52 50.89 57.25 63.61 69.97 76.33 82.69 89.05 95.41] def %0.5 exp scaled output for ergonomics, visual displays, ISO 9241-306 %L* data of lighter output compared to standard linear CIELAB output /MTLoutarrS1gL1 [ 0.00 24.63 34.84 42.67 49.27 55.08 60.34 65.18 69.68 73.90 77.90 81.70 85.34 88.82 92.17 95.41] def %2.0 exp scaled output for ergonomics, visual displays, ISO 9241-306 %L* data of darker output compared to standard linear CIELAB output /MTLoutarrS1gL2 [ 0.00 0.42 1.70 3.82 6.78 10.60 15.27 20.78 27.14 34.35 42.40 51.31 61.06 71.66 83.11 95.41] def %1.5 exp scaled output for ergonomics, visual displays, ISO 9241-306 %L* data of darker output compared to standard linear CIELAB output /MTLoutarrS1gL3 [ 0.00 1.64 4.65 8.53 13.14 18.36 24.14 30.42 %linear scaled output for ergonomics, visual displays, ISO 9241-306 %standard normalized Y luminance reflectance of linear CIELAB output /MTLoutarrS1gY0 [ 0.00 0.70 1.52 2.77 4.56 7.00 10.18 14.20 19.17 25.18 32.32 40.70 50.42 61.58 74.27 88.59] def %0.5 exp scaled output for ergonomics, visual displays, ISO 9241-306 %Y data of lighter output compared to standard linear CIELAB output /MTLoutarrS1gY1 [ 0.00 4.30 8.42 12.94 17.81 23.01 28.51 34.27 40.49 46.56 53.05 59.75 66.67 73.79 81.10 88.59] def %2.0 exp scaled output for ergonomics, visual displays, ISO 9241-306 %Y data of darker output compared to standard linear CIELAB output /MTLoutarrS1gY2 [ 0.00 0.05 0.19 0.42 0.75 1.21 1.96 3.19 5.14 8.18 12.76 19.54 29.32 43.16 62.38 88.59] def %1.5 exp scaled output for ergonomics, visual displays, ISO 9241-306 %Y data of darker output compared to standard linear CIELAB output /MTLoutarrS1gY3 [ 0.00 0.18 0.51 0.95 1.59 2.60 4.14 6.41 9.63 14.08 20.09 28.03 38.34 51.50 68.05 88.59] def /MTLinparrS1g 21 array def %linear standard relative input data /MTLinparrS1g [0.000 0.067 0.133 0.200 0.267 0.333 0.400 0.467 0.533 0.600 0.667 0.733 0.800 0.867 0.933 1.000 0.000 0.250 0.500 0.750 1.000] def %MTLtransferf converts the absolute CIELAB lightness L* values % to the relative CIELAB whiteness w* values % w* = (L* - L*n) / ( L*w - L*n) /MTLtransferf {MTLL*NS sub MTLL*WS MTLL*NS sub div} bind def /MTLioF 0 def %Start value to define first transfer /MTLoutarn 16 array def %relative CIELAB whiteness w* values for absolute input data /MTLouFunct {%BEG Funtion Definition of MTLoutarrS1g 0 1 15 {/MTLi exch def %MTLi=0,15 MTLoutarrS1g MTLi IMES 0 eq { %BEG IMES=0 iTAB 0 eq {MTLoutarrS1gL0 MTLi get} if iTAB 1 eq {MTLoutarrS1gL1 MTLi get} if iTAB 2 eq {MTLoutarrS1gL2 MTLi get} if iTAB 3 eq {MTLoutarrS1gL3 MTLi get} if } { %BEG IMES=1 iTAB 0 eq {MTLoutarrS1gY0 MTLi get} if iTAB 1 eq {MTLoutarrS1gY1 MTLi get} if iTAB 2 eq {MTLoutarrS1gY2 MTLi get} if iTAB 3 eq {MTLoutarrS1gY3 MTLi get} if } ifelse %END IMES=0,1 put } for %MTLi=0,15 IMES 1 eq { %MTLi=0,15 Transfer Y-> L* 0 1 15 {/MTLi exch def %MTLi=0,15 /YQ MTLoutarrS1g MTLi get 100 div def YQ 0 lt {/YQ 0.00000001 def} if /LAB*S1g YQ 0.008856 lt {903.3 YQ mul} {YQ 0.33333333 exp 116 mul 16 sub} ifelse def MTLoutarrS1g MTLi LAB*S1g put } for %MTLi=0,15 } if %IMES=1 } bind def %END Function Definition of MTLoutarrS1g /MTLioFunct {%beg MTLioFunct, expects "MTLcolor" as input MTLioF 0 eq { 0 1 15 {/MTLi exch def MTLoutarn MTLi MTLoutarrS1g MTLi get MTLtransferf put } for /MTLioF 1 def } if %calculation only once MTLcolor 0 le {/MTLcolor 0.00001 def} if MTLcolor 1 ge {/MTLcolor 0.99999 def} if % search the MTLoutarr using a for loop 1 1 15 {/MTLi exch def /MTLprevindex MTLi 1 sub def MTLcolor MTLoutarn MTLi get lt MTLcolor MTLoutarn MTLprevindex get ge and { /MTLomaxval MTLoutarn MTLi get def /MTLimaxval MTLinparrS1g MTLi get def /MTLominval MTLoutarn MTLprevindex get def /MTLiminval MTLinparrS1g MTLprevindex get def exit } if } for % Use a linear interpolation /MTLmodcolor MTLcolor MTLominval sub MTLomaxval MTLominval sub div MTLimaxval MTLiminval sub mul MTLiminval add def } bind def %end MTLioFunction /MTLoutarrSNg 21 array def %theoretical linear L* output S1g: /MTLoutarrSNg [0.000 0.067 0.133 0.200 0.267 0.333 0.400 0.467 0.533 0.600 0.667 0.733 0.800 0.867 0.933 1.000 0.000 0.250 0.500 0.750 1.000] def /MTLinparrSNg 21 array def %linear standard relative input data /MTLinparrSNg [0.000 0.067 0.133 0.200 0.267 0.333 0.400 0.467 0.533 0.600 0.667 0.733 0.800 0.867 0.933 1.000 0.000 0.250 0.500 0.750 1.000] def %MTLtransferf converts the absolute CIELAB lightness L* values % to the relative CIELAB whiteness w* values % w* = (L* - L*n) / ( L*w - L*n) /MTLioFN 0 def %Start value to define first transfer /MTLoutarnN 16 array def %relative CIELAB whiteness w* values for absolute input data /MTLioFunctN {%beg MTLioFunctN, expects "MTLcolor" as input, transfers to MTLmodcolor MTLioFN 0 eq { 0 1 15 {/MTLi exch def MTLoutarnN MTLi MTLoutarrSNg MTLi get put } for /MTLioFN 1 def } if %calculation only once MTLcolor 0 le {/MTLcolor 0.00001 def} if MTLcolor 1 ge {/MTLcolor 0.99999 def} if % search the MTLoutarnN using a for loop 1 1 15 {/MTLi exch def /MTLprevindex MTLi 1 sub def MTLcolor MTLoutarnN MTLi get lt MTLcolor MTLoutarnN MTLprevindex get ge and { /MTLomaxval MTLoutarnN MTLi get def /MTLimaxval MTLinparrSNg MTLi get def /MTLominval MTLoutarnN MTLprevindex get def /MTLiminval MTLinparrSNg MTLprevindex get def exit } if } for % Use a linear interpolation /MTLmodcolor MTLcolor MTLominval sub MTLomaxval MTLominval sub div MTLimaxval MTLiminval sub mul MTLiminval add def } bind def %end MTLioFunctN /MTLtransp {/MTLcolor exch def %MTLtransp, new setgray by a function MTLioFunct MTLmodcolor } bind def %end MTLtransp, new setgray by a function %Four Grey (G) functions based on CIELAB L* data (=MGL code) /setgray {MTLtransp MTLwgrey} def /setcmykcolor {/ncolor exch def /ycolor exch def %assumption c*=m*=y*=n*, k=0 /mcolor exch def /ccolor exch def ncolor 0 eq {%assumption c*=m*=y*#0, n*=0 1 ccolor sub MTLtransp 1 exch sub dup dup 0 MTLsetnnnngrey} {%assumption c*=m*=y*=0, n*#0 0 0 0 1 ncolor sub MTLtransp 1 exch sub MTLsetnnnngrey } ifelse } def /setrgbcolor {/vcolor exch def /lcolor exch def %assumption o*=l*=v*=w* /ocolor exch def ocolor MTLtransp dup dup MTLsetwwwgrey} def /LAB*rcdef { %BEG procedure LAB*rcdef /LAB*ORS18 33 array def /LAB*TLS00 33 array def /LAB*ORS18 [%D=Device OYLCVMO+NW %for Offset Reflective System (ORS) 58.62 -30.63 -42.75 %C 0 %see Table 1 of ISO/IEC 15775:1999-12 25.72 31.45 -44.36 %V 1 48.13 75.20 -6.80 %M 2 47.94 65.31 52.07 %0 3 90.37 -11.16 96.17 %Y 4 50.90 -62.97 36.71 %L 5 58.62 -32.63 -42.75 %C 6 18.01 0.50 -0.47 %N 7 95.41 -0.99 4.76 %W 8 00.01 0.84 -1.69 %N0 9 100.0 -1.08 5.06 %W1 10 ] def %OYLCVMO+NW /LAB*TLS18 [%D=Device OYLCVMO+NW %for Television Luminous System (TLS) 87.14 -44.43 -13.13 %C 0 %computed from Table 1 of ISO/IEC 15775:1999-12 31.90 24.46 -37.39 %V 1 % with Yn=2.52 59.01 89.33 -19.44 %M 2 52.76 71.63 49.88 %0 3 92.74 -20.04 84.97 %Y 4 84.00 -79.00 73.94 %L 5 87.14 -44.43 -13.13 %C 6 18.01 0.00 0.00 %N 7 95.41 0.00 0.00 %W 8 0.01 0.00 0.00 %N0 9 100.0 0.00 0.00 %W1 10 ] def %OYLCVMO+NW 0 1 8 {/sISO exch def /i30 sISO 3 mul def /i31 i30 1 add def /i32 i30 2 add def ISYSTEM 0 eq { %ORS18 LAB*rc i30 LAB*ORS18 i30 get put LAB*rc i31 LAB*ORS18 i31 get put LAB*rc i32 LAB*ORS18 i32 get put } if ISYSTEM 1 eq { %TLS18 LAB*rc i30 LAB*TLS18 i30 get put LAB*rc i31 LAB*TLS18 i31 get put LAB*rc i32 LAB*TLS18 i32 get put } if } for } bind def %END procedure LAB*rcdef /LAB*rc_to_Yrel* { %BEG procedure LAB*rc_to_Yrel* %Input LAB*rc and MTLil=xcolorg %Output MTLoutarrg 21 array and MTLinpparrg 21 array def /LAB*sa 63 array def /XYZsa 63 array def /MTLoutarrg 21 array def /MTLinparrg 21 array def /DecodeXYZ* {dup 6 29 div ge {dup dup mul mul} {4 29 div sub 108 841 div mul} ifelse} bind def MTLil 2 le {/ilx MTLil def} if MTLil 3 eq {/ilx 4 def} if MTLil 4 eq {/ilx 8 def} if MTLil 5 eq {/ilx 16 def} if MTLil 6 eq {/ilx 32 def} if MTLil 7 eq {/ilx 64 def} if /Xnref 0.63 ilx mul 0.9505 mul def /Ynref 0.63 ilx mul def /Znref 0.63 ilx mul 1.0890 mul def /XQ Xnref 95.05 div def /YQ Ynref 100.00 div def /ZQ Znref 108.90 div def XQ 0 lt {/XQ 0.00000001 def} if YQ 0 lt {/YQ 0.00000001 def} if ZQ 0 lt {/ZQ 0.00000001 def} if /LAB*Xnref YQ 0.008856 lt {903.3 YQ mul} {YQ 0.33333333 exp 116 mul 16 sub} ifelse def /LAB*Ynref XQ 0.008856 lt {7.787 XQ mul 16 116 div add} {XQ 0.33333333 exp} ifelse YQ 0.008856 lt {7.787 YQ mul 16 116 div add} {YQ 0.33333333 exp} ifelse sub 500 mul def /LAB*Znref YQ 0.008856 lt {7.787 YQ mul 16 116 div add} {YQ 0.33333333 exp} ifelse ZQ 0.008856 lt {7.787 ZQ mul 16 116 div add} {ZQ 0.33333333 exp} ifelse sub 200 mul def /i21 8 3 mul def /i22 i21 1 add def /i23 i21 2 add def %colour W 0 1 20 {/sISO exch def %steps from black to white sISO 15 le {/sISO0 0 def /istep 15 def} {/sISO0 16 def /istep 4 def} ifelse /i30 sISO 3 mul def /i31 i30 1 add def /i32 i30 2 add def LAB*c i30 LAB*Xnref LAB*rc i21 get LAB*Xnref sub sISO sISO0 sub istep div mul add put LAB*c i31 LAB*Ynref LAB*rc i22 get LAB*Ynref sub sISO sISO0 sub istep div mul add put LAB*c i32 LAB*Znref LAB*rc i23 get LAB*Znref sub sISO sISO0 sub istep div mul add put } for 0 1 20 {/i exch def /i30 i 3 mul def /i31 i 3 mul 1 add def /i32 i 3 mul 2 add def /X* {LAB*c i30 get 16 add 116 div LAB*c i31 get 500 div add} bind def /Y* {LAB*c i30 get 16 add 116 div} bind def /Z* {LAB*c i30 get 16 add 116 div LAB*c i32 get 200 div sub} bind def XYZc i30 X* DecodeXYZ* 95.05 mul put XYZc i31 Y* DecodeXYZ* 100.00 mul put XYZc i32 Z* DecodeXYZ* 108.90 mul put } for %i=0,20 /YcW XYZc 46 get def /YcN XYZc 1 get def /L*cN LAB*c 0 get def /A*cN LAB*c 1 get def /B*cN LAB*c 2 get def /L*cW LAB*c 45 get def /A*cW LAB*c 46 get def /B*cW LAB*c 47 get def 0 1 20 {/i exch def /i30 i 3 mul def /i31 i 3 mul 1 add def /i32 i 3 mul 2 add def LAB*sa i30 LAB*c i30 get put /l*CIE LAB*c i30 get L*cN sub L*cW L*cN sub div def %system rel. lightn. /a*cs A*cW A*cN sub l*CIE mul def /b*cs B*cW B*cN sub l*CIE mul def LAB*sa i31 LAB*c i31 get A*cN sub a*cs sub put LAB*sa i32 LAB*c i32 get B*cN sub b*cs sub put } for %i=0,20 0 1 20 {/i exch def /i30 i 3 mul def /i31 i 3 mul 1 add def /i32 i 3 mul 2 add def /X*sa {LAB*sa i30 get 16 add 116 div LAB*sa i31 get 500 div add} bind def /Y*sa {LAB*sa i30 get 16 add 116 div} bind def /Z*sa {LAB*sa i30 get 16 add 116 div LAB*sa i32 get 200 div sub} bind def XYZsa i30 X*sa DecodeXYZ* 95.05 mul put XYZsa i31 Y*sa DecodeXYZ* 100.00 mul put XYZsa i32 Z*sa DecodeXYZ* 108.90 mul put } for %i=0,50 0 1 20 {/i exch def /i30 i 3 mul def /i31 i 3 mul 1 add def /i32 i 3 mul 2 add def MTLoutarrg i LAB*c i30 get put MTLinparrg i XYZc i31 get Ynref sub XYZc 46 get Ynref sub div put } for /MTLoutarrSNg 21 array def /MTLoutarrSxg 21 array def /MTLinparrSNg 21 array def /MTLw*iarrSxg 21 array def 0 1 20 {/i exch def /i30 i 3 mul def /i31 i 3 mul 1 add def /i32 i 3 mul 2 add def xcolorg 0 eq {MTLoutarrSNg i XYZc i31 get Ynref sub XYZc 46 get Ynref sub div put} {MTLoutarrSxg i XYZc i31 get Ynref sub XYZc 46 get Ynref sub div put} ifelse MTLinparrSNg i i 15 le {i 15 div} {i 16 sub 4 div} ifelse put } for 0 1 20 {/i exch def /MTLcolor xcolorg 0 eq {MTLoutarrSNg i get} {MTLoutarrSxg i get} ifelse def MTLioFunctN MTLw*iarrSxg i MTLmodcolor put } for } bind def %END procedure LAB*rc_to_Yrel* %END OUTLIN11.PS %END ACG60/10L/L60G00ZED Output Linearization (OL) LAB* -> cmyolvnw* 20030501 %BEG ACG60/10L/OUTLIN1YFA.PS Output Linearization, coordinate transfer 20020101 %OUTLIN1Y.PS %END ACG60/10L/OUTLIN1YFA.PS Output Linearization, coordinate transfer 20020101 %BEG ACG60/10L/OUTLIN1IFA.PS olv* image input and output Linearization 20020101 %OUTLIN1I.PS %END ACG60/10L/OUTLIN1IFA.PS olv* image input and output Linearization 20020101