AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2005.06.17 19:49 "Fix for corrupted multipage TIFF", by Steve Roy
2005.06.20 15:01 "Re: Fix for corrupted multipage TIFF", by Frank Warmerdam
2005.06.23 14:38 "Re: Fix for corrupted multipage TIFF", by Steve Roy
2005.06.23 15:43 "Re: Fix for corrupted multipage TIFF", by Frank Warmerdam
2005.06.23 19:08 "Re: Fix for corrupted multipage TIFF", by Andrey Kiselev

2005.06.23 14:38 "Re: Fix for corrupted multipage TIFF", by Steve Roy

On 20-Jun-05, at 11:01 AM, Frank Warmerdam wrote:
>
> If we were to incorporate such handling, I think it might be best to
> control whether it is used based on an extra open flag indicating
> that an error should not cause complete failure.

I was not familiar with the LibTiff code so I didn't think of that  
but it sounds like the right way to go so I attempted to implement  
it. Here are my changes. I don't know if they are all correct, and  
I'm not sure how to "officially" submit code changes, so feel free to  
let me know.

I thought it would be good to add an h flag corresponding to  
TIFF_HEADERONLY.

In tiffiop.h

Added:
#define    TIFF_HEADERONLY        0x10000    /* read header only */

In tif_open.c, in TIFFClientOpen()

In the mode switch, I added a case for 'h':
         case 'h':
             tif->tif_flags |= TIFF_HEADERONLY;
             break;

Before the block that sets up the initial directory, I added:
     if (tif->tif_flags & TIFF_HEADERONLY)
         return (tif);

What do you think?

Steve

-- 
Steve Roy <sroy@mac.com>
Personal homepage: <http://homepage.mac.com/sroy>
Projects homepage: <http://www.roydesign.net>