2005.09.21 02:27 "[Tiff] Large Tiff", by acid

2005.09.21 21:21 "Re: [Tiff] Large Tiff", by Chris Cox

Without knowing the types involved, I'm not sure we can help.

iBuffPos must be an unsigned 32 bit or 64 bit variable (or you overflow).

And HOW is your code failing?

And trying to handle images that large as contiguous pieces - that's bound to fail without 64 bit addressing.

Chris

Dear sir
I wonder if you could help me solve this

I want to use the code below to read certain part of large tiff (2.64G)

,for example, read from (10000,10000) to (14000,14000)

till now they are working for 222MB Tiff but result from large 2.64G Tiff

is a stretched and roughly grayscale with a little color images.

It is strange to me..

could you please give me some suggestion?

        for (row = 0; row < cropheight; row++)
                {

                        iBuffPos = row * cropwidth * channel;
                        TIFFReadScanline(tif, buf, row+stry);
                        memcpy( ( unsigned char* )m_buf + iBuffPos,  (unsigned char*)buf+strx*channel, cropwidth*channel*iTypeBytes );

                }

Best regards
Alison