File: node126.html

package info (click to toggle)
gmt-doc 3.4-1.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,756 kB
  • ctags: 1,800
  • sloc: makefile: 30
file content (308 lines) | stat: -rw-r--r-- 12,299 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>H.1 PostScript driver bugs</TITLE>
<META NAME="description" CONTENT="H.1 PostScript driver bugs">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="GMT_Docs.css">

<LINK REL="next" HREF="node127.html">
<LINK REL="previous" HREF="node125.html">
<LINK REL="up" HREF="node125.html">
<LINK REL="next" HREF="node127.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html2818"
  HREF="node127.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> 
<A NAME="tex2html2812"
  HREF="node125.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> 
<A NAME="tex2html2806"
  HREF="node125.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> 
<A NAME="tex2html2814"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A> 
<A NAME="tex2html2816"
  HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html2819"
  HREF="node127.html">H.2 Resolution and dots</A>
<B> Up:</B> <A NAME="tex2html2813"
  HREF="node125.html">H. Problems with display</A>
<B> Previous:</B> <A NAME="tex2html2807"
  HREF="node125.html">H. Problems with display</A>
 &nbsp <B>  <A NAME="tex2html2815"
  HREF="node1.html">Contents</A></B> 
 &nbsp <B>  <A NAME="tex2html2817"
  HREF="node149.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION002310000000000000000">
H.1 <I>PostScript</I> driver bugs</A>
</H1>
<A NAME="14585"></A>

<P>
When you try to display a <I>PostScript</I> file on a device,
such as a printer or your screen, then a program called a
<I>PostScript</I> device driver has to compute which device
pixels should receive which colors (black or white in the case
of a simple laser printer) in order to display the file.  At
this stage, certain device-dependent things may happen.  These
are not limitations of <A NAME="tex2html648"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> or <I>PostScript</I>, but of the
particular display device.  The following bugs are known to us
based on our experiences:

<P>

<A NAME="14587"></A>

<OL>
<LI>Early versions of the Sun SPARCprinter software
caused linewidth-dependent path displacement.  We reported
this bug and it has been fixed in newer versions of the software.
Try using <A NAME="tex2html649"
  HREF="../psxy.html"><I><B>psxy</B></I></A><A NAME="14684"></A> to draw <IMG
 WIDTH="59" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img14.gif"
 ALT="$y = f(x)$"> twice, once with a
thin pen (<B>-W</B>1) and once with a fat pen (<B>-W</B>10);
if they do not plot on top of each other, you have this kind
of bug and need new software.  The problem may also show up
when you plot a mixture of solid and dashed (or dotted) lines
of various pen thickness

<P>
<A NAME="14591"></A>

<P>
</LI>
<LI>The first version of the HP Laserjet 4M (prior to Aug-93)
had bugs in the driver program.  The old one was
<I>PostScript</I> SIMM, part number C2080-60001; the new one
is called <I>PostScript</I> SIMM, part number C2080-60002.
You need to get this one plugged into your printer if you have
an HP LaserJet 4M.

<P>
<A NAME="14592"></A>

<P>
</LI>
<LI>Apple Laserwriters with the older versions of Apple's
<I>PostScript</I> driver will give the error ``limitcheck''
and fail to plot when they encounter a path exceeding about
1000-1500 points.  Try to get a newer driver from Apple, but
if you can't do that, set the parameter MAX_L1_PATH to
1000-1500 or even smaller in the file <U>src/pslib_inc.h</U>
and recompile <A NAME="tex2html650"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A>.  The number of points in a <I>PostScript</I> path can be arbitrarily large, in principle; <A NAME="tex2html651"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> will only
create paths longer than MAX_L1_PATH if the path represents
a filled polygon or clipping path.  Line-drawings (no fill)
will be split so that no segment exceeds MAX_L1_PATH.
This means <A NAME="tex2html652"
  HREF="../psxy.html"><I><B>psxy</B></I></A><A NAME="14708"></A> <B>-G</B> will issue a warning when you
plot a polygon with more than MAX_L1_PATH points in it.  It is
then your responsibility to split the large polygon into several
smaller segments.  If <A NAME="tex2html653"
  HREF="../pscoast.html"><I><B>pscoast</B></I></A><A NAME="14718"></A> gives such warnings and the
file fails to plot you may have to select one of the lower
resolution databases  The path limitation exemplified by these
Apple printers is what makes the higher-resolution coastlines
for <A NAME="tex2html654"
  HREF="../pscoast.html"><I><B>pscoast</B></I></A><A NAME="14727"></A> non-trivial:  such coastlines have to be
organized so that fill operations do not generate excessively
large paths.  Some HP <I>PostScript</I> cartridges for the
Laserjet III also have trouble with paths exceeding 1500
points; they may successfully print the file, but it can take
all night!
<A NAME="14598"></A>

<P>
<A NAME="14599"></A>

<P>
</LI>
<LI>8-bit color screen displays (and programs which use only
8-bits, even on 24-bit monitors, such as Sun's <I>pageview</I><A NAME="14738"></A> under
OpenWindows) may not dither cleverly, and so the color they show you
may not resemble the color your <I>PostScript</I> file is asking
for.  Therefore, if you choose colors you like on the screen,
you may be surprised to find that your plot looks different on
the hardcopy printer or film writer.  The only thing you can
do is be aware of this, and make some test cases on your hardcopy
devices and compare them with the screen, until you get used
to this effect.  (Each hardcopy device is also a little
different, and so you will eventually find that you want to
tune your color choices for each device.)  The rgb color cube
in example 11 may help.

