% Copyright (c)1992-2005 Corel Corporation
% All rights reserved.     v13 r0.0
/get_ps_level/languagelevel where{pop systemdict/languagelevel get exec}{1
}ifelse def/level2 get_ps_level 2 ge def/level3 get_ps_level 3 ge def
/is_distilling{/product where{pop systemdict/setdistillerparams known product
(Adobe PostScript Parser)ne and}{false}ifelse}bind def/is_rip_separation{
is_distilling{false}{level2{currentpagedevice/Separations 2 copy known{get}{
pop pop false}ifelse}{false}ifelse}ifelse}bind def/is_separation{/LumSepsDict
where{pop false}{/AldusSepsDict where{pop false}{is_rip_separation{true}{1 0 0
0 gsave setcmykcolor currentcmykcolor grestore add add add 0 ne 0 1 0 0 gsave
setcmykcolor currentcmykcolor grestore add add add 0 ne 0 0 1 0 gsave
setcmykcolor currentcmykcolor grestore add add add 0 ne 0 0 0 1 gsave
setcmykcolor currentcmykcolor grestore add add add 0 ne and and and not}ifelse
}ifelse}ifelse}bind def/is_sim_devicen{level2 level3 not and{is_distilling
is_rip_separation or}{false}ifelse}bind def/CorelTintTransformFunction{
/colorantSpecArray exch def/nColorants colorantSpecArray length 4 idiv def
/inColor nColorants 1 add 1 roll nColorants array astore def/outColor 4 array
def 0 1 3{/nOutInk exch def 1 0 1 nColorants 1 sub{dup inColor exch get exch 4
mul nOutInk add colorantSpecArray exch get mul 1 exch sub mul}for 1 exch sub
outColor nOutInk 3 -1 roll put}for outColor aload pop}bind def gsave
/IsColourDevice/deviceinfo where{pop deviceinfo/Colors known{deviceinfo/Colors
get exec 1 gt}{false}ifelse}{/statusdict where{pop statusdict/processcolors
known{statusdict/processcolors get exec 1 gt}{false}ifelse}{false}ifelse}
ifelse def 40 dict begin/CorelImage systemdict/image get def/CorelSetGray
systemdict/setgray get def/CorelGetGray systemdict/currentgray get def
/CorelSetTransfer systemdict/settransfer get def/CorelGetTransfer systemdict
/currenttransfer get def/IsBlank 0 CorelGetTransfer exec 1 CorelGetTransfer
exec eq def/IsNeg IsBlank{0 CorelGetTransfer exec 0.5 lt}{0 CorelGetTransfer
exec 1 CorelGetTransfer exec gt}ifelse def/StackTopFourEqual{4 index eq 8 1
roll 4 index eq 8 1 roll 4 index eq 8 1 roll 4 index eq 8 1 roll pop pop pop
pop and and and}def IsColourDevice{/SepNum 0 def}{/SepNum 5 def}ifelse
/setcmykcolor where{pop 1 0 0 0 setcmykcolor CorelGetGray 1 exch sub 0 1 0 0
setcmykcolor CorelGetGray 1 exch sub 0 0 1 0 setcmykcolor CorelGetGray 1 exch
sub 0 0 0 1 setcmykcolor CorelGetGray 1 exch sub 4{4 copy}repeat 1 0 0 0
StackTopFourEqual{/SepNum 1 store}if 0 1 0 0 StackTopFourEqual{/SepNum 2 store}
if 0 0 1 0 StackTopFourEqual{/SepNum 3 store}if 0 0 0 1 StackTopFourEqual
{/SepNum 4 store}if 0 0 0 0 StackTopFourEqual{/SepNum 6 store}if}if IsBlank
{/SepNum 6 store}if/DuoSetColorSpace{level2{level3 InkNum 0 eq and{[/Indexed[
/DeviceN sNamesDeviceN[/DeviceCMYK]{tint_params CorelTintTransformFunction}]
255 DuotoneColorLookUpTable]setcolorspace}{InkNum 0 eq IsColourDevice and{
/DeviceCMYK setcolorspace}{/DeviceGray setcolorspace}ifelse}ifelse}if}bind def
/ReadImage level2{/image load}{{begin Width Height BitsPerComponent ImageMatrix
Decode length 2 eq{/DataSource load image}if Decode length 6 eq{DataSource 0
get DataSource 1 get DataSource 2 get true 3 colorimage}if Decode length 8 eq{
DataSource 0 get DataSource 1 get DataSource 2 get DataSource 3 get true 4
colorimage}if end}}ifelse def/CorelReadImage level2{/CorelImage load def}{{
begin Width Height BitsPerComponent ImageMatrix/DataSource load CorelImage end
}def}ifelse/duotone_image_dict{12 dict begin/ImageType 1 def/Width cols def
/Height rows def/ImageMatrix[cols 0 0 rows neg 0 rows]def/BitsPerComponent 8
def InkNum 0 eq IsColourDevice and level3 not and{/Decode[1 0 1 0 1 0 1 0]def
/MultipleDataSources true def/DataSource[{duo_scanline readdata}{duo_scanline}
{duo_scanline}{duo_scanline}]def}{/Decode level3 InkNum 0 eq and{[0 255]}{[0 1]
}ifelse def/DataSource{duo_scanline readdata}def}ifelse currentdict end}bind
def/duotone_scanline_image_dict{12 dict begin/ImageType 1 def/Width cols def
/Height 1 def/ImageMatrix[cols 0 0 1 neg 0 1]def/BitsPerComponent 8 def/Decode
is_sim_devicen{[0 1]}{[0 1 0 1 0 1 0 1]}ifelse def/DataSource is_sim_devicen{
duo_plate_scanline}{duo_cmyk_scanline}ifelse def currentdict end}bind def
/mark_color_patches{gsave newpath 0 0 moveto 0 1 lineto 1 1 lineto 1 0 lineto 0
0 lineto clip newpath 1 setlinewidth 0 1 nNumInksDeviceN 1 sub{/nInkIndex exch
def/findcmykcustomcolor where{pop tint_params nInkIndex 4 getinterval aload pop
sNamesDeviceN nInkIndex get findcmykcustomcolor 1 setcustomcolor 100 100 moveto
101 101 lineto stroke}if}for grestore}def/DuoImage{duotone_image_dict InkNum -1
eq{IsNeg{{pop 0}}{{pop 1}}ifelse CorelSetTransfer CorelReadImage}{InkNum 0 eq{
ReadImage}{CorelReadImage}ifelse}ifelse}bind def/DuoImageSimDeviceN{
/scanline_height 1 rows div def 0 1 rows 1 sub{/nRowIndex exch def duo_scanline
readdata pop gsave 0 nRowIndex 1 add scanline_height mul Tl 1 scanline_height
scale 0 1 nNumInksDeviceN 1 sub{gsave/nColorIndex exch def 0 1 cols 1 sub{
/nColumnIndex exch def duo_scanline nColumnIndex get/nDuoSample exch def
DuotoneColorLookUpTable nDuoSample nColorIndex add get duo_plate_scanline
nColumnIndex 3 -1 roll put}for[0 1 nNumInksDeviceN 1 sub{nColorIndex eq{1.0}{
0.0}ifelse}for]/sepTintTransformParams exch def[/Separation sNamesDeviceN
nColorIndex get/DeviceCMYK{sepTintTransformParams aload pop tint_params
CorelTintTransformFunction @tc_5}]setcolorspace nColorIndex 0 eq
currentoverprint not and{false setoverprint}{true setoverprint}ifelse
duotone_scanline_image_dict ReadImage grestore}for grestore}for}bind def
/DuotoneBitmap{/cols exch def/rows exch def mark_color_patches DuoSetColorSpace
/readdata{currentfile exch readhexstring pop}def/duo_scanline cols string def
/duo_plate_scanline cols string def/duo_cmyk_scanline cols 4 mul string def
is_sim_devicen{DuoImageSimDeviceN}{DuoImage}ifelse}bind def
