Discussion:
2-dimensional compression?
(too old to reply)
Warren Burstein
2009-01-22 13:44:49 UTC
Permalink
Someone at work asked me if I could get sendfax to transmit faster. I
took one of the PS samples that come with Ghostscript and converted it
using different drivers. faxg3 wrote a 63K file, faxg32d gave a 37K
file and faxg4 gave a 24K file. Has anyone tried sending one of these
formats (of course you have to first extract the raw g3/g4 data from the
tiff file, I have a C program that does that) to a fax machine whose
+FIS reports that it accepts a 2D format? Do I have to do anything to
let the remote machine know that 2D data is coming, or does it figure
that out when it sees it?

If this works, I suppose there would be two ways to go
1) sendfax could convert the fax format when it gets the remote fax's
capabilities. tiffcp does this fast enough, but it doesn't handle raw
G3/G4 files (anyone know a program that does?), so maybe I'd go with
2) provide sendfax with all three formats, and it will uaw the most
compact one that the remote fax will support

I'll be happy to do this myself and submit the changes.

And just to make sure I understand are all of the formats on each of the
following two lines identical?
sendfax: 2D/MR, ghostfax: -device faxg32d, tiffcp: -c g3:2d
sendfax: 2D/MMR, ghostfax: -device faxg4, tiffcp: -c g4



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gert Doering
2009-02-18 08:07:28 UTC
Permalink
Hi,

(took me a while to get around to answer this - sorry)
Post by Warren Burstein
Someone at work asked me if I could get sendfax to transmit faster. I
took one of the PS samples that come with Ghostscript and converted it
using different drivers. faxg3 wrote a 63K file, faxg32d gave a 37K
file and faxg4 gave a 24K file. Has anyone tried sending one of these
formats (of course you have to first extract the raw g3/g4 data from the
tiff file, I have a C program that does that) to a fax machine whose
+FIS reports that it accepts a 2D format? Do I have to do anything to
let the remote machine know that 2D data is coming, or does it figure
that out when it sees it?
You need to tell the modem in the initial setup dialogue "yes, I want to
send 2D data" (AT+FCC command, set 5th digit to "1").

Then the modem will negotiate with the receiving machine whether they can
handle 2D (+FIS), and tell you in the +FCS report (again, 5th digit).

After that, you "just" go ahead and send 2D encoded data (proper bit
order, possibly end-of-line tagging, etc. - I would need to check the
standards again to be sure).


Now, *most* machines these days will do 2D, but you won't know whether
it can do 2D or not until you find out - and then you'll have to re-encode
on the fly... (theoretically, the modem could do that for you, but I
have no experience what modems support format conversion on the fly, and
whether it works properly).


(G4 is a different matter altogether. This is for fax-over-ISDN, and
you won't see it on a G3 fax - it's G3 1D or G3 2D).
Post by Warren Burstein
If this works, I suppose there would be two ways to go
1) sendfax could convert the fax format when it gets the remote fax's
capabilities. tiffcp does this fast enough, but it doesn't handle raw
G3/G4 files (anyone know a program that does?),
This is what Hylafax does, if I remember correctly - recode on the fly.

It's no magic, and on a modern system, it will use so little CPU that
you won't even notice - but someone has to code it. I planned to do that,
but never found time to.
Post by Warren Burstein
so maybe I'd go with
2) provide sendfax with all three formats, and it will uaw the most
compact one that the remote fax will support
This is a bit tricky as well, as you need to change the argument handling
- right now, everything on the command line is a single-page G3 file. So
you need to define a way to tell sendfax "here's the G3 files, and
here's the G3-2D files".
Post by Warren Burstein
I'll be happy to do this myself and submit the changes.
And just to make sure I understand are all of the formats on each of the
following two lines identical?
sendfax: 2D/MR, ghostfax: -device faxg32d, tiffcp: -c g3:2d
sendfax: 2D/MMR, ghostfax: -device faxg4, tiffcp: -c g4
As far as I know, yes.

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...