Programs for manipulating Sun icons

Jonathan Bowen bowen%prg.oxford.ac.uk at nss.cs.ucl.ac.uk
Tue Dec 13 03:39:48 AEST 1988


I notice there has been some talk of manipulating Sun icons in sun-spots
recently. Here are some programs which can be used to help with this.

"editicon" uses "showicon" to convert a Sun icon into a text file
containing "#" for black pixels and " " for white pixels. This is then
edited using a standard text editor (default "vi"). The text image can be
saved using ":w file" or shifted using "s/^/    /", etc., in "vi".  On
exit from the editor, if the file has been updated, "makeicon" is used to
overwrite the Sun icon file.  Saved text images can be overlayed together
using "over", X-Y axes can be swapped using "swap", etc. Existing Unix
tools such as "rev" and "colrm" can also be used to modify text images. As
supplied, "editicon", etc assumes 64x64 bit images, but any competent Unix
hacker could change this if desired.

"ras2icon" is a slightly cleaned up version of "pic2icon", as issued
previously on sun-spots (by Jim Meritt?), together with a newly written
manual page.  I changed the name since "pic" files mean something
different at our site.

"sun2xicon" and "x2sunicon" convert between SunView and X formats as best
they can.

I am happy for all these files to be included in the sun-spots archive
(assuming the original author of "pic2icon" does not object about
"ras2icon").

The files are also available by sending a message such as:

	send prog editicon.shar

to <archive-server at uk.ac.oxford.prg> on JANET or
<archive-server at ox-prg.uucp> (...!mcvax!uck!ox-prg!archive-server).
However, I would rather US sites obtained copies from the sun-spots
archive server to reduce transatlantic traffic.  A message of "help" to
the archive server will give more information on its use.

Here is a list of the relevant files:

Name			Contents

editicon.shar		Edit a SunView icon using a text editor
			(also includes makeicon and showicon)
fill.shar		Fill text lines to a given column position *
over.shar		Overlay text files *
pos.shar		Position lines on given column *
ras2icon.shar		Convert Sun raster to icon format
sun2xicon.shar		Convert SunView icon to X bitmap
swap.shar		Swap rows and columns in a text file *
x2sunicon.shar		Convert X bitmap to SunView icon

All programs are designed for UNIX systems and are shell scripts or C
programs (if marked with a *). Some shell scripts may depend on other
programs which are not available on all UNIX systems. In particular, these
programs have only been tested on BSD4.2 based systems (on Sun-3
hardware). There is no warranty that they will work on your system, but
bug reports and updates are welcome.

Each ``shar'' file contains at least the following:

	README		Brief description
	Makefile	To make and install files
	x or x.c	Shell script or C program source
	x.1		Manual page

where ``x'' is the name of the program.

Jonathan Bowen
Oxford University Computing Laboratory
Programming Research Group
England
JANET:	bowen at uk.ac.oxford.prg
ARPA:	bowen%prg.oxford.ac.uk at nss.cs.ucl.ac.uk
UUCP:	bowen at ox-prg.uucp (...!uunet!mcvax!ukc!ox-prg!bowen)

[[ The "shar of shars" is in the archives under "sun-source" as
"icontools.shar".  It is 86068 bytes in length (if this length poses a
problem for you, drop me a line and I will split it into two shar files).
It can be retrieved via anonymous FTP from the host "titan.rice.edu" or
via the archive server.  For more information about the archive server,
send a mail message containing the word "help" to the address
"archive-server at rice.edu".  --wnl ]]



More information about the Comp.sys.sun mailing list