PIXMON(1) Version 0.3 PIXMON(1)
16 March 1993
NAME
pixmon - a simple pixel monitor for X11
SYNOPSIS
pixmon [ -Xt-options ... ] [ -options ... ]
[-dx <pixel-data-size>]
[-dy <pixel-data-size>]
[-width <window-size>]
[-height <window-size>]
[-scale <float-value>]
[-cmap <filename>[.cmap]]
[-dither]
DESCRIPTION
pixmon implements a simple pixel data monitor for use with the X11
window system. It comes with the following features:
+ Auto-rescale when changing the window size
+ Loadable colormaps, you can display the same data with different
colors
+ Autodetect mono servers, using dithering (ordered dither) instead
of colors
+ Run length encoding support.
OPTIONS
-dx pixel-data-size
Set the horizontal size of expected pixel data image. (Defaults
to 100.)
-dy pixel-data-size
Set the vertical size of expected pixel data image. (Defaults to
100.)
-width window-size
Set the horizontal size of pixmon window in screen coordinates
(Defaults to dx * scale.)
- 1 - Formatted: October 25, 2025
PIXMON(1) Version 0.3 PIXMON(1)
16 March 1993
-height window-size
Set the vertical size of pixmon window in screen coordinates
(Defaults to dy * scale.)
-scale float-value
Scale the window's size to width = dx * float-value and height =
dy * float-value (Defaults to 2.)
-cmap filename[.cmap]
Read in filename[.cmap] on program start, and use the colors when
generating the pixmaps. The use of the suffix `.cmap' is
encouraged, but not enforced.
-dither
Use an ordered dither for pseudo color representation on low
bitplane devices, eg. monochrome X servers. when used on a
color device, a two color dithering generates some interesting
effects.
The following standard X Toolkit command line arguments are commonly
used with pixmon:
-bg color
This option specifies the color to use for the background of the
window. The default is ``white.''
-bd color
This option specifies the color to use for the border of the
window. The default is ``black.''
-bw number
This option specifies the width in pixels of the border
surrounding the window.
-fg color
This option specifies the color to use for displaying pixels.
The default is ``black.''
-name name
This option specifies the application name under which resources
are to be obtained, rather than the default executable file name.
Name should not contain ``.'' or ``*'' characters. (Defaults to
``PixMon.'')
-title string
This option specifies the window title string, which may be
displayed by window managers if the user so chooses. The default
title is `pixmon'.
-rv This option indicates that reverse video should be simulated by
swapping the foreground and background colors.
- 2 - Formatted: October 25, 2025
PIXMON(1) Version 0.3 PIXMON(1)
16 March 1993
-geometry geometry
This option specifies the preferred size and position of the
pixmon window; see X(1).
-display display
This option specifies the X server to contact; see X(1).
-xrm resourcestring
This option specifies a resource string to be used. This is
especially useful for setting resources that do not have separate
command line options.
-iconic
This option indicates that pixmon should ask the window manager
to start it as an icon rather than as the normal window.
OPTION SUMMARY
To give no option at all is the same as to give the following options:
-dx 100 -dy 100 -scale 2 -cmap default.cmap
FORMATS
+ Color map file(s), recognised by pixmon have the following ASCII
layout:
# File: demo.map
# Creator: Joachim Sprave (sprave@gonzo)
# <- this is a comment line: '#' in the 1st column
<red intensity 0> <green intensity 0> <blue intensity 0>
<red intensity 1> <green intensity 1> <blue intensity 1>
<red intensity 2> <green intensity 2> <blue intensity 2>
...
<red intensity 255> <green intensity 255> <blue intensity 255>
Thus a color map file consist of 256 lines each one containing such
a color description. Eg. to get a greyscale `color' map, simply use
the same intensities for all colors (see EXAMPLES below).
+ A package header is defined as:
typedef struct {
unsigned short magic;
unsigned short type;
short x;
short y;
unsigned short dx;
unsigned short dy;
unsigned short sizelo;
unsigned short sizehi;
} ImgHdr;
- 3 - Formatted: October 25, 2025
PIXMON(1) Version 0.3 PIXMON(1)
16 March 1993
With the following semantics:
magic
used to determine byte sex, must be initialized to PIX_MAGIC
type
one of:
PIX_DATA
Include the pixel data following the header into the picture
(without displaying instantly).
PIX_FLUSH
Display the internal pixmap.
PIX_DATA
| PIX_FLUSH Include the pixel data following the header into
the picture and display it instantly.
PIX_KILL
Tells pixmon to exit, when button 1 is pressed.
x, y
Position of this package relative to the upper-left corner of the
window.
dx, dy
Width and height (in dots, not in pixels) of this package.
sizelo, sizehi
Size of the following pixel data. If sizehi * 0x10000 + sizelo < dx
* dy, pixmon expects run length encoded data.
ENCODING
If RUN LENGTH ENCODING (RLE) is detected (see above), the value
PIX_RLE(0xFF) is treated as an escape value, so the number of colors
is reduced by one. To encode your data, use the function rle_encode
from rle.c.
EXAMPLES
+ A greyscale color map looks like:
0 0 0
1 1 1
2 2 2
3 3 3
...
255 255 255
- 4 - Formatted: October 25, 2025
PIXMON(1) Version 0.3 PIXMON(1)
16 March 1993
+ To use run length encoding of your pixel data, write:
my_encode ()
{
char mybuffer[MBSIZE];
...
rle_encode (mybuffer, MBSIZE, PIX_RLE);
...
}
FILES
pixmon/default.cmap default color map
pixmon/cmaps/*.cmap example color maps
pixmon/examples/README guiding instructions
pixmon/examples/mbx shell script that runs mbs
pixmon/examples/mbs.c generates a mandelbrot set
pixmon/examples/showpal.c generates a color palette
ANIMATION
An animation companion to pixmon called playmate(1) is also in the
making, and will be distributed in near future (refer to the
AVAILABILITY section below). Its application is rather simple: all
there is to do is to include a ``tee-log'' in the `pixel generating
pipe' eg.:
example% mbs ... | tee >pmdata.pix | pixmon ...
to collect pixmon data, that is later turned into animated pixmaps by
playmate(1). (See the pixmon/examples folder for more.)
BUGS
The known `bugs' of pixmon are:
+ `No' interaction
+ Could be faster
+ No private color maps
+ My first X11 program, ugly code :-(
SEE ALSO
X(1), hodge(1), imagemagick(1), playmate(1)
AUTHOR
Copyright (C) 1992, 1993 by Joachim Sprave
- 5 - Formatted: October 25, 2025
PIXMON(1) Version 0.3 PIXMON(1)
16 March 1993
Systems Analysis Group, University of Dortmund, Germany.
Send bugs, comments, etc., to (sprave@ls11.informatik.uni-dortmund.de).
CREDITS
Joerg Heitkoetter (joke@ls11.informatik.uni-dortmund.de) wrote the
manual page.
AVAILABILITY
This work is protected by the terms of the GNU General Public License.
Please refer to the COPYING file accompanying the sources of this
software package for a lengthy, boring, but absolute complete
description.
PIXMON is available via anonymous ftp from the group's server
lumpi.informatik.uni-dortmunde.de (129.217.36.140) as file `pixmon-
0.3.tar.Z' in /pub/CA/src.
WARRANTY
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- 6 - Formatted: October 25, 2025