summary refs log tree commit diff
path: root/ppmtoacad.html
blob: c259c831ba07b457798cb49a8357e31ba0e1e529 (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmtoacad User Manual</title></head>
<body>
<h1>ppmtoacad</h1>
Updated: 10 October 1991
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

ppmtoacad - convert PPM to Autocad database or slide

<h2 id="synopsis">SYNOPSIS</h2>

<b>ppmtoacad</b>

[<b>-dxb</b>]

[<b>-poly</b>]

[<b>-background</b> <i>color</i>]

[<b>-white</b>]

[<b>-aspect</b> <i>ratio</i>]

[<b>-8</b>]

[<i>ppmfile</i>]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>ppmtoacad</b> reads a PPM image as input and produces an
Autocad&#174; slide file or binary database import (.dxb) file as
output.  If you don't specify <i>ppmfile</i>,
<b>ppmtoacad</b> takes the input from Standard Input.

<p>(Typographical note: the name of Autocad is often rendered as
AutoCAD.  Netpbm documentation uses standard American typography, wherein
that is not a valid form of capitalization).

<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>ppmtoacad</b> recognizes the following
command line options:

<p>You may abbreviate any option to its shortest unique prefix.

<dl compact>
<dt><b>-dxb</b>

<dd><b>ppmtoacad</b> writes an Autocad binary database import (.dxb)
file.  You read this file with the DXBIN command and, once loaded, it
becomes part of the Autocad geometrical database, so you can view and
edit it like any other object.  Each sequence of identical pixels
becomes a separate object in the database; this can result in very
large Autocad drawing files.  However, if you want to trace over a
bitmap, it lets you zoom and pan around the bitmap as you wish.

<dt><b>-poly</b>

<dd>If you don't specify the <b>-dxb</b> option, <b>ppmtoacad</b>
generates an Autocad slide file.  Normally each row of pixels is
represented by an Autocad line entity.  If you specify <b>-poly</b>,
<b>ppmtoacad</b> renders the pixels as filled polygons.  If you view
the slide on a display with higher resolution than the source image,
this will cause the pixels to expand instead of appearing as discrete
lines against the screen background color.  Regrettably, this
representation yields slide files which occupy more storage space and
take longer to display.

<dt><b>-background</b> <i>color</i>

<dd>Most Autocad display drivers can be configured to use any
available color as the screen background.  Some users prefer a black
screen background, others white, while splinter groups advocate burnt
ocher, tawny puce, and shocking gray.  Discarding pixels whose closest
Autocad color representation is equal to the background color can
substantially reduce the size of the Autocad database or slide file
needed to represent a bitmap.  If you don't specify
<b>-background</b>, <b>ppmtoacad</b> assumes the screen background
color to be black.  You may specify any Autocad color number as the
screen background; <b>ppmtoacad</b> assumes color numbers to specify
the hues defined in the standard Autocad 256 color palette.

<dt><b>-white</b>

<dd>Since many Autocad users choose a white screen background, this
option is provided as a short-cut.  Specifying <b>-white</b> is
identical in effect to <b>-background 7</b>.

<dt><b>-aspect</b> <i>ratio</i>

<dd>If the source image had non-square pixels (which means it is not
standard PPM), specify the ratio of the pixel width to pixel height as
<i>ratio</i>.  <b>ppmtoacad</b> will correct the resulting slide or
.dxb file so that pixels on the Autocad screen will be square.  For
example, to correct an image made for a 320x200 VGA/MCGA screen,
specify <b>-aspect 0.8333</b>.

<dt><b>-8</b>

<dd>Restricts the colors in the output file to the 8 RGB shades.
</dl>

<h2 id="restrictions">RESTRICTIONS</h2>

<p>Autocad has a fixed palette of 256 colors, distributed along the
hue, lightness, and saturation axes.  So it may poorly render images
which contain many nearly-identical colors, or colors not closely
approximated by Autocad's palette.

<p><b>ppmtoacad</b> works best if the system displaying its output can
display the full 256 color Autocad palette.  Monochrome, 8 color, and
16 color configurations will produce less than optimal results.

<p>When creating a .dxb file or a slide file with the <b>-poly</b>
option, <b>ppmtoacad</b> finds both vertical and horizontal runs of
identical pixels and consolidates them into rectangular regions to
reduce the size of the output file.  This is effective for images with
large areas of constant color but it's no substitute for true raster
to vector conversion.  In particular, this process does not optimize
thin diagonal lines at all.

<p>Output files can be huge.

<h2 id="seealso">SEE ALSO</h2>

<p>Autocad Reference Manual: <i>Slide File Format</i> and <i>Binary
Drawing Interchange (DXB) Files</i>, <b><a href="ppm.html">ppm</a></b>

<h2 id="author">AUTHOR</h2>

<pre>
John Walker
Autodesk SA
Avenue des Champs-Montants 14b
CH-2074 MARIN
Suisse/Schweiz/Svizzera/Svizra/Switzerland
    <b>Usenet:</b><a href="mailto:kelvin@Autodesk.com">kelvin@Autodesk.com</a>
    <b>Fax:</b>038/33 88 15
    <b>Voice:</b>038/33 76 33
</pre>

<p>Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
without any conditions or restrictions.  This software is provided
"as is" without express or implied warranty.

<p>Autocad and Autodesk are registered trademarks of Autodesk, Inc.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#restrictions">RESTRICTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>