Plan 9 from Bell Labs’s /usr/web/sources/contrib/pac/sys/doc/netpbm/ms/ppmtoicr.ms

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TL
Ppmtoicr User Manual
.SH 1
ppmtoicr
.LP
Updated: 30 July 1990
.br
Table Of Contents
.SH 2
NAME
.LP
ppmtoicr - convert a PPM image into NCSA ICR format 
.SH 2
SYNOPSIS
.LP
\fBppmtoicr\fR
[\fB-windowname\fR \fIname\fR]
[\fB-expand\fR \fIexpand\fR]
[\fB-display\fR \fIdisplay\fR]
[\fB-rle\fR]
[\fIppmfile\fR]
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
.LP
\fBppmtoicr\fR reads a PPM file as input.  Produces an NCSA Telnet
Interactive Color Raster graphic file as output.
If \fIppmfile\fR is not supplied, \fBppmtoicr\fR reads from Standard
Input.
.LP
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.
.LP
\fBppmtoicr\fR 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.
.LP
Note that there is no icrtoppm tool - this transformation is one
way.
.SH 2
OPTIONS
.LP
.RS
.IP "\fB-windowname\fR \fIname\fR"
Output will be displayed in \fIname\fR (Default is to use
\fIppmfile\fR or "untitled" if the input is from Standard
Input).
.IP "\fB-expand\fR \fIexpand\fR"
Output will be expanded on display by factor \fIexpand\fR (For
example, a value of 2 will cause four pixels to be displayed for every
input pixel.)
.IP "\fB-display\fR \fIdisplay\fR"
Output will be displayed on screen numbered \fIdisplay\fR
.IP "\fB-rle\fR"
Use run-length encoded format for display. (This will nearly
always result in a quicker display, but may skew the colormap).
.RE
.SH 2
EXAMPLES
.LP
To display a PPM file named \fBppmfile\fR using the protocol:
.DS L
    ppmtoicr ppmfile
.DE
This will create a window named \fIppmfile\fR on the display with the
correct dimensions for \fIppmfile\fR, create and download a colormap
of up to 256 colors, and download the picture into the window.  You
may achieve the same effect with the following sequence:
.DS L
    ppmtoicr ppmfile > filename
    cat filename
.DE
.LP
To display a GIF file using the protocol in a window titled after the
input file, zoom the displayed image by a factor of 2, and run-length
encode the data:
.DS L
    giftopnm giffile | ppmtoicr -w giffile -r -e 2
.DE
.SH 2
LIMITATIONS
.LP
.LP
The protocol uses frequent fflush() calls to speed up display.  If
you save the output to a file for later display via \fBcat\fR,
\fBppmtoicr\fR will draw much more slowly.  In either case,
increasing the blocksize limit on the display will speed up
transmission substantially.
.SH 2
SEE ALSO
.LP
\fBppm\fR
.LP
NCSA Telnet for the Macintosh, University of Illinois at
Urbana-Champaign (1989)
.SH 2
AUTHOR
.LP
Copyright (C) 1990 by Kanthan Pillay (svpillay@Princeton.EDU),
Princeton University Computing and Information Technology.
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
NAME
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
EXAMPLES
.IP \(bu
LIMITATIONS
.IP \(bu
SEE ALSO
.IP \(bu
AUTHOR
.LP

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.