⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 heikkila97.ps

📁 OPENCV系列的
💻 PS
📖 第 1 页 / 共 5 页
字号:
% Happens at the top of each page that is a separation/FrameSepInit {	1.0 RealSetgray} bind def% Tell the separation code that this separation is for a custom color/FrameSetSepColor { % c m y k r g b	/FrameSepBlue exch def	/FrameSepGreen exch def	/FrameSepRed exch def	/FrameSepBlack exch def	/FrameSepYellow exch def	/FrameSepMagenta exch def	/FrameSepCyan exch def	/FrameSepIs FMcustom def	setCurrentScreen	} bind def% Tell the separation code that this separation is Cyan/FrameSetCyan {	/FrameSepBlue 1.0 def	/FrameSepGreen 1.0 def	/FrameSepRed 0.0 def	/FrameSepBlack 0.0 def	/FrameSepYellow 0.0 def	/FrameSepMagenta 0.0 def	/FrameSepCyan 1.0 def	/FrameSepIs FMcyan def	setCurrentScreen	} bind def % Tell the separation code that this separation is Magenta/FrameSetMagenta {	/FrameSepBlue 1.0 def	/FrameSepGreen 0.0 def	/FrameSepRed 1.0 def	/FrameSepBlack 0.0 def	/FrameSepYellow 0.0 def	/FrameSepMagenta 1.0 def	/FrameSepCyan 0.0 def	/FrameSepIs FMmagenta def	setCurrentScreen} bind def % Tell the separation code that this separation is Yellow/FrameSetYellow {	/FrameSepBlue 0.0 def	/FrameSepGreen 1.0 def	/FrameSepRed 1.0 def	/FrameSepBlack 0.0 def	/FrameSepYellow 1.0 def	/FrameSepMagenta 0.0 def	/FrameSepCyan 0.0 def	/FrameSepIs FMyellow def	setCurrentScreen} bind def % Tell the separation code that this separation is Black/FrameSetBlack {	/FrameSepBlue 0.0 def	/FrameSepGreen 0.0 def	/FrameSepRed 0.0 def	/FrameSepBlack 1.0 def	/FrameSepYellow 0.0 def	/FrameSepMagenta 0.0 def	/FrameSepCyan 0.0 def	/FrameSepIs FMblack def	setCurrentScreen} bind def % Tell the separation code we are not doing a separation/FrameNoSep { %	/FrameSepIs FMnone def	setCurrentScreen} bind def% Initialize the separation code with all the custom colors we are% separating (not process colors)/FrameSetSepColors { % list of arrays of [c m y k r g b] count 	FrameDict begin	[ exch 1 add 1 roll ]	/FrameSepColors  % array of arrays of colors we are separating	exch def end	} bind def% is this color array in the array of custom color separations?/FrameColorInSepListCMYK { % [ c m y k ] -> bool	FrameSepColors {  % color elem-of-array       		exch dup 3 -1 roll % color color elem       		FrameCmpColorsCMYK % color bool       		{ pop true exit } if    	} forall % exits with either [color] or true	dup true ne {pop false} if	} bind def/FrameColorInSepListRGB { % [ r g b ] -> bool	FrameSepColors {  % color elem-of-array       		exch dup 3 -1 roll % color color elem       		FrameCmpColorsRGB % color bool       		{ pop true exit } if    	} forall % exits with either [color] or true	dup true ne {pop false} if	} bind def% Level 1 color operators saved and redefined/RealSetgray /setgray load def/RealSetrgbcolor /setrgbcolor load def/RealSethsbcolor /sethsbcolor load defend % Setgray patch/setgray { % num	FrameDict begin	FrameSepIs FMnone eq		{ RealSetgray } 		{ % go to white unless the current sep color is black		FrameSepIs FMblack eq 			{ RealSetgray } 			{ FrameSepIs FMcustom eq 			  FrameSepRed 0 eq and			  FrameSepGreen 0 eq and			  FrameSepBlue 0 eq and {			  	RealSetgray			  } {				1 RealSetgray pop 			  } ifelse			} ifelse		} ifelse	end} bind def/setrgbcolor { % r g b	FrameDict begin	FrameSepIs FMnone eq	{  RealSetrgbcolor }	{		3 copy [ 4 1 roll ] % r g b [ r g b ]		FrameColorInSepListRGB		{				FrameSepBlue eq exch 			 	FrameSepGreen eq and exch 			 	FrameSepRed eq and			 	{ 0 } { 1 } ifelse		}		{			FMPColor {				RealSetrgbcolor				currentcmykcolor			} {				RGBtoCMYK			} ifelse			FrameSepIs FMblack eq			{1.0 exch sub 4 1 roll pop pop pop} {			FrameSepIs FMyellow eq			{pop 1.0 exch sub 3 1 roll pop pop} {			FrameSepIs FMmagenta eq			{pop pop 1.0 exch sub exch pop } {			FrameSepIs FMcyan eq			{pop pop pop 1.0 exch sub } 			{pop pop pop pop 1} ifelse } ifelse } ifelse } ifelse 		} ifelse		RealSetgray	} 	ifelse	end} bind def/sethsbcolor {	FrameDict begin	FrameSepIs FMnone eq 	{ RealSethsbcolor } 	{		RealSethsbcolor % safe since we will overwrite the color state		currentrgbcolor  % r g b - Let PostsCript to the conversion.		setrgbcolor % call our version	} 	ifelse	end} bind defFrameDict begin/setcmykcolor where {	pop /RealSetcmykcolor /setcmykcolor load def} {	/RealSetcmykcolor {		4 1 roll		3 { 3 index add 0 max 1 min 1 exch sub 3 1 roll} repeat 		RealSetrgbcolor pop	} bind def} ifelseuserdict /setcmykcolor { % c m y k		FrameDict begin		FrameSepIs FMnone eq		{ RealSetcmykcolor } 		{			4 copy [ 5 1 roll ]			FrameColorInSepListCMYK			{				FrameSepBlack eq exch 				FrameSepYellow eq and exch 				FrameSepMagenta eq and exch 				FrameSepCyan eq and 				{ 0 } { 1 } ifelse			}			{				FrameSepIs FMblack eq				{1.0 exch sub 4 1 roll pop pop pop} {				FrameSepIs FMyellow eq				{pop 1.0 exch sub 3 1 roll pop pop} {				FrameSepIs FMmagenta eq				{pop pop 1.0 exch sub exch pop } {				FrameSepIs FMcyan eq				{pop pop pop 1.0 exch sub } 				{pop pop pop pop 1} ifelse } ifelse } ifelse } ifelse 			} ifelse			RealSetgray		}		ifelse		end	} bind put% Set up a prototype pattern for PostScript Level 2fMLevel1 { 	% set up screen functions for the patterns in PS level 1	% each entry contains an angle, spot function, flipped spot function,	% gray level and frequency multiplier.	/patScreenDict 7 dict dup begin		<0f1e3c78f0e1c387> [ 45  { pop } {exch pop} 		.5   2 sqrt] FmBD		<0f87c3e1f0783c1e> [ 135 { pop } {exch pop}			.5   2 sqrt] FmBD		<cccccccccccccccc> [ 0   { pop } dup				.5   2	   ] FmBD		<ffff0000ffff0000> [ 90  { pop } dup				.5   2	   ] FmBD		<8142241818244281> [ 45  { 2 copy lt {exch} if pop}	dup .75  2 sqrt] FmBD		<03060c183060c081> [ 45  { pop } {exch pop}			.875 2 sqrt] FmBD		<8040201008040201> [ 135 { pop } {exch pop}			.875 2 sqrt] FmBD	end def} { % prototype level 2 pattern dictionary	% define some PostScript procedures for known jaggy patterns.	/patProcDict 5 dict dup begin		<0f1e3c78f0e1c387> { 3 setlinewidth -1 -1 moveto 9 9 lineto stroke 											4 -4 moveto 12 4 lineto stroke											-4 4 moveto 4 12 lineto stroke} bind def		<0f87c3e1f0783c1e> { 3 setlinewidth -1 9 moveto 9 -1 lineto stroke 											-4 4 moveto 4 -4 lineto stroke											4 12 moveto 12 4 lineto stroke} bind def		<8142241818244281> { 1 setlinewidth -1 9 moveto 9 -1 lineto stroke											-1 -1 moveto 9 9 lineto stroke } bind def		<03060c183060c081> { 1 setlinewidth -1 -1 moveto 9 9 lineto stroke 											4 -4 moveto 12 4 lineto stroke											-4 4 moveto 4 12 lineto stroke} bind def		<8040201008040201> { 1 setlinewidth -1 9 moveto 9 -1 lineto stroke 											-4 4 moveto 4 -4 lineto stroke											4 12 moveto 12 4 lineto stroke} bind def	end def	/patDict 15 dict dup begin		/PatternType 1 def		% Always 1 for PS Level 2		/PaintType 2 def		% Uncolored pattern		/TilingType 3 def		% constant spacing and faster tiling		/BBox [ 0 0 8 8 ] def 	% bounding box		/XStep 8 def			% X offset		/YStep 8 def			% Y offset		/PaintProc {			begin			patProcDict bstring known {				patProcDict bstring get exec			} {				8 8 true [1 0 0 -1 0 8] bstring imagemask			} ifelse			end		} bind def	end def} ifelse%combineColor puts together the current gray value (which could also be%a fraction of on bits for a fill pattern and the current color and calls%the appropriate function%/combineColor {    FrameSepIs FMnone eq	{		graymode fMLevel1 or not {			% Level 2 pattern			[/Pattern [/DeviceCMYK]] setcolorspace			FrameCurColors 0 4 getinterval aload pop FrameCurPat setcolor		} {			FrameCurColors 3 get 1.0 ge {				FrameCurGray RealSetgray			} {				fMAcrobat not FMPColor graymode and and {					0 1 3 { 						FrameCurColors exch get						1 FrameCurGray sub mul					} for					RealSetcmykcolor				} {					4 1 6 {						FrameCurColors exch get						graymode {							1 exch sub 1 FrameCurGray sub mul 1 exch sub						} {							1.0 lt {FrameCurGray} {1} ifelse						} ifelse					} for					RealSetrgbcolor				} ifelse			} ifelse		} ifelse	} { % separation case		FrameCurColors 0 4 getinterval aload		FrameColorInSepListCMYK {			FrameSepBlack eq exch 			FrameSepYellow eq and exch 			FrameSepMagenta eq and exch 			FrameSepCyan eq and			FrameSepIs FMcustom eq and			{ FrameCurGray } { 1 } ifelse		} {			FrameSepIs FMblack eq			{FrameCurGray 1.0 exch sub mul 1.0 exch sub 4 1 roll pop pop pop} {			FrameSepIs FMyellow eq			{pop FrameCurGray 1.0 exch sub mul 1.0 exch sub 3 1 roll pop pop} {			FrameSepIs FMmagenta eq			{pop pop FrameCurGray 1.0 exch sub mul 1.0 exch sub exch pop } {			FrameSepIs FMcyan eq			{pop pop pop FrameCurGray 1.0 exch sub mul 1.0 exch sub } 			{pop pop pop pop 1} ifelse } ifelse } ifelse } ifelse 		} ifelse		graymode fMLevel1 or not {			% Level 2 pattern			[/Pattern [/DeviceGray]] setcolorspace			FrameCurPat setcolor		} { 			graymode not fMLevel1 and {				% Level 1 patterns are either all there or not there at all				dup 1 lt {pop FrameCurGray} if			} if			RealSetgray		} ifelse	} ifelse} bind def/savematrix {	orgmatrix currentmatrix pop	} bind def/restorematrix {	orgmatrix setmatrix	} bind def/fMDefaultMatrix matrix defaultmatrix def/fMatrix2 matrix def/dpi    72 0 fMDefaultMatrix dtransform    dup mul exch   dup mul add   sqrt def	% freq and sangle are used for ps Level 1 pattern building./freq dpi dup 72 div round dup 0 eq {pop 1} if 8 mul div def/sangle 1 0 fMDefaultMatrix dtransform exch atan def	sangle fMatrix2 rotate 	fMDefaultMatrix fMatrix2 concatmatrix 	dup 0 get /sflipx exch def	    3 get /sflipy exch def%% screen index depending on dpi%	- screenIndex smallint/screenIndex {	0 1 dpiranges length 1 sub { dup dpiranges exch get 1 sub dpi le {exit} {pop} ifelse } for} bind def%% These routines get the standard Adobe frequencies, angles, and spot functions% depending on the DPI%% - getCyanScreen freq angle spotfunction/getCyanScreen {	FMUseHighFrequencyScreens { CHighAngles CMHighFreqs} {CLowAngles CMLowFreqs} ifelse		screenIndex dup 3 1 roll get 3 1 roll get /FMSpotFunction load} bind def%% - getMagentaScreen freq angle spotFunction/getMagentaScreen {	FMUseHighFrequencyScreens { MHighAngles CMHighFreqs } {MLowAngles CMLowFreqs} ifelse		screenIndex dup 3 1 roll get 3 1 roll get /FMSpotFunction load} bind def%% - getYellowScreen freq angle spotFunction% note that some of these use a "tripple dot" function at 1/3 the frequency/getYellowScreen {	FMUseHighFrequencyScreens { YHighTDot YHighFreqs} { YLowTDot YLowFreqs } ifelse		screenIndex dup 3 1 roll get 3 1 roll get { 3 div			{2 { 1 add 2 div 3 mul dup floor sub 2 mul 1 sub exch} repeat			FMSpotFunction } } {/FMSpotFunction load } ifelse			0.0 exch} bind def%% - getBlackScreen freq angle spotFunction/getBlackScreen  {	FMUseHighFrequencyScreens { KHighFreqs } { KLowFreqs } ifelse		screenIndex get 45.0 /FMSpotFunction load } bind def%% - getSpotScreen freq angle spotFunction/getSpotScreen {	getBlackScreen} bind def%% - getCompositeScreen freq angle spotFunction/getCompositeScreen {	getBlackScreen} bind def% FmSetScreen sets the screen for either PostScript Level 1 or Level 2 and optionally% sets the accuratescreens flag in the latter case% freq angle spotfunction FMSetScreen -/FMSetScreen 	fMLevel1 { /setscreen load 	}{ {		8 dict begin		/HalftoneType 1 def		/SpotFunction exch def		/Angle exch def		/Frequency exch def		/AccurateScreens FMUseAcccurateScreens def		currentdict end sethalftone	} bind } ifelsedef% This sets the default screen as was set at the beginning of the job% - setDefaultScreen -/setDefaultScreen {	FMPColor {		orgrxfer cvx orggxfer cvx orgbxfer cvx orgxfer cvx setcolortransfer	}	{		orgxfer cvx settransfer	} ifelse	orgfreq organgle orgproc cvx setscreen} bind def% This sets the current screen depending on FrameSepIs% - setCurrentScreen -/setCurrentScreen {	FrameSepIs FMnone eq {		FMUseDefaultNoSeparationScreen {			setDefaultScreen		} {			getCompositeScreen FMSetScreen		} ifelse	} {		FrameSepIs FMcustom eq {			FMUseDefaultSpotSeparationScreen {				setDefaultScreen			} {				getSpotScreen FMSetScreen			} ifelse		} {			FMUseDefaultProcessSeparationScreen {				setDefaultScreen

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -