2011.04.12 02:06 "[Tiff] Libtiff v4.0.0beta7 released", by Bob Friesenhahn

2011.05.31 10:54 "[Tiff] Write Tile", by Jorge Martin


I am trying to write a tiled TIFF file but the

function TIFFWriteTile is always returning "Can not write tiles to a image" I have set the fields Tilewidth and TileLength and I do stripped

not know what is happening because I did not set any field about the How strips.

can I solve this issue? I pasted some code that I used to write the TIFF:

 TIFF * TIFFDst = TIFFOpen(pszDstFileName, "w");

//Store the differen TAG info from the TIFF input file TIFFSetField(OutTIFF, TIFFTAG_IMAGELENGTH, 3559);

    TIFFSetField(OutTIFF, TIFFTAG_DATETIME, "2011:05:18 14:15:15");

      //TILES INFO


int index =0;

for ( y = 0; y < ImageLength; y += TileLength )
    for (x = 0; x < ImageWidth; x += TileWidth )

      //Loop to write the matrix data into a buffer.
      index =0;
      for (int i = y; i < y+TileLength; i++)
          for (int j = x; j < x+TileWidth; j++)

               //get the data from the matrix

                          buffer[index] =





     TIFFWriteTile(TIFFDst, (tdata_t)buffer, x, y, 0, 0);