2006.07.21 12:40 "[Tiff] How to save in tiff format file?", by Toh kc

2006.08.24 13:38 "Re: [Tiff] Re: How to save in tiff format file?", by Gerben Vos

  1. for the SaveTiffFile(), have already tested and able
  2. to save a tiff file, what has really bother about ne
  3. is still the intialisation of the array, sImg.

for (int i = 0; i < Gheight; i++)
   for(int j = 0; j < Gwidth; j++)

        sImg[i * Gwidth + j] = (unsigned char)(j * i);

This initialization is OK, if what you want is a swirly test pattern.

If you want to copy the data from another image, it would perhaps be something like (depending on how that image data is stored):

     for (int i = 0; i < Gheight; i++)
       for(int j = 0; j < Gwidth; j++)

        sImg[i * Gwidth + j] = origImg[i * Gwidth + j];

It all depends on what you are trying to do. You haven't told us that yet, or maybe you did tell us that a long time ago and I forgot.

  1. I have

doubt here:
Can I say that for most of the time when saving the
the tiff file, the intialisation of the array for the
tiff image to save in, is the same?

Sorry, I don't understand you. What do you mean?

Gerben Vos.