about summary refs log tree commit diff
path: root/ppmtoacad.html
blob: c8c73de38353073d68a6f407d81239926e574da3 (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
168
169
170
171
172
173
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//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>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

ppmtoacad - convert PPM to Autocad database or slide

<A NAME="lbAC">&nbsp;</A>
<H2>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>]


<A NAME="lbAD">&nbsp;</A>
<H2>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).

<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>

<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>

<A NAME="lbAF">&nbsp;</A>
<H2>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.

<A NAME="lbAG">&nbsp;</A>
<H2>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>

<A NAME="lbAH">&nbsp;</A>
<H2>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
&quot;as is&quot; without express or implied warranty.

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

<HR>
<A NAME="index">&nbsp;</A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#lbAB">NAME</A>
<LI><A HREF="#lbAC">SYNOPSIS</A>
<LI><A HREF="#lbAD">DESCRIPTION</A>
<LI><A HREF="#lbAE">OPTIONS</A>
<LI><A HREF="#lbAF">LIMITATIONS</A>
<LI><A HREF="#lbAG">SEE ALSO</A>
<LI><A HREF="#lbAH">AUTHOR</A>
</UL>
</BODY>
</HTML>