-->

Previous | Table of Contents | Next

Page 415

OPTIONS

-dxb An AutoCAD binary database import (DXB) file is written. This file is read with the DXBIN command and, once loaded, becomes part of the AutoCAD geometrical database and can be viewed and edited 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.
-poly If the -dxb option is not specified, the output of ppmtoacad is an AutoCAD slide file. Normally, each row of pixels is represented by an AutoCAD line entity. If -poly is selected, the pixels are rendered as filled polygons. If the slide is viewed on a display with higher resolution than the source pixmap, this will cause the pixels to expand instead of appearing as discrete lines against the screen background color. Regrettably, this representation yields slide files that occupy more disc space and take longer to display.
-background color 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 no -background color is specified, the screen background color is assumed to be black. Any AutoCAD color number may be specified as the screen background; color numbers are assumed to specify the hues defined in the standard AutoCAD 256-color palette.
-white Because many AutoCAD users choose a white screen background, this option is provided as a short-cut. Specifying -white is identical in effect to -background 7.
-aspect ratio If the source pixmap had nonsquare pixels, the ratio of the pixel width to pixel height should be specified as ratio. The resulting slide or DXB file will be corrected so that pixels on the AutoCAD screen will be square. For example, to correct an image made for a 320¥200 VGA/MCGA screen, specify -aspect 0.8333.
-8 Restricts the colors in the output file to the eight RGB shades.

All flags can be abbreviated to their shortest unique prefix.

BUGS

AutoCAD has a fixed palette of 256 colors, distributed along the hue, lightness, and saturation axes. Pixmaps that contain many nearly identical colors, or colors not closely approximated by AutoCAD's palette, may be poorly rendered.

ppmtoacad works best if the system displaying its output supports the full 256 color AutoCAD palette. Monochrome,
8-color, and 16-color configurations will produce less than optimal results.

When creating a DXB file or a slide file with the -poly option, ppmtoacad 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, thin diagonal lines are not optimized at all by this process.

Output files can be huge.

SEE ALSO

AutoCAD Reference Manual: "Slide File Format" and "Binary Drawing Interchange (DXB) Files"; ppm(5)

AUTHOR

John Walker
Autodesk SA
Avenue des Champs-Montants 14b
CH-2074 MARIN
Suisse/Schweiz/Svizzera/Svizra/Switzerland

Page 416

Usenet: kelvin@Autodesk.com
Fax: 038/33 88 15
Voice: 038/33 76 33

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.

AutoCAD and Autodesk are registered trademarks of Autodesk, Inc.

10 October 1991

ppmtobmp

ppmtobmp—Convert a portable pixmap into a BMP file

SYNOPSIS


ppmtobmp [_windows][_os2][ppmfile]

DESCRIPTION

ppmtobmp reads a portable pixmap as input and produces a Microsoft Windows or OS/2 BMP file as output.

OPTIONS

_windows Tells the program to produce a Microsoft Windows BMP file.
_os2 Tells the program to produce an OS/2 BMP file. (This is the default.)

All flags can be abbreviated to their shortest unique prefix.

SEE ALSO


bmptoppm(1), ppm(5)

AUTHOR

Copyright" 1992 by David W. Sanderson.

26 October 1992

ppmtogif

ppmtogif—Convert a portable pixmap into a GIF file

SYNOPSIS


ppmtogif [-interlace][-sort][-map mapfile][-transparent color][ppmfile]

DESCRIPTION

ppmtogif reads a portable pixmap as input and produces a GIF file as output.

OPTIONS

-interlace Tells the program to produce an interlaced GIF file.
-sort Produces a GIF file with a sorted colormap.
-map mapfile Uses the colors found in the mapfile to create the colormap in the GIF file, instead of the colors from ppmfile. The mapfile can be any ppm file; all that matters is the colors in it. If the colors in

Page 417

ppmfile do not match those in mapfile, they are matched to a "best match." A (much) better result can be obtained by using the following filter in advance: ppmquant -floyd -map mapfile
_transparent color Mark the given color as transparent in the GIF file. The color is specified as in ppmmake(1). Note that this option outputs a GIF89a format file, which might not be understood by your software.

All flags can be abbreviated to their shortest unique prefix.

SEE ALSO


giftoppm(1), ppmquant(1), ppm(5)

AUTHOR

Based on GIFENCOD by David Rowley (mgardi@watdcsu.waterloo.edu). Lempel-Ziv compression based on compress.

Copyright" 1989 by Jef Poskanzer.

30 June 1993

ppmtoicr

ppmtoicr—Convert a portable pixmap into NCSA ICR format

SYNOPSIS


ppmtoicr [-windowname name][-expand expand][-display display][-rle][ppmfile]

DESCRIPTION

ppmtoicr reads a portable pixmap file as input and produces an NCSA Telnet Interactive Color Raster graphic file as output. If ppmfile is not supplied, ppmtoicr will read from standard input.

Interactive Color Raster (ICR) is a protocol for displaying raster graphics on workstation screens. The protocol is implemented in NCSA Telnet for the Macintosh version 2.3. The ICR protocol shares characteristics of the Tektronix graphics terminal emulation protocol. For example, escape sequences are used to control the display.

ppmtoicr will output the appropriate sequences to create a window of the dimensions of the input pixmap, create a colormap of up to 256 colors on the display, then load the picture data into the window.

Note that there is no icrtoppm tool; this transformation is one-way.

OPTIONS

-windownamename Output will be displayed in name. (Default is to use ppm-file or "untitled" if standard input is read.)
-expandexpand Output will be expanded on display by factor expand. (For example, a value of 2 will cause four pixels to be displayed for every input pixel.)
-displaydisplay Output will be displayed on screen numbered display.
-rle Use run-length encoded format for display. (This will nearly always result in a quicker display, but may skew the colormap.)

Examples

This displays a ppm file using the protocol:


ppmtoicr ppmfile

This will create a window named ppmfile on the display with the correct dimensions for ppmfile, create and download a colormap of up to 256 colors, and download the picture into the window. The same effect may be achieved by the following sequence:

Previous | Table of Contents | Next