TIFF and LibTiff Mail List Archive


2001.10.24 15:25 "RAW to TIFF", by Mike Medley
2001.10.24 17:48 "Re: RAW to TIFF", by Frank Palmieri

2001.10.24 15:25 "RAW to TIFF", by Mike Medley

I have an array of integers in the form of RGB RGB RGB that when output to a RAW file,

yields the results for the image.

So now, I want to take that array and output to TIFF instead of RAW. Being somewhat new

to the TIFF format, I was wondering if anyone could help me in accomplishing this? The output

needs to be a 24-bit TIFF file.

So far, I've done this:

            for (q = 0; q < totalstep; q++)
                        red[q] = sample[q].colorR;
                        green[q] = sample[q].colorG;
                        blue[q] = sample[q].colorB;

Where totalstep is the total number of samples in my array. So for a 256x256 image, I'd have

65536 samples. After setting various TIFFTAG's, which I'm assuming I've done correctly for

the specified output, I feed in my red, green, and blue to my tifftag:

    TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);

The problem I'm running into is with the TIFFWriteScanLine / TIFFWriteEncodedStrip.

Any help would be greatly appreciated.