[comp.dcom.modems] Fax Standards Question

wcs) (02/26/90)

I've got a question about the Huffman-ish codes used in G3 fax.
(It's been long enough since I've seen the standards that I've
forgotten whether G3 translates fixed-length source bit strings to
variable-length coded, or variable source to fixed coded, or
variable to variable.)  Anyway, is it possible to generate correct
G3 fax for which the source bitmaps are always the same width?
I'm trying to find efficient ways to translate ASCII to fax, and
this would let you store a font as a collection of G3 output bitmaps,
so you could output the characters directly instead of generating a
bitmap from the text and then bit-hacking it into G3.

A standard 10-pitch 6-lpi font corresponds to a character size of
20 pixels wide and 16+ or 33+ lines tall, for 100x200 or 200x200 res.
The bitmap for the 16-line occupies about 10K for a 256-character font,
which is small enough to be practical on a fax board or modem 
(e.g. a Telebit or similar).  A G3 version would be a bit smaller,
though you need to store widths and may not save anything.

-- 
# Bill Stewart AT&T Bell Labs 4M312 Holmdel NJ 201-949-0705 erebus.att.com!wcs
# Fax 949-4876.  Sometimes found at Somerset 201-271-4712
# He put on the goggles, waved his data glove, and walked off into cyberspace.
# Wasn't seen again for days.

jtc@van-bc.UUCP (J.T. Conklin) (02/27/90)

[Followup to alt.fax]

In article <8456@cbnewsh.ATT.COM> wcs@cbnewsh.ATT.COM (Bill Stewart 201-949-0705 erebus.att.com!wcs) writes:
> ... Anyway, is it possible to generate correct
>G3 fax for which the source bitmaps are always the same width?
>I'm trying to find efficient ways to translate ASCII to fax, and
>this would let you store a font as a collection of G3 output bitmaps,
>so you could output the characters directly instead of generating a
>bitmap from the text and then bit-hacking it into G3.

In short: it's possible, i've done it, and it's not worth it.

I encoded a font into a series of counts representing the white 
and black runs within the font.  When the row was concatenated,
a proper G3 row resulted.

I abandoned this approach for several reasons:

  1. Compared to a simple bitmap, the font encoding was huge.

  2. I can put the character glyphs wherever I want.  They
     can even be rotated, inverted, etc.

  3. With a good bit-blt routine, the overhead of blitting 
     is about the same as concatenating the mini-g3 bitmaps.


  --jtc

-- 
J.T. Conklin
	...!{uunet,ubc-cs}!van-bc!jtc, jtc@wimsey.bc.ca

wje@siia.mv.com (Bill Ezell) (02/28/90)

wcs@cbnewsh.ATT.COM (Bill Stewart 201-949-0705 erebus.att.com!wcs) writes:

>I've got a question about the Huffman-ish codes used in G3 fax....

It's been a long time since I've looked at G3, also. I seem to recall
that the encoding tables are static, and were determined by
analysis of 'typical' text that would be transmitted. In any case,
the standard covers the compression method in great detail, if you
can track down a copy of that.
-- 
Bill Ezell
Software Innovations, Inc.
wje@siia.mv.com
(603) 883-9300