Subject: ANNOUNCE: pixmon-0.3
From: [email-masked] (Joachim Sprave)
Date: 26 Mar 93 17:07:59 GMT
Newsgroups: comp.os.linux.announce

I've uploaded pixmon-0.3 to 

	lumpi.informatik.uni-dortmund.de 	129.217.36.140

It's not Linux-specific, but it's been mostly developed under Linux.
I think there are much Linuxers who are not familiar with X, so this 
little tool may help them to display pixel graphics from character
based applications. 

Here's the README:

--- README.pixmon ---

This is PixMon-0.3, a pixel graphics backend.

It is intended by the following:

Many people just want to display bitmap data, w/o knowing any details
from X. PIXMON simply expects packages on standard input, starting with 
a header containing rightangle coordinates followed by a color value for 
each point in there.

It is also useful when porting brain damaged PC-software, which directly
writes into the video memory. 

Features:

	o Auto-rescale when changing the window size
	o Loadable colormaps, you can display the same data with
	  different colors
	o Autodetect of mono servers, using dithering instead of colors
	o Run length encoding supported

Drawbacks/problems:

	o No interaction
	o Could be faster
	o No private color maps
	o My first X-program, ugly code :-(

Soon to come:

	PlayMate, the PixMon package animator.

Options:

	-dx num
	-dy num
		numbers of dots in x/y-direction

	-width num
	-height num
	-geometry WxH+X+Y
		window geometry

	-scale float-num
		initial number of pixels per dot

	-cmap filename[.cmap]
		path name of a color table

	-dither
		force dithering even on color servers

	-fg
	-bg
		fore/background color (dithering only)

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

	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

	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.

Run length encoding:

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

		Example:
			char mybuffer[MBSIZE];
			...
			rle_encode(mybuffer, MBSIZE, PIX_RLE);

Color maps:
		PixMon loads a color map on startup time.
		Color map are ASCII files containing up
		256 lines. Each line defines a color's
		red, green and blue intensity (0..255).

Compatibility:
		PixMon was developed and tested on SunOS Release 4.1
		and Linux-0.99pl[0-7], both with X11R5. X11R4 servers
		also seem to work. Obsolete X-calls will be replaced, 
		so if it works with X11R3 now, the next release probably
		won't.

Bugs and comments to

/---------------------------------------------------------------------\
| Joachim Sprave                [email-masked] |
|                      //////\\                                       |
| Univ. Dortmund      /        \        P.O. Box 50 05 00             |
| Dept. CS           _|  _   _ |_       4600 Dortmund 50              |
| Systems Analysis  |.|-(.)-(.)+.|      Tel.: +49-231-755 2637        |
\------------------  \|    J   |/  -----------------------------------/
                      \   ---  /
                       \      /
                        "####"

-- 
Send submissions for comp.os.linux.announce to: [email-masked]