%BEG ACG80/10L/L80M00ZED Output Linearization (OL) LAB* -> cmyolvnw* 20030501 %BEG ACG80/10L/EARLY BINDING AND SYSTEM OUTLIN11.PS %FILE PREPARED FOR MIXED MODE, e. g. input ORS and output TLS /ISYSLAB 0 def %default input for Offset Reflective System (ORS) /ISYSTEM 0 def %default output for Offset Reflective System (ORS) /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 (ORS) %/ISYSTEM 0 def %default output for Offset Reflective System (ORS) %/ISYSLAB 1 def %input for Television Luminous System (TLS) %/ISYSTEM 1 def %output for Television Luminous System (TLS) %/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 CG80/10L/EARLY BINDING %line 36*************************************************************** %BEG ACG80/10L/OUTLIN1XFP.PS MXYZ_to_LAB* 20020101 %END ACG80/10L/OUTLIN1XFP.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 /MTLoutarrS1g 32 array def %theoretical linear L* output S1g: %replace the following 32 linear MTLoutarrS1g output data by the % 32 real output data of output S1g /MTLoutarrS1g [18.0 23.2 28.3 33.5 38.6 43.8 49.0 54.1 59.3 64.4 69.6 74.8 79.9 85.1 90.2 95.4 18.0 23.2 28.3 33.5 38.6 43.8 49.0 54.1 59.3 64.4 69.6 74.8 79.9 85.1 90.2 95.4] def %replace the following 32 above MTLoutarrS1g output data by the %theoretical absolute half square (Exp. 1.5) to dark L* output % delete the "%" in the following 4 lines % and see a lighter output of grey samples % /MTLoutarrS1g [18.0 19.3 21.8 24.9 28.7 32.9 37.6 42.7 % 48.1 54.0 60.1 66.6 74.3 80.4 87.8 95.4 % 18.0 19.3 21.8 24.9 28.7 32.9 37.6 42.7 % 48.1 54.0 60.1 66.6 74.3 80.4 87.8 95.4] def %End PS program data-Series S1g %Begin PS program code %Do not change the following PS program code for Output Linearization /MTLinparrg 16 array def %linear standard relative input data /MTLinparrg [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] def %the MTL code converts the absolute CIELAB lightness L* data % to the relative CIELAB whiteness w* data % w* = (L* - L*n) / ( L*w - L*n) /MTLL*NS MTLoutarrS1g 0 get 0.001 add def /MTLL*WS MTLoutarrS1g 15 get 0.001 sub 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 /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 % 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 MTLinparrg MTLi get def /MTLominval MTLoutarn MTLprevindex get def /MTLiminval MTLinparrg 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 /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 %END ACG80/10L/L80M00ZED Output Linearization (OL) LAB* -> cmyolvnw* 20030501 %BEG ACG80/10L/OUTLIN1YFP.PS Output Linearization, coordinate transfer 20020101 %END ACG80/10L/OUTLIN1YFP.PS Output Linearization, coordinate transfer 20020101 %BEG ACG80/10L/OUTLIN1IFP.PS olv* image input and output Linearization 20020101 %END ACG80/10L/OUTLIN1IFP.PS olv* image input and output Linearization 20020101