AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2009.12.07 16:06 "[Tiff] Problems with multiple strip G4 to single strip G4 tiff.", by Phillip Wiles
2009.12.08 17:53 "Re: [Tiff] Problems with multiple strip G4 to single strip G4 tiff.", by Phillip Wiles
2009.12.08 18:11 "Re: [Tiff] Problems with multiple strip G4 to single strip G4 tiff.", by Juergen Buchmueller
2009.12.09 07:47 "Re: [Tiff] Problems with multiple strip G4 to single strip G4 tiff.", by Phillip Wiles
2009.12.09 08:11 "Re: [Tiff] Problems with multiple strip G4 to single strip G4 tiff.", by Juergen Buchmueller
2010.01.08 00:13 "[Tiff] can please anybody help?", by Kavallieratou Ergina
2010.01.07 17:42 "[Tiff] create simple tiff", by Kavallieratou Ergina
2010.01.07 18:05 "Re: [Tiff] create simple tiff", by Bob Friesenhahn
2010.01.07 18:25 "Re: [Tiff] create simple tiff", by Kavallieratou Ergina
2010.01.07 19:47 "Re: [Tiff] create simple tiff", by Bob Friesenhahn
2010.01.07 23:51 "Re: [Tiff] create simple tiff", by Kavallieratou Ergina
2010.01.20 01:30 "Re: [Tiff] 2010.01.11 09:47 "Re: me again...", by Gerben Vos", by Kavallieratou Ergina
2010.01.08 00:39 "Re: [Tiff] can please anybody help?", by Brad Hards
2010.01.08 23:53 "[Tiff] me again...", by Kavallieratou Ergina
2010.01.09 01:14 "Re: [Tiff] me again...", by Bob Friesenhahn
2010.01.11 09:47 "Re: [Tiff] me again...", by Gerben Vos

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.