Received: from [63.81.160.31] by phlipper.cerious.com (NTMail 6.04.0010/QS0743.00.7d9c33ab) with ESMTP id iccxbaaa for pcrews@cerious.com; Fri, 22 Mar 2002 12:46:29 +0000
Received: from vaio ([65.121.116.189]) by sylvanserver.sylvanmaps.com with Microsoft SMTPSVC(5.0.2195.2966);
	 Fri, 22 Mar 2002 10:55:44 -0700
From: "Roger Bedell" <roger@sylvanmaps.com>
To: <pcrews@cerious.com>
Subject: RE: TIFF image tiles from the UK Ordnance Survey Errors out.
Date: Fri, 22 Mar 2002 10:46:24 -0700
MIME-Version: 1.0
Message-ID: <002e01c1d1c9$7c1cf9f0$655b88cc@vaio>
Content-Type: text/plain
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2627
In-Reply-To: <4.2.0.58.20020322122322.01604c90@63.97.174.131>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Return-Path: roger@sylvanmaps.com
X-OriginalArrivalTime: 22 Mar 2002 17:55:44.0925 (UTC) FILETIME=[CA3674D0:01C1D1CA]

I thought I did. I checked, and it seems that the compiler refused to
pick up the change. Sorry about that. But when I tried that, it still
crashes.

I'll just change byte 0x6E to 1, that seems to work fine.

Roger Bedell, President, Sylvan Ascent Inc.
roger@sylvanmaps.com
www.sylvanmaps.com
www.topodepot.com
505-758-7712


-----Original Message-----
From: Phillip Crews [mailto:pcrews@cerious.com] 
Sent: Friday, March 22, 2002 10:25 AM
To: Roger Bedell
Subject: RE: TIFF image tiles from the UK Ordnance Survey Errors out.

Roger,

It looks like strip-chop support is still enabled. If you used the mode 
"rc" open method, try removing strip-chop support from the library
instead, 
by changing tiffconf.h.

In tiffconf.h, look for the #define STRIPCHOP_DEFAULT line and change it
to 0.

Kind regards,
Phillip


At 12:12 3/22/2002 , you wrote:
>Phillip,
>Thank you very much for these suggestions. I tried them but am still
>getting the following messages:
>
>Incorrect count for field RowsPerStrip (0, expecting 1); tag ignored
>Incorrect count for field DateTime (21, expecting 20); tag ignored
>Incorrect count for field StripOffsets (2000, expecting 1); tag ignored
>Incorrect count for field StripByteCounts (2000, expecting 1); tag
>ignored
>No space for chopped "StripOffsets" array
>
>It then goes south with a memory exception.
>
>As I am not familiar with the internals of LibTIFF, I appreciate any
>other suggestions you might have.
>
>Thanks!!
>
>Roger Bedell, President, Sylvan Ascent Inc.
>roger@sylvanmaps.com
>www.sylvanmaps.com
>www.topodepot.com
>505-758-7712
>
>
>-----Original Message-----
>From: Phillip Crews [mailto:pcrews@cerious.com]
>Sent: Friday, March 22, 2002 9:05 AM
>To: Roger Bedell; tiff@olympiakos.com
>Subject: Re: TIFF image tiles from the UK Ordnance Survey Errors out.
>
>Roger,
>
>I've seen bogus TIFF files like these before. I believe they will
>require
>two changes to read them:
>
>1. Disable STRIPCHOP support (#define STRIPCHOP_DEFAULT 0 in
tiffconf.h,
>or
>open using mode "rc").
>
>2. Modify tif_dumpmode.c as follows to calculate the correct length of
>the
>strip:
>
>*** d:\libtiff\tif_dumpmode.c   Wed Oct 17 16:44:12 2001
>--- d:\temp\tif_dumpmode.c      Fri Jan 28 10:08:10 2000
>***************
>*** 71,91 ****
>    static int
>    DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
>    {
>-       TIFFDirectory* td = &tif->tif_dir;
>          (void) s;
>          if (tif->tif_rawcc < cc) {
>!               if ( td->td_planarconfig == PLANARCONFIG_CONTIG
>!                && (td->td_rowsperstrip == (uint32)-1 ||
>td->td_rowsperstrip == td->td_imagelength) ) {
>!                       TIFFWarning(tif->tif_name,
>!                               "DumpModeDecode: Invalid strip length
>(%d),
>calculating",
>!                                       tif->tif_rawcc);
>!                       cc = tif->tif_rawcc = min(cc,
>(tsize_t)(TIFFGetFileSize(tif) - td->td_stripoffset[0]));
>!               } else {
>!                       TIFFWarning(tif->tif_name,
>!                               "DumpModeDecode: Not enough data for
>scanline %d",
>!                               tif->tif_row);
>!                       cc = tif->tif_rawcc;
>!               }
>          }
>          /*
>           * Avoid copy if client has setup raw
>--- 71,82 ----
>    static int
>    DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
>    {
>          (void) s;
>          if (tif->tif_rawcc < cc) {
>!               TIFFError(tif->tif_name,
>!                   "DumpModeDecode: Not enough data for scanline %d",
>!                   tif->tif_row);
>!               return (0);
>          }
>          /*
>           * Avoid copy if client has setup raw
>--
>
>Note: This diff also makes "not enough data for scanline" a warning
>rather
>than an error.
>
>I was able to load your sample in my program (ThumbsPlus), which
>incorporates these changes.
>
>Kind regards,
>Phillip Crews
>
>
>At 09:28 3/22/2002 , Roger Bedell wrote:
>
> >Please forgive me if this is a duplicate post, I had a little trouble
> >subscribing to the TIFF list (my fault).
> >
> >
> >
> >I am trying to load a TIFF image tiles from the UK
> >
> >Ordnance Survey. It errors out with a variety of warnings, the most
> >critical of which seems to be:
> >
> >
> >
> >Incorrect count for field RowsPerStrip (0, expecting 1); tag ignored
> >
> >
> >
> >And
> >
> >
> >
> >Incorrect count for field StripOffsets (2000, expecting 1); tag
ignored
> >
> >
> >
> >After this it crashes hard.
> >
> >
> >
> >Can anyone help me? I am using v3.5.7 of libtiff. I ve never had a
>problem
> >before&
> >
> >
> >
> >You can download the test file I ve been using from:
> >
> >
> >
>
><http://sylvanmaps.com/temp/Tq06.zip>http://sylvanmaps.com/temp/Tq06.zi
>p
> >
> >
> >
> >Here is some more information from my customer who is trying to use
>these
> >files:
> >
> >
> >
> >It's a standard Ordnance Survey 20km x 20km image tile. I tried
another
>
> >one and that didn't work either. The Ordnance Survey is the UK
>government
> >national mapping agency.
> >
> >
> >
> >"1:50,000 Scale Colour Raster data is the definitive raster dataset
> >providing national coverage of Great Britain. It is comprised of 812
>20km
> >by 20km tiles, offering seamless coverage of the entire country.
> >
> >
> >
> >The 1:50,000 Scale Colour Raster data product mirrors the popular
> >LandrangerR map series, Britain's most popular map series. It can
>provide
> >the ideal mapping backdrop upon which to overlay business
information."
> >
> >
> >
> >According to their technical spec the file I sent you was "TIFF"
>Palette 8
> >bit (256 colours) uncompressed". They charge a fee for these files,
so
>I
> >don't think there's anywhere the libtiff developers can get them
from.
> >
> >
> >
> >Got all this from
<http://www.ordsvy.gov.uk/>http://www.ordsvy.gov.uk/
> >choosing 1:50,000 scale raster image from the dropdown. There is a
>sample
> >you can download from their website ("sample data" link). I just
tried
>to
> >download it but it didn't succeed
> >
> >
> >
> >Thanks for looking into it, I suppose now we wait to see whether
anyone
>
> >responds on the libtiff list,
> >
> >
> >
> >
> >
> >Thanks!!
> >
> >
> >
> >
> >
> >Roger Bedell
> >
> >roger@sylvanmaps.com
> >
> >

Attachment Converted: "d:\eudora\attach\smime6.p7s"
