.TH atobm "" "" "X Utility"
.PC "Convert ASCII to an X bit-mapped image"
\fBatobm [\-chars \fIcc\^\fB] [\-name \fIvariable\^\fB] [\-xhot \fInumber\^\fB] [\-yhot \fInumber\^\fB] [\fIfile\^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-chars \fIcc\fR"
Specify the pair of characters to use when converting strings into bits:
the first character of the pair \fIcc\fR
represents the zero bit, and the second represents the one bit
.IC "\fB\-name \fIvariable\fR"
Set to \fIvariable\fR
the variable name used when writing out the bitmap file
.IC "\fB\-xhot \fInumber\fR"
Give the X coordinate of the image's ``hot spot''
.IC "\fB\-yhot \fInumber\fR"
Give the Y coordinate of the image's ``hot spot''
.HE
.II "image, bit-mapped"
.II "bit-mapped image"
.II bitmap
.II bmtoa
.B atobm
converts ASCII text into an X bit-mapped image.
.I file
must hold a bit-mapped image that had been created with the editor
.B bitmap
and had been converted into ASCII by the utility
.BR bmtoa .
For details on what constitutes a bit-mapped image, see the Lexicon entry for
.BR bitmap .
For an example of using a bit-mapped image with the X server, see
the Lexicon entry for
.BR xsetroot .
.PP
.I file
gives the file in which the text resides.
If no
.I file
appears on the command line,
.B atobm
reads the standard input.
.PP
.B atobm
recognizes the following command-line options:
.IP "\fB\-chars \fIcc\fR"
Specify the pair of characters to use when converting strings into bits.
The first character of the pair
represents the zero bit, and the second represents the one bit.
The default is to use a hyphen `\-'
to represent zero and a pound sign `#' to represent one.
.IP "\fB\-name \fIvariable\fR"
Set to
.I variable
the name used when writing out the bit-map file.
The default is to use the base name of the command-line
argument \fIfile\fR (or leave it blank if
.B atobm
is reading the standard input).
.IP "\fB\-xhot \fInumber\fR"
Give the X coordinate of the image's ``hot spot.''
The hot spot is the pixel that, on an image used as a mouse cursor,
identifies exactly where the image is pointing.
Only positive values are allowed.
By default, a bit-mapped image includes no hot-spot.
.IP "\fB\-yhot \fInumber\fR"
Give the Y coordinate of the image's ``hot spot.''
Only positive values are allowed.
.SH Example
Consider following the bit-mapped image:
.DM
	----------------
	-------#--------
	-------#--------
	---#---#---#----
	----#--#--#-----
	-----#-#-#------
	------#-#-------
	-#####---#####--
	------#-#-------
	-----#-#-#------
	----#--#--#-----
	---#---#---#----
	-------#--------
	-------#--------
	----------------
	----------------
.DE
.PP
You may have created this image with the bit-map editor
.BR bitmap ,
or you may simply have created it with a text editor, such as \*(ME.
If you have saved it in a file called
.BR star ,
you can filter it through
.B atobm
via the following command:
.DM
	atobm star
.DE
.PP
This produces the following:
.DM
	#define star_width 16
	#define star_height 16
	static char star_bits[] = {
	   0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x88, 0x08, 0x90, 0x04, 0xa0, 0x02,
	   0x40, 0x01, 0x3e, 0x3e, 0x40, 0x01, 0xa0, 0x02, 0x90, 0x04, 0x88, 0x08,
	   0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00};
.DE
.PP
Your bit-mapped image is now ready for loading into an X application.
.SH "See Also"
.B
bitmap,
bmtoa,
X utilities
.R
.SH Notes
.II "Matic, Davor"
.B atobm
was written by Davor Matic of the X Consortium.