<P>
</LI>
<LI>Some versions of Sun's OpenWindows program <I>pageview</I><A NAME="14744"></A>
have only a limited number of colors available; the number
can be increased somewhat by starting <I>openwin</I><A NAME="14749"></A> with the
option ``<TT>openwin -cubesize large</TT>''.

<P>
</LI>
<LI>Finally, <I>pageview</I><A NAME="14754"></A> seem to have problems understanding
the <TT>setpagedevice</TT> operator.  We recommend you only use
<I>pageview</I><A NAME="14759"></A> on EPS files or use <I>ghostview</I><A NAME="14764"></A> instead.

<P>
<A NAME="14608"></A>

<P>
</LI>
<LI>Many color hardcopy devices use CMYK color systems. <A NAME="tex2html655"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> <I>PostScript</I> uses RGB (even if your cpt files are using HSV).
The three coordinates of RGB space can be mapped into three
coordinates in CMY space, and in theory K (black) is superfluous.
But it is hard to get CMY inks to mix into a good black or gray,
so these printers supply a black ink as well, hence CMYK.  The
<I>PostScript</I> driver for a CMYK printer should be smart
enough to compute what portion of CMY can be drawn in K, and
use K for this and remove it from CMY; however, some of them
aren't.

<P>
</LI>
<LI>In early releases of <A NAME="tex2html656"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> we always used the <I>PostScript</I> command <TT>r g b setrgbcolor</TT> to specify colors, even if the color
happened to be a shade of gray (<IMG
 WIDTH="65" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img170.gif"
 ALT="$r=g=b$">) or black (<IMG
 WIDTH="93" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img171.gif"
 ALT="$r=g=b=0$">).  One
of our users found that black came out muddy brown when he used
<I>FreedomOfPress</I><A NAME="14779"></A> to make a Versatec plot of a <A NAME="tex2html657"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> map.
He found that if he used the <I>PostScript</I> command <TT>g setgray</TT> (where <IMG
 WIDTH="12" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img172.gif"
 ALT="$g$">
is a graylevel) then the problem went away.
Apparently, his installation of <I>FreedomOfPress</I><A NAME="14788"></A> uses only CMY with
the command <TT>setrgbcolor</TT>, and so <TT>0 0 0 setrgbcolor</TT>
tries to make black out of CMY instead of K.  To fix this, in
release 2.1 of <A NAME="tex2html658"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> we changed some routines in <U>pslib.c</U>
to check if (<IMG
 WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img173.gif"
 ALT="$r=g$"> and <IMG
 WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img174.gif"
 ALT="$r=b$">), in which case <TT>g setgray</TT> is
used instead of <TT>r g b setrgbcolor</TT>.

<P>
</LI>
<LI>Recent experience with some Tektronix Phaser printers and
with commercial printing shops has shown that this substitution
creates problems precisely opposite of the problems our Versatec
user has.  The Tektronix and commercial (we think it was a Scitex)
machines do not use K when you say <TT>0 setgray</TT> but they do when
you say <TT>0 0 0 setrgbcolor</TT>.  We believe that these problems are
likely to disappear as the various software developers make their
codes more robust.  Note that this is not a fault with <A NAME="tex2html659"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A>:
<IMG
 WIDTH="93" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img171.gif"
 ALT="$r=g=b=0$"> means black and should plot that way.
Thus, the <A NAME="tex2html660"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> source code as shipped to you checks whether <IMG
 WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img173.gif"
 ALT="$r=g$">
and <IMG
 WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img174.gif"
 ALT="$r=b$">, in which case it uses <TT>setgray</TT>, else <TT>setrgbcolor</TT>.
If your gray tones are not being drawn with K, you have two
work-around options: (1) edit the source for <U>pslib.c</U>
or (2) edit your <I>PostScript</I> file and try using <TT>setrgbcolor</TT>
in all cases.  The simplest way to do so is to redefine the
<TT>setgray</TT> operator to use <TT>setrgbcolor</TT>.
Insert the line 
<BR>
<P>
<TT>/setgray  {dup dup setrgbcolor} def</TT> 
<BR>
<P>
immediately following the first line in the file (starts with
%!PS.) 

<P>
</LI>
<LI>Some color film writers are very sensitive to the brand
of film.  If black doesn't look black on your color slides, try
a different film.
<A NAME="14627"></A>

<P>
</LI>
</OL>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2818"
  HREF="node127.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> 
<A NAME="tex2html2812"
  HREF="node125.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> 
<A NAME="tex2html2806"
  HREF="node125.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> 
<A NAME="tex2html2814"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A> 
<A NAME="tex2html2816"
  HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html2819"
  HREF="node127.html">H.2 Resolution and dots</A>
<B> Up:</B> <A NAME="tex2html2813"
  HREF="node125.html">H. Problems with display</A>
<B> Previous:</B> <A NAME="tex2html2807"
  HREF="node125.html">H. Problems with display</A>
 &nbsp <B>  <A NAME="tex2html2815"
  HREF="node1.html">Contents</A></B> 
 &nbsp <B>  <A NAME="tex2html2817"
  HREF="node149.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>