
Developing a Fax Application
if ((n = BfvTiffReadImage(&args_tiff)) <= 0) break;
process_image(buf,n);
}
args_tiff.tp = tp; BfvTiffClose(&args_tiff);}
my_ifd_func(tp, ifd_ptr, arg)
{
/* Does nothing,just returns */ return (0);
}
The BfvTiffWriteImage and BfvTiffWriteIFD functions are used to write a new TIFF file. BfvTiffWriteImage receives data from a
The presence of a certain set of tags is required to produce a valid
A sample program to write a
main()
{
TFILE *tp;
unsigned char buf[1024]; int n;
struct ifd_field ifd_field; struct args_tiff args_tiff;
BT_ZERO(args_tiff);
args_tiff.fname = "filename"; args_tiff.fmode = "w";
tp = BfvTiffOpen(&args_tiff);
for (;;)
{
if ((n = get_image_data(buf)) <= 0) break;
args_tiff.tp = tp; args_tiff.buf = buf; args_tiff.size = n;
if (BfvTiffWriteImage(&args_tiff) != 0) break;
}
args_tiff.tp = tp; args_tiff.buf = NULL; args_tiff.size = 0
November 2009 | 88 |