🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.postscript
Article #848

Re: Filter for Color PS --> Monocro PS ??

#848
From: MASUTANI Yasuhiro
Date: Thu, 25 Feb 1993 11:58
213 lines
8000 bytes
$@>#C+!w:eBg$G$9!%(J

In article <TAZAWA.93Feb25045018@sacher.sugie.nuee.nagoya-u.ac.jp> 
	tazawa@sugie.nuee.nagoya-u.ac.jp (Tazawa Tooru) writes:

 |LaserPrep $@%U%!%$%k$r;29M$K$7(J$@$F$J$s$H$+0u:~$G$-$k$h$&$J$b$N$r:n$C$F!"$7(J
 |$@$N$$$@$s$G$9$,!"(JPostScript $@$r$"$^$j>\$7$/CN$i$J$$$G:n$C$?(J$@$N$G!"$G$-$l(J
 |$@$P$3$A$i$K$bD:$1$?$i$"$j$,$?$$$G$9!#(J

$@%a%$%k$G$b%j%/%(%9%H$,$"$j$^$7$?$N$G!$$3$N5-;v$N(J$@:G8e$KIU$1$^$9!%;d$O(JPS
$@$NJ8K!$rCN$j$^$;$s$N$G>e<j$K@bL@$G$-$^$;$s$,!$$3$l$O%+%i!<$N(JPS$@$r%b%N%/(J
$@%m$KJQ49(J$@$9$k$b$N$G$O$J$/!$%+%i!<$N%3%^%s%I$NDj5A$rIU$12C$($k$b$N$@$H;W(J
$@$$$^$9!%=>$C$F!$%W%j%s%?$XAw$i$l$k%G!<(J$@%?NL$,8:$k$o$1$G$O$"$j$^$;$s!%(J

 |$@$3$A$i$N8&5f<<$G$b!"(Jpnmtops $@$G:n$C$?(J eps $@$,F~$C$F$$$k(J ps $@%U%!%$%k$r(J
 | LaserWriter II NTX-J $@$G0u:~$7$h$&$H$9$k$H!"(J
 |
 |	  %%[ Error: undefined; OffendingCommand: colorimage ]%%
 |
 |$@$H%(%i!<$,=P$F$7$^$$0u:~$G$-$^$;$s$G$7$?!#;EJ}$,$J$$$N$G(J Machintosh $@$N(J

$@$=$N(Jeps$@$,:n$jD>(J$@$;$J$$$b$N$J$i$P!$$3$l$,M-8z$G$9!%$7$+$7!$85$N%+%i!<$N(J
$@2hA|%G!<%?$,$"$k$J$i$P!$(Jpnmtops$@$N%^%K%e%"%k$K=q(J$@$+$l$F$$$k$h$&$K!$(J
ppmtopgm $@$r;H$C$F(JPGM$@$KJQ49$7$F$+$i(Jpnmtops$@$r;H$&$Y$-$@$H;W$$$^$9!%(J


$@$=$l$G$O!$(Jadobe_colorops.ps$@$G$9!%(J

--------------------------- $@$3$3$+$i(J -----------------------------------
%!
%%Title: adobe_colorops.ps
%%CreationDate: Mon Nov 14 14:23:27 1988
%%Creator: Glenn Reid, Adobe Systems Incorporated
%%EndComments

% Copyright (c) 1988, 1989 Adobe Systems Incorporated.  All rights reserved.

%%VMUsage: 1536

%%BeginProcSet: adobe_install 1.0
/installprocset { %def		% /name (endflag)
    where { %ifelse
	pop
	(flushing ... ) print
	save 256 string
	    { %loop
		currentfile 1 index readline not { pop pop exit }{ %ifelse
		    3 index eq { pop exit } if
		} ifelse
	    } loop
	restore	pop (done) =
    }{ pop } ifelse
} bind def
%%EndProcSet: adobe_install 1.0

(%%EndProcSet: adobe_colorops 1.0)	% flush to this flag if found
/colorimage				% test for this operator
installprocset

% This file implements backward-compatibility packages for many of the
% new color PostScript operators. These are most useful when a document
% is to be sent to a printer which does not have any of these
% language extensions.  These packages should permit the file to print
% correctly on most or all PostScript printers.

% The routines are broken into procsets and delimited with comments.
%
% SUPPORTED:
%    colorimage
%    setcmykcolor		currentcmykcolor
%    setblackgeneration		currentblackgeneration
%    setcolorscreen		currentcolorscreen
%    setcolortransfer		currentcolortransfer
%    setundercolorremoval	currentundercolorremoval

% Caveats:  these procedures, in order to keep them reasonable,
% do not do extensive error checking, and may not report the same
% errors that the original operators would.  However, if called with
% appropriate arguments, they should perform reasonably.

%%BeginProcSet: adobe_ifnotdef 1.0
/ifnotdef { %def
    1 index where { pop pop pop }{ def } ifelse
} bind def
%%EndProcSet: ifnotdef 1.0

%%BeginProcSet: adobe_packing 1.0
/setpacking { %def
    pop
} bind ifnotdef
/currentpacking { %
    false
} bind ifnotdef
%%EndProcSet: adobe_packing 1.0

%%BeginProcSet: adobe_colorops 1.0
/adobe_colorops 1.0 def		% version number

% w h bits matrix proc0 [...procncolors-1] multiproc ncolors colorimage -

% The "colorimage" operator takes composite color data and renders it to
% a full-color device.  In order to simulate this on a grayscale device,
% the "image" operator must be used.  The basic approach is to discard
% a great deal of the data.  In the RGB case, we throw out 2/3 of the data.
% in the CMYK case, we throw out 3/4 of the data.  The remaining data is
% used as the grayscale argument to "image".  The data is thrown away in
% as reasonable a fashion as can be implemented.  For the multi-proc
% cases, it keeps alternating every scan line, throwing away red, then
% green, then blue, etc.  For the single-proc case, the interleaved data
% is not extracted in some reasonable fashion, and the image may not even
% resemble the original.  It will, however, execute correctly and image
% in the correct area on the page.

/colorimage { %def
    (trying to find "ncolors" proc) exch
    dummy exch get
    exch pop exec	%if no errors
} bind def

currentpacking true setpacking

3 dict begin	% the "ncolors" choices are stored as procs in this dict
    1 { %def	% gray scale case
	image
    } bind def
    3 { %def	% RGB case
	/savelevel save def 10 dict begin
	    { %ifelse (multiproc)
		/Bproc exch def /Gproc exch def /Rproc exch def
		1 5 1 roll	% leave "1" on stack
		{ 1 add Rproc Gproc Bproc 3 4 index roll pop pop }
		image pop
	    }{ %else
		/RGBproc exch def
		/mtx exch def /bits exch def /height exch def /width exch def
		width height bits mtx
		{ RGBproc dup length 3 idiv 0 exch getinterval } image
	    } ifelse
	end savelevel restore
    } bind def
    4 { %def	% CMYK case
	/savelevel save def 10 dict begin
	    { %ifelse (multiproc)
		/Kproc exch def /Yproc exch def /Mproc exch def /Cproc exch def
		1 5 1 roll	% leave "1" on stack
		{ 1 add Cproc Mproc Yproc Kproc 4 5 index roll pop pop pop }
		image pop
	    }{ %else
		/CMYKproc exch def
		/mtx exch def /bits exch def /height exch def /width exch def
		width height bits mtx
		{ CMYKproc dup length 4 idiv 0 exch getinterval } image
	    } ifelse
	end savelevel restore
    } bind def
currentdict end
/colorimage load exch 2 exch put	% replace "dummy" with this dict

/setblackgeneration { %def
    pop
} bind def

/currentblackgeneration { %def
    {}    % use null proc
} bind def

/setcmykcolor { %def
    1 sub 4 1 roll
    3 { %repeat
	3 index add neg dup 0 lt {pop 0} if 3 1 roll
    } repeat setrgbcolor pop
} bind def

/currentcmykcolor { %def
    currentrgbcolor	% R G B
    3 { %repeat
	1 exch sub 3 1 roll
    } repeat
    0
} bind def

/setcolorscreen { %def
    setscreen 9 { pop } repeat
} bind def

/currentcolorscreen { %def
    currentscreen 3 copy 6 copy
} bind def

/setcolortransfer { %def
    settransfer pop pop pop
} bind def

/currentcolortransfer { %def
    currenttransfer dup dup dup
} bind def

/setundercolorremoval { %def
    pop
} bind def

/currentundercolorremoval { %def
    {}
} bind def

setpacking	% uses value on stack from currentpacking
%%EndProcSet: adobe_colorops 1.0
--------------------------- $@$3$3$^$G(J -----------------------------------
--
==================================================================
  $@>#C+!!J]Gn(J                       560 $@Bg:eI\K-Cf;TBT7s;3D.(J$@#1!]#1(J
                                   Tel.  06-844-1151 $@Fb@~(J4506
  $@Bg:eBg3X(J $@4pAC9)3XIt(J $@5!3#9)3X2J(J   Fax.  06-843-9730 $@D>DL(J      
Technical Details
Message-ID: <MASUTANI.93Feb25205851@gull.mees.osaka-u.ac.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!news.u-tokyo.ac.jp!wnoc-tyo-news!sh.wide!wnoc-kyo!icspub!mother!mother!masutani
References: <MASUTANI.93Feb22035535@gull.mees.osaka-u.ac.jp> <MASUTANI.93Feb24180307@gull.mees.osaka-u.ac.jp> <TAZAWA.93Feb25045018@sacher.sugie.nuee.nagoya-u.ac.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: fa2ca,a73af365231098f2
X-Google-Attributes: gidfa2ca,public
X-Google-ArrivalTime: 1993-02-19 20:26:36 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!news.u-tokyo.ac.jp!wnoc-tyo-news!sh.wide!wnoc-kyo!icspub!mother!mother!masutani
From: masutani@gull.mees.osaka-u.ac.jp (MASUTANI Yasuhiro)
Newsgroups: fj.lang.postscript
Subject: Re: Filter for Color PS --> Monocro PS ??
Message-ID: <MASUTANI.93Feb25205851@gull.mees.osaka-u.ac.jp>
Date: 25 Feb 93 11:58:51 GMT
References: <MASUTANI.93Feb22035535@gull.mees.osaka-u.ac.jp>
 <MASUTANI.93Feb24180307@gull.mees.osaka-u.ac.jp>
 <TAZAWA.93Feb25045018@sacher.sugie.nuee.nagoya-u.ac.jp>
Sender: news@mother.mees.osaka-u.ac.jp (News Manager)
Reply-To: masutani@mees.osaka-u.ac.jp
Distribution: fj
Organization: Dept. of Mech. Eng, Faculty of Eng. Sci., Osaka Univ., JAPAN
Lines: 213
In-Reply-To: tazawa@sugie.nuee.nagoya-u.ac.jp's message of 24 Feb 93 19:49:55 GMT