README revision 7c478bd95313f5f23a4c958a745db2134aa03244
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
Source code for a program that translates DMD bitmaps (as produced by dmdps) or
files written in the Ninth Edition bitfile(9.5) format into PostScript. Much of
the code came from abm, which was written by Guy Riddle.
By default 6 byte patterns are used, but any number can be selected with the -b
option. 6 byte patterns are a tradeoff that achieves a good (but not necessarily
optimal) performance across the wide variety of currently available PostScript
printers. Decreasing the pattern size often helps some on printers with fast
processors (eg. PS-810s) while increasing the pattern size speeds things up on
older printers (eg. PS-800s). In the limited number of tests I ran -b10 worked
best on PS800s and -b4 gave the best performance on PS-810s. If you want a
different default pattern size change the initialization of bytespp (near line
117 in postdmd.c) before you compile the program.
Bitmaps are unpacked, a scanline at a time, and re-encoded in a format that looks
like,
bytes patterns count
where bytes and count are decimal integers and patterns is a series of hex digits.
Bytes is the number of bytes represented by the hex pattern, while count is the
number of additional times the pattern should be repeated. For example,
2 FFFF 4
5 FFFFFFFFFF 1
10 FFFFFFFFFFFFFFFFFFFF 0
all represent 10 consecutive bytes of ones. Scanlines are terminated by a 0 on
a line by itself. The new encoding wastes some space, but is relatively easy to
unpack when the bitmap finally gets to the printer.