HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Log of outgoing faxes to mySQL database .....

Sinisa wrote:
< nothing >
> --
< a long signature >
> Content-Type: text/english;
>   name="pismo2.txt"
> Content-Transfer-Encoding: base64
> DQpSYW5keSBzYWlkIDogRG9lcyB0aGlzIGluY2x1ZGUgdGhlIGltYWdlcz8NCg0KWWVzDQoNCg0K

Which decodes to:

> Randy said : Does this include the images?
> Yes
> Randy said : Or are they TIF->JPEG'd when the link in the last column is pressed?
> No, they are stored as JPEG in mySQL BLOB's, to enable faster viewing !!

This is all quoted totally out of context, however, inferring some context
from the copy to the hylafax mailing list, you should not use
JPEG for fax images.  It doesn't compress particularly well and it doesn't
compress accurately (it compresses very well and accurately enough for
photographs of natural scenes, but faxes only have two levels and all
the information is in high spatial frequency components, which are not
reproduced well by JPEG).

GIF is a reasonable fallback compared with FAX G3 or G4 coding, especially
if you use a two colour palette.  It, or PNG for MSIE 4+, are probably
the formats of choice for unaided GUI web browsers.

Here are the results of a rough test on relative compression (actually
at 300 dpi, not the fax 200x100 and 200x200; test data was the original
troff paper, through ghostscript):

tiffg3:   3598848
tiffg32d: 2479118
tiffg4:   1825351
pngmono:  3020172
jpeggray: 25843888

I didn't have time to run GIF on this data (it needs two stages, because
ghostscript won't do it directly for patent reasons).

> Randy said : Very cool!  Looking forward to seeing this linked from 'contributions'...
> This depends on the administrators. Meanwhile, you can find a first version
> of archive on my personal WWW page (found at my signature !!!!).
> Bye !!!!!!!!!!
Followed by two \200 characters.

(JPEG works by relying on the fact that natural scenes don't contain much
information at high spatial frequencies and the eye will tolerate errors
well at such frequencies.  It therefore converts the image into the frequency
domain, then codes the lower frequencies with more bits than the higher
frequencies.  Note this is not low pass filtering.  The result it that
you get artefacts near sharp edges, such as the lines and characters of
typical of faxes.

GIF quantises the spatial signal directly, so adds no further degradation
to a signal, like a fax, which is already spatially and amplitude 

Project hosted by iFAX Solutions