
Developing a Fax Application
BT_ZERO(args_strip); args_strip.fmt = DATA_G3; args_strip.resolution = RES_200H_100V; args_strip.width = WIDTH_A4; BfvFaxStripParams(lp,&args_strip); BT_ZERO(args_fax);
args_fax.fname = "g3_file"; args_fax.fmt = DATA_G3; BfvFaxSendFile(lp, &args_fax); BfvFaxEndOfDocument(lp, &args_fax);
Accessing a TIFF-F File from an Application
Although applications can directly read and write
The BfvTiffOpen and BfvTiffClose functions open and close
The BfvTiffReadIFD and BfvTiffReadImage functions read an opened TIFF file. BfvTiffReadIFD calls a
A sample program to read a
main()
{
int my_ifd_func(); TFILE *tp;
unsigned char buf[1024]; int n;
struct args_tiff args_tiff; BT_ZERO(args_tiff); args_tiff.fname = "filename"; args_tiff.fmode = "r";
tp = BfvTiffOpen(&args_tiff); for (;;)
{
args_tiff.tp = tp;
args_tiff.func = my_ifd_func; args_tiff.arg = NULL;
if (BfvTiffReadIFD(&args_tiff) <= 0) break;
args_tiff.buf = buf;
args_tiff.size = sizeof(buf);
November 2009 | 87 |