Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-i.one.com (mx-i.one.com [91.198.169.56])
	by mail9.b-one.net (Postfix) with ESMTP id 533C4401F02
	for <filtered@awaresystems.be>; Wed, 21 Mar 2012 07:05:50 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-i: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.210.176 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-iy0-f176.google.com (mail-iy0-f176.google.com [209.85.210.176])
	by mx-i.one.com (Postfix) with ESMTP id E0E75269B9C3
	for <filtered@awaresystems.be>; Wed, 21 Mar 2012 06:05:49 +0000 (UTC)
Received: by iagw33 with SMTP id w33so1448247iag.21
        for <filtered@awaresystems.be>; Tue, 20 Mar 2012 23:05:49 -0700 (PDT)
Received: by 10.68.225.194 with SMTP id rm2mr7811237pbc.95.1332309948666;
        Tue, 20 Mar 2012 23:05:48 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.142.101.10 with SMTP id y10csp102290wfb;
        Tue, 20 Mar 2012 23:05:47 -0700 (PDT)
Received: by 10.68.136.228 with SMTP id qd4mr7811165pbb.141.1332309946721;
        Tue, 20 Mar 2012 23:05:46 -0700 (PDT)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.57 as permitted sender) client-ip=91.198.169.57;
Received: by 10.68.141.200 with POP3 id rq8mf392355pbb.16;
        Tue, 20 Mar 2012 23:05:46 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-j.one.com (mx-j.one.com [91.198.169.57])
	by mail9.b-one.net (Postfix) with ESMTP id ABCF0401F04
	for <info@awaresystems.be>; Wed, 21 Mar 2012 06:17:17 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-j.one.com (Postfix) with ESMTP id 4893A8E25AC
	for <info@awaresystems.be>; Wed, 21 Mar 2012 05:17:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id D71991CC0FC;
	Wed, 21 Mar 2012 00:14:58 -0500 (EST)
Received: from sasl.smtp.pobox.com (a-pb-sasl-sd.pobox.com [74.115.168.62])
	by lists.maptools.org (Postfix) with ESMTP id AE7721CC0B0
	for <tiff@lists.maptools.org>; Wed, 21 Mar 2012 00:14:10 -0500 (EST)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
	by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 2799C9E4F
	for <tiff@lists.maptools.org>; Wed, 21 Mar 2012 01:14:10 -0400 (EDT)
Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1])
	by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 214069E4E
	for <tiff@lists.maptools.org>; Wed, 21 Mar 2012 01:14:10 -0400 (EDT)
Received: from [192.168.1.6] (unknown [173.164.237.214]) (using TLSv1 with
	cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate
	requested)
	by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 85E579E4C for
	<tiff@lists.maptools.org>; Wed, 21 Mar 2012 01:14:09 -0400 (EDT)
Message-ID: <4F6963A0.20509@pobox.com>
Date: Tue, 20 Mar 2012 22:14:08 -0700
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24)
	Gecko/20111108 Thunderbird/3.1.16
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <4F689311.1060305@infologika.com.br>
In-Reply-To: <4F689311.1060305@infologika.com.br>
X-Pobox-Relay-ID: B08F9CAE-7314-11E1-A578-65B1DE995924-06493634!a-pb-sasl-sd.pobox.com
Subject: Re: [Tiff] Unable to read following tiff file
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On 12-03-20 07:24 AM, Reg wrote:
>
> Most tiff readers (not based on libtiff) can read the following file. Libtiff
> can not. For reTiff2rgba fails to convert it (just for reference).
>
> What is worse it does not fail, it generates a blank image.
>
> Could you please check?
>
> The file is available at:
> http://www.infologika.com.br/public/1.tif

Dennis,

tiffinfo reports:


1.tif: Warning, Nonstandard tile width 2550, convert file.
1.tif: Warning, Nonstandard tile length 3300, convert file.
TIFFReadDirectory: Warning, Unknown field with tag 512 (0x200) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 513 (0x201) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 514 (0x202) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 515 (0x203) encountered.
JPEGFixupTagsSubsampling: Warning, Unable to auto-correct subsampling values, 
likely corrupt JPEG compressed data in first strip/tile; auto-correcting skipped.
TIFF Directory at offset 0x8 (8)
   Subfile Type: (0 = 0x0)
   Image Width: 2550 Image Length: 3300
   Tile Width: 2550 Tile Length: 3300
   Resolution: 300, 300 pixels/inch
   Bits/Sample: 8
   Compression Scheme: JPEG
   Photometric Interpretation: YCbCr
   YCbCr Subsampling: 2, 1
   YCbCr Positioning: cosited
   Orientation: row 0 top, col 0 lhs
   Samples/Pixel: 3
   Planar Configuration: single image plane
   Reference Black/White:
      0:     0   255
      1:   128   255
      2:   128   255
   Tag 512: 1
   Tag 513: 360
   Tag 514: 304240
   Tag 515: 0

This file has an illegal (as far as I understand) tile size which is not
a multiple of 8.  I don't know what tags 512-515 are.  When I run tiff2rgba
I see:

JPEGLib: Not a JPEG file: starts with 0xbb 0x45.

So the actual JPEG data seems broken.  When I do tiffdump I discovered that
it knows tags 512-515:

JPEGProcessingMode (512) SHORT (3) 1<1>
JPEGInterchangeFormat (513) LONG (4) 1<360>
JPEGInterchangeFormatLength (514) LONG (4) 1<304240>
JPEGRestartInterval (515) SHORT (3) 1<0>

I tried extracting the jpeg data and it isn't recognised as a JFIF file or
a raw jpeg stream.  So I'm not sure how other packages read it.  It doesn't
seem well behaved to me.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://home.gdal.org/warmerda
and watch the world go round - Rush    | Geospatial Software Developer

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
