1997.01.08 04:45 "How to write a ASCII string to a TIFF file", by Weiqi Gao

1997.01.08 16:18 "Re: How to write a ASCII string to a TIFF file", by Weiqi Gao

I have been asked a question about the Sam Leffler TIFF library that I was unable to answer.

The question is as follows:

Using the TIFF library, how would you add a simple string (example - "HELLO WORLD") at the bottom of a TIFF (group 4) image file. Note that a UNIX C program exists to copy TIFF files to a HP 5S printer that has a special card to handle TIFF files, but a simple string is needed at the bottom of each file.

>Could you be more specific?
> - Do you want to rasterize a string into the image itself?
>or
> - Do you want to add a TIFF tag of type string?
> Example:
> (void)TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "HELLO WORLD");
> - Or do you want to add some bytes at the end of the file which is
> the text "HELLO WORLD".

We wanted to rasterize (but see below). The effect we wanted to achieve is to have an identifying string printed on the same page as the image. This string could be part of the image (in which case we have to rasterize). But we would be perfectly happy if we can achieve the same result without having to fiddle with the tiff file.

We have tons of tiff files to print (to the HPLJ 5Si printer with a XipPrint card), and each of them has a unique identifier.

Thank you.

--
Weiqi Gao
weiqigao@crl.com