Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas025.isp.belgacom.be (localhost [127.0.0.1])
        by inav019.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id jBLKvL0x031263
        for <joris.at.lebbeke@skynet.be>; Wed, 21 Dec 2005 21:57:22 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx005.isp.belgacom.be (inmx005.isp.belgacom.be [195.238.5.148])
        by inas025.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id jBLKvJ8c022281
        for <joris.at.lebbeke@skynet.be>; Wed, 21 Dec 2005 21:57:20 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id jBLKv9Mt002435
        for <joris.at.lebbeke@skynet.be>; Wed, 21 Dec 2005 21:57:10 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jBLKpvm7002158;
	Wed, 21 Dec 2005 15:52:11 -0500
Received: from mail.srcp.com (webstation.srcp.com [12.5.252.47])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jBLKptfi002155
	for <tiff@lists.maptools.org>; Wed, 21 Dec 2005 15:51:56 -0500
Received: from CORPDALLMSG05.na.srcp.net ([10.150.10.117] RDNS failed) by
	mail.srcp.com with Microsoft SMTPSVC(6.0.3790.211); 
	Wed, 21 Dec 2005 14:53:32 -0600
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Subject: RE: [Tiff] Oddball Old Style JPEG image
Date: Wed, 21 Dec 2005 14:51:51 -0600
Message-ID: <741E24F735AED141B61948AC155E7DAA600541@CORPDALLMSG05.na.srcp.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Tiff] Oddball Old Style JPEG image
thread-index: AcYGbaHqmTkIpjmfStWGiv56O8Il3AAAlNmQ
From: "Frank, Jason" <JasonFrank@srcp.com>
To: "Joris" <joris.at.lebbeke@skynet.be>, <tiff@lists.maptools.org>
X-OriginalArrivalTime: 21 Dec 2005 20:53:32.0122 (UTC)
	FILETIME=[9A490BA0:01C60670]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	jBLKptfi002155
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00000fef
X-MSP-STORE: Wed, 21 Dec 2005 21:57:26 +0100
Status:   

Yep, I know all about Old-Style JPEG's.  What I don't know is who
created these images.  The internal content of the TIF cannot be read by
any view that I know about (and I know a lot), and the JPEG data is just
weird.

If I can find the vendor to give me their specs, I can write a custom
decoder.  And I'll do the appropriate evangelism at that point.  But
first, I need to find who created these images.  I'm in contact with the
company that gave them to me, maybe I can get something done via that
route.

Jason

-----Original Message-----
From: Joris [mailto:joris.at.lebbeke@skynet.be] 
Sent: Wednesday, December 21, 2005 2:31 PM
To: Frank, Jason; tiff@lists.maptools.org
Subject: Re: [Tiff] Oddball Old Style JPEG image

Jason,

Frank, Jason wrote:
> Does anyone know anything about the hardware/software that is 
> producing these images?  They appear to be all messed up, but I've got

> to deal with them anyway :-( ...
>   Compression Scheme: Old-style JPEG
>   Photometric Interpretation: YCbCr

Yes, they are all messed up, because the original specification is all
messed up, and some reputable firms have been recycling old code for
over a decade now instead of staying up to date and noticing the
specification supplement corrects the fatal mistake.

The responsible thing to do is the contact the vendor, if you can find
him, and point him to the following documents:

http://www.remotesensing.org/libtiff/TIFFTechNote2.html
This is a document by Tom Lane, that enumerates the many reasons why the
original TIFF 6.0 jpeg-in-tiff scheme is totally faulty. This document
also presents an alternive, proper jpeg-in-tiff scheme

http://partners.adobe.com/public/developer/tiff/index.html
This page by Adobe hosts the complete specification, and thus clearly
shows the supplements have authority. The second supplement includes the
alternative new jpeg-in-tiff scheme originally designed by Tom Lane.

There have been attempts at decoding old-style jpeg-in-tiff and
including a proper decoder inside LibTiff. This is however not easy. The
original faulty spec is unclear in several areas, simply impossible in
at least one area, and breaks the encapsulating TIFF spec in several
others. This lead to multiple mutually exclusive vender specific
implementations, and building a decoder that reads them all is quite a
challenge.

The previous attempt at old-style jpeg-in-tiff decoder was more or less
abandonded, because it had multiple flaws and some vulnerabilities. It's
still there, but it's not enabled by default, and I don't really
recommend it.

There are plans to build and include a new old-style jpeg-in-tiff
decoder in LibTiff. I have a totally newly designed approach to tackle
the problem, that works fine on my test images, and I plan to translate
it into the LibTiff whole and contribute it. I've tried finding funds
for that project, since I simply can't really afford to spend huge
amounts of time right now. If this project is important for you, perhaps
you can consider contributing some funds. Also, finding testimages from
as much as possible different sources is crucial to this project, so if
you can, please feel free to mail me some of your files. Please use my
private email address.


Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html


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