[comp.graphics] HP Paintjet ?

dan@rna.UUCP (Dan Ts'o) (02/11/88)

	Has anyone used and programmed an HP Paint Jet color printer ?
Any comments about its quality of output, programmability, etc. ? How hard
would it be to write a UNIX program for the Paint Jet which would allow it
to print color RBG raster images (greatly dithered, I'm sure)...


				Cheers,
				Dan Ts'o
				Dept. Neurobiology	212-570-7671
				Rockefeller Univ.	...cmcl2!rna!dan
				1230 York Ave.		rna!dan@nyu.edu
				NY, NY 10021		tso@rockefeller.edu

wanger@hpfcdq.HP.COM (Leonard Wanger) (02/11/88)

	I have been using a paintjet on my UNIX workstation for a few
weeks and I love it (I'm only a little biased as it is a HP product,
but that is as far as my connection with it goes). As far as
printing RBG images, the Starbase graphics library includes a program
called PCLtrans, which will convert a Starbase bitmap file to PCL (the
format the Paintjet uses). I have been using this to kick out images
and have been very happy with it.

	Len Wanger
	HP Graphics Technology Division

stroyan@hpfcdc.HP.COM (Mike Stroyan) (02/13/88)

The PaintJet is very easy to use for printing RGB rasters with up to 16
colors.  It has a 16 entry RGB color map and its own dithering code.
You can just download the color map from your image and send the raster
as colormap index values.  If you want to print images with more than 16
colors, then you will need to do your own dithering.  You can set up the
color map to represent normal CMYB values and use some book dithering
algorithm.

I use a PaintJet with my Amiga at home.  The output quality is very
good, especially with the paper that HP supplies.  It works fairly well
with normal paper, such as the continous feed checks that I print from
an accounting program.  It does not work with mailing labels.  I tried
it.  It peeled them off and ate them.  What a mess.

Mike Stroyan, [hplabs!]hpfcla!stroyan

rjn@hpfcmp.HP.COM (Bob Niland) (02/14/88)

re: "...using a paintjet ... and I love it"

> ... the Starbase graphics library includes a program called PCLtrans, which
> will convert a Starbase bitmap file to PCL (the format the Paintjet uses).

In consideration of {potential} PaintJet users not using an HP-UX (HP9000)
system, we should mention that the 'pcltrans' utility does not use the
on-board dithering of the PJ.  It executes entirely on the HP9000 host and
employs a modified Floyd-Steinberg error-diffusion scheme supplied with the
'Starbase' graphics library only on HP Series 300 and 800 systems.

The chap who wrote pcltrans modified F-S for color, altered the propagation
distributions and is playing some games with quantization error.  I don't
know if the resulting scheme is considered proprietary or not.  Perhaps he
will comment.

Bottom line:  if you gotta write your own PJ device handler anyway, it is
possible for the industrious programmer to obtain remarkable results on what
is basically a 3-color 180 dpi printer.

Bob Niland   ARPA:rjn%hpfcrjn@hplabs.HP.COM   UUCP:[ihnp4|hplabs]!hpfcla!rjn

glen@hpfcdq.HP.COM (Glen Robinson) (02/20/88)

/ hpfcdq:comp.graphics / dan@rna.UUCP (Dan Ts'o) /  3:55 pm  Feb 10, 1988 /

>	Has anyone used and programmed an HP Paint Jet color printer ?
>Any comments about its quality of output, programmability, etc. ? How hard
>would it be to write a UNIX program for the Paint Jet which would allow it
>to print color RBG raster images (greatly dithered, I'm sure)...
----------

I've had a bit of experience (did the pcltrans for HP-UX mentioned in other
responses).  The output can be quite exceptional actually.  We support
bitmapped displays ranging from 400 X 512 with 16 colors to 1280 X 1024
with 24 bit deep indices and 256 deep color map (every pixel on the screen
can be unique).  Thru a series of design iterations we decided to access
the PaintJet with three planes per dot row (ie r, g, and b), use error
diffusion, and interleave processing with scanning.

Essentially we took the F-S algorithm spreading the error to 4 adjacent
pixels.  We use a jump table with the appropriate error values plus or
minus half cmap size with four entries each naturally to get the value
to propagate.  Note that the sum of the error values for each pixel
MUST equal the total error for that pixel (fairly easy to do masaging
the entries in a table).  

Paintjet has 9 nozzles (dot row) per actual pass of the head so you can
interleave printing 9 sets of 3 rows (r,g, and b) with computing the
next 9 sets.

Hopefully you have some kind of a parallel interface (centronics or HPIB)
otherwise you MUST encode the output if you want any reasonable kind of
I/O performance.  In any case if you are using serial you probably do NOT
want to interleave - i.e. build the whole output file and then cat it.

We used lots of other things which are a bit proprietary so I won't go
in to them.  One thing we do have that helps within Starbase is a method
of creating a standardized (for Starbase) bitmap file image containing
frame buffer data, color map, various modes, display enables, etc which
simplifies things for us.  Essentially theses files can be written to 
and from a framebuffer and used for pcltrans printing.

I don't know what size framebuffer you will be dumping, but you should
recognize that this is a VERY CPU INTENSIVE algorithm.  We chose to
error diffuse across the output page regardless of whether or not pixel
expansion was taking place (Paintjet is 1440 X 1980 pixels).  The
end result for a full page output page (from a 770 X 990 window) with
an unloaded 4 mips machine (350SRX) is in the order of 6 1/2 to 7 minutes.
(note that a simple cat of this size image printing background et al will
take on the order of 4 minutes)

A final note, it has probably occured to you that screens tend to be largest
in the X dimension, while Paintjet is largest in the Y dimension.  Hence if
you are going to get a full page you will have to do rotation - we used
- 90.

Good Luck

Glen Robinson