From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,dca5b37e6d9c2142,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1993-03-26 18:50:30 PST Path: sparky!uunet!gatech!howland.reston.ans.net!usc!rpi!batcomputer!theory.TC.Cornell.EDU!mdw From: Joachim Sprave Newsgroups: comp.os.linux.announce Subject: ANNOUNCE: pixmon-0.3 Date: 26 Mar 1993 17:07:59 GMT Organization: Cornell Theory Center Message-ID: <1ovd9f$n4u@fitz.TC.Cornell.EDU> NNTP-Posting-Host: theory.tc.cornell.edu Keywords: pixmon, pixel graphics, viewer Originator: mdw@theory.TC.Cornell.EDU 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 sprave@ls11.informatik.uni-dormund.de | | //////\\ | | 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: linux-announce@tc.cornell.edu