🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
2 messages
2 total messages Started by Jorge Lach - Sun BOS Hardware Thu, 12 Nov 1992 14:37
Watermark/Draft Program
#4066
Author: Jorge Lach - Sun BOS Hardware
Date: Thu, 12 Nov 1992 14:37
22 lines
1511 bytes
I'm looking for a program that will print a "watermark" accross every page of
a postscript file. I am using one now, but it's got a few problems/limitations:
	(1) It does only single line watermarks; doing 2 or more lines, if possible
	    with different font size would be better
	(2) It does only block (i.e. outline) characters; I'm looking for something
	    that will do solid gray characters; color watermark is even better
	(3) It uses "sed" to process the input file. Now, my source has an EPS insert,
	    and it seems to come from a non-Unix system (PC?). Seems like CR's are
	    missing; it prints OK, but sed complains about "line too long" and dies,
	    truncating the file. I've had to go around this using other arcane edit
	    methods... So, if the program doesn't use sed or something else relying
	    on Unix's line lenght, the better

Please respond to me by e-Mail, as I read news every once in a while. Thanks


Jorge Lach
Sun Microsystems Computer Corp.
East Cost Division

jorge.lach@Sun.com
jorge@erex.East.Sun.com
Level 2 image operator - help needed
#5674
Author: Chris Lilley
Date: Fri, 13 Nov 1992 02:41
121 lines
4447 bytes
Hi

I am having trouble understanding the Level 2 image operator - the one
operand form that takes a dictionary.

I can use ABC colour spaces OK but when it comes to the image operator
things go wrong. Here is a program that shows what I am doing. It is
all pretty much by the (Big Red) book. What happens is that the 'RGB'
text comes out in colour but the image comes out as a jet black
square.

If anyone can tell me what I am doing wrong I would be grateful.

Chris

======== snip snip ===============================================

%!PS-Adobe-3.0
%	Test out CIE colour space image.

%	Uses CIELUV colour space, prints an image with black (000) at the
%	bottom left, white (100) at top left and 9 intermediate steps of L*

%	U goes from 0 to 56 (out of a range of 127) in the hope of being
%	mostly within the device gamut, in 9 steps.
%	V is constant at 0. So this gives a vertical slice through LUV space
%	from the achromatic axis out along the positive U axis (reds)

%	I should probably used a procedure as datasource but find&replace 
%	was quicker ;-) 

%	Some colours will be out of gamut - the high chroma dark ones - so
%	I wanted to see what happened. Clip to device gamut?

%	Chris Lilley 13 Nov 92 01:08 GMT	lilley@v5.cgu.mcc.ac.uk

%%Pages: 1
%%BeginSetup

%	Set up CIELUV colour space
%	straight from Big Red Book p191

[/CIEBasedABC <<
  /RangeABC [0 100 -128 127 -128 127]
  /DecodeABC [{16 add 116 div} bind {500 div} bind {200 div} bind]
  /MatrixABC [1 1 1 1 0 0 0 0 -1]
  /DecodeLMN
    [{dup 6 29 div ge {dup dup mul mul} 
         {4 29 div sub 108 841 div mul} ifelse 0.9505 mul} bind
     {dup 6 29 div ge {dup dup mul mul} 
         {4 29 div sub 108 841 div mul} ifelse} bind
     {dup 6 29 div ge {dup dup mul mul}
         {4 29 div sub 108 841 div mul} ifelse 1.0890 mul} bind]
  /WhitePoint [0.9505 1 1.0890]	% D65 white point
>>] setcolorspace

%%EndSetup
%%Page: 1 1

/inch {72 mul} def

%	Do some general colour stuff first to test the LUV space works

2 inch 8 inch moveto
/Times-Bold findfont 96 scalefont setfont
50 80 0 setcolor	% a red
(R) show
50 -40 69 setcolor	% a green
(G) show
50 -40 -69 setcolor	% a blue
(B) show
/Times-Bold findfont 30 scalefont setfont
30 0 0 setcolor		% a grey
( - not!) show

%	Now to try the image - first size and place it

2 inch 2 inch translate
4 inch 4 inch scale

%	1 operand image, from Big Red Book p226 but:
%	 less data, and bottom to top ordering
<<
  /ImageType 1
  /Width 8 /Height 11
  /BitsPerComponent 8
  /Decode [0 1 0 1 0 1]
  /ImageMatrix [ 8 0 0 11 0 0]	% left to right, bottom to top
  /DataSource currentfile /ASCIIHexDecode filter
>> image

000000 000800 001000 001800 002000 002800 003000 003800
0A0000 0A0800 0A1000 0A1800 0A2000 0A2800 0A3000 0A3800
140000 140800 141000 141800 142000 142800 143000 143800
1E0000 1E0800 1E1000 1E1800 1E2000 1E2800 1E3000 1E3800
280000 280800 281000 281800 282000 282800 283000 283800
320000 320800 321000 321800 322000 322800 323000 323800
3C0000 3C0800 3C1000 3C1800 3C2000 3C2800 3C3000 3C3800
460000 460800 461000 461800 462000 462800 463000 463800
500000 500800 501000 501800 502000 502800 503000 503800
5A0000 5A0800 5A1000 5A1800 5A2000 5A2800 5A3000 5A3800
640000 640800 641000 641800 642000 642800 643000 643800
>

%	The > is an EOD (end of data) marker (BRB p128) and white space is
%	ignored supposedly

showpage	% Please?
%%Trailer
%%EOF

================= code ends =====================

--
Chris Lilley
---------------------------------------------------------------------------
Technical Author, ITTI Computer Graphics and Visualisation Training Project
Computer Graphics Unit, Manchester Computing Centre, Manchester, UK
Internet:   lilley@cgu.mcc.ac.uk        Janet:   lilley@uk.ac.mcc.cgu
Voice:      +44 (0)61 275 6095          Fax:     +44 (0)61 275 6040
---------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads