2006.05.23 12:13 "[Tiff] Question to TIFF mailing list", by Gerben Vos
I'm novice at TIFF coding. Would you say me, please, why my output 24-bit color image has no this IFD part? Here is the simpliest example of output of 10x10 image, using TIFFWriteEncodedStrip().
Your IFD is perfect. You even showed it to us in the tiffdump output! No problem there.
But you are a bit confused about the image data.
if ((raster = (uint32 *) malloc(sizeof (uint32) * width * height * 3)) == NULL)
if ((raster = (char *) malloc(width * height * 3)) == NULL)
for (unsigned int i=0; i<width*height; i++)
raster[i] = 0xffacacac;
for (unsigned int i=0; i<width*height * 3; i += 3)
raster[i] = 0xac;
raster[i + 1] = 0xac;
raster[i + 2] = 0xac;
// To use this test, add #include <stdlib.h> at the top of the program.
//raster[i] = rand() & 0xFF;
//raster[i + 1] = rand() & 0xFF;
//raster[i + 2] = rand() & 0xFF;
Hope this helps,