Hylafax Mailing List Archives

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

[hylafax-users] About JPEG (Color Fax) and JBIG compression support



HylaFAX users,

(This content is also available on the HylaFAX HOWTO at: http://hylafax.sourceforge.net/howto/install.php#ss2.5)

The usage of JPEG and JBIG compression schemes are generally considered "advanced" fax features and may not be available to all fax machines. JPEG compression is most commonly used for sending and receiving *color* facsimile. JBIG compression is most commonly used for sending and receiving *monochrome* facsimile, but with a tighter compression (and thus faster send-times) than MMR. Both JPEG and JBIG facsimile compression require the usage of error-correction protocol (ECM).

*_JPEG_*

Currently JPEG support is only available in Class 1/1.0 receiving. JPEG send support is not yet available. The Class 2.1 specification does provide for JPEG support, but HylaFAX is not yet capable of sending or receiving JPEG facsimile in Class 2.1.

HylaFAX JPEG receive support is entirely dependent upon CIELAB JPEG support being available in libtiff, and libtiff gets some of its CIELAB JPEG support from libjpeg. Unfortunately, as of libjpeg version 6b released by the Independent JPEG Group (http://www.ijg.org/) libjpeg does not support CIELAB JPEG. This will require libjpeg to be patched, rebuilt, and reinstalled. The patch to libjpeg can be found here:

http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=224#c7

Then libtiff will need to be patched, rebuilt, and reinstalled. The libtiff patch can be found here:

http://bugzilla.remotesensing.org/show_bug.cgi?id=736

At this point, then, color fax reception support can be enabled in the modem config file by setting:

Class1ColorJPEGSupport: yes

Most TIFF viewers will not be capable of displaying the JPEG-compressed TIFF pages with the proper color scheme (they would need to support CIELAB JPEG, which is mostly specific to fax). So to view JPEG-compressed TIFF images, convert them first using |tiff2ps| and then |ps2pdf| (or the |bin/tiff2pdf| HylaFAX script, as libtiff's |tiff2pdf| doesn't seem to work the same right now), or convert them to another color-supporting TIFF compression.

*_JBIG_*

HylaFAX supports both sending and receiving JBIG-compressed facsimile in Class 1/1.0. The Class 2.1 specification does not include JBIG, and so JBIG is not likely to be available with Class 2/2.0/2.1.

Like JPEG, HylaFAX JBIG receive support is entirely dependent upon JBIG support being available in libtiff. Most recent libtiff releases include the ability to write JBIG-compressed TIFF files. However, doing anything with the TIFF file from there will be difficult as TIFF viewers usually do not support JBIG compression. So usually the JBIG-compressed TIFF file requires conversion to PDF or a non-JBIG compression for viewing. This will require the installation of the JBIG-KIT library and libtiff to be patched, rebuilt, and reinstalled. The patch can be found here:

http://bugzilla.remotesensing.org/show_bug.cgi?id=896

At this point, then, JBIG fax reception support can be enabled in the modem config file by setting:

Class1JBIGSupport: yes

HylaFAX JBIG send support utilizes the |ModemSoftRTFCC| feature. Thus sending JBIG-compressed facsimile requires that |ModemSoftRTFCC| be enabled (which is the default setting). If the JBIG-KIT libraries were found when HylaFAX was compiled then the |ModemSoftRTFCC| feature will also convert to JBIG when appropriate (and |Class1JBIGSupport| will also default to "yes"). JBIG send support does not require libtiff to be patched.

*_A word of caution about installing patched versions of libjpeg and libtiff:_* On most systems several other packages will likely have been built against libjpeg and perhaps to a lesser extent also libtiff. Problems may likely arise with those other packages due to the library (libjpeg and/or libtiff) being altered without rebuilding that package. In this case these packages that also depend upon the library will also need to be rebuilt. Yes, it's not fun.

The libtiff JBIG patch was paid-for work. Thanks in part goes to iFAX Solutions, Inc. for the funding of that work.

Thanks,

Lee.


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services