2009.12.07 16:06 "[Tiff] Problems with multiple strip G4 to single strip G4 tiff.", by Phillip Wiles

2010.01.11 09:47 "Re: [Tiff] me again...", by Gerben Vos

struct gen
{
unsigned char ** data;
unsigned short int width;
unsigned short int height;
unsigned short int bits_per_pixel;
};

bits= imagen->data[y*imagen->width];

Actually, maybe it should really still be:

bits= imagen->data[y];

Or maybe it should be (note the '&'):

bits= &imagen->data[y*imagen->width];

It all depends what kind of data imagen->data points to EXACTLY.

Does data point directly to the pixels? Then you should have declared it as BYTE *, not BYTE **, and you should multiply by the size of the scanline in bytes (note that in Windows BMPs, that size is rounded up to a multiple of 4 bytes, but in TIFF to a single byte). Or does it point to an array of pointers, which each then points to the data of a scanline? In that case, the multiplication already happened when you initialized that extra array, so you don't need to do it here.

Gerben.