One of the more advanced fax features that the Brooktrout product supports is color fax.  Color fax is pretty much what the name implies – sending and receiving a fax that is in color rather than the normal black and white.  This means you could send and receive JPEG or JBIG files using the fax protocol.  Of course the remote end you’re communicating with would also need to support color fax as well.

The way Brooktrout boards handle color fax is that they don’t process the image data itself.  The boards send and receive color fax data as is.  The color fax data will be received exactly as it was sent.  There will be no sizing/scaling of the image, for example.  This is different from normal black and white where each individual scan line is processed and reformatted by the board before being sent out.  Because of this, Error Correction Mode needs to be used for color fax to verify the data arrives exactly as it was sent.

So how does one go about using color fax?

On the receiving side, all you have to do to allow color faxing is to set the btcall.cfg parameter “eff_pt_caps” to 3.  “EFF” stands for “Enhanced Fax Format”, which is another term for color fax.  There are other options available for eff_pt_caps, but since the Brooktrout boards do not process color fax data, setting them is not really necessary.  With eff_pt_caps set to 3, the Brooktrout board’s DIS fax negotiation message will indicate that it can receive color fax.  Of course it would be up to the sending side to use color fax as well.

To send color fax, it’s a bit more complicated.  First, you’d need to know if the receiving side can handle color fax.  Most machines don’t support it and you do not want to try just blindly sending color fax.  If you know for a fact the other side can receive color fax then it’s no problem, but otherwise you can use T.30 Holdup to check at the beginning of the fax negotiation.  See my previous blog on T.30 Holdup for more information there. 

OK, so you’ve verified the remote end can take color fax.  Now what?  Now, your application would need to tell the Brooktrout board that you’re sending color fax.

First, I’ll point out that although TIFF format is very popular for fax applications, you cannot use TIFF API functions (e.g. BfvFaxRcvPageTiff, BfvFaxSendPageTiff) for color fax.  You’d have to use either raw file API functions or infopacket API functions.  (The SDK comes with two sample applications that use these types of functions, specifically faxll.c and fax.c, respectively.  You can look at these sample applications for more details.)  Raw API functions have format parameters where you can specify color fax, and for infopacket functions you’d identify that color fax was used inside the input infopacket stream file.

This is a code sample that shows using raw API functions for color fax:

 

BT_ZERO(args_fax);
args_fax.eff_page_type = BT_EFF_JPEG_ENABLE;
BfvFaxBeginSendRaw(lp, &args_fax);
BfvFaxGetRemoteInfo(lp, &args_fax);
BfvFaxWaitForTraining(lp, &args_fax);
args_fax.eff_page_type = BT_EFF_JPEG_ENABLE;
BfvFaxNextPageRaw(lp, &args_fax);
args_fax.fname = “filename.jpg”
BfvFaxSendFile(lp, &args_fax);
BfvFaxEndOfDocument(lp, &args_fax);

So by doing this, you can send and receive color fax to add to your fax repertoire.