Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas025.isp.belgacom.be (localhost [127.0.0.1])
        by inav029.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k513gBJO016716
        for <joris.at.lebbeke@skynet.be>; Thu, 1 Jun 2006 05:42:11 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx001.isp.belgacom.be (inmx001.isp.belgacom.be [195.238.5.1])
        by inas025.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k513g4aI014892
        for <joris.at.lebbeke@skynet.be>; Thu, 1 Jun 2006 05:42:04 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k513fw0b009315
        for <joris.at.lebbeke@skynet.be>; Thu, 1 Jun 2006 05:41:59 +0200
        (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 k513XKUD011909;
	Wed, 31 May 2006 23:34:04 -0400
Received: from outmx015.isp.belgacom.be (outmx015.isp.belgacom.be
	[195.238.4.87])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k513XJX0011906
	for <tiff@lists.maptools.org>; Wed, 31 May 2006 23:33:19 -0400
Received: from outmx015.isp.belgacom.be (localhost [127.0.0.1])
	by outmx015.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with ESMTP id k513XD70002817
	for <tiff@lists.maptools.org>; Thu, 1 Jun 2006 05:33:13 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (182.170-245-81.adsl-dyn.isp.belgacom.be
	[81.245.170.182])
	by outmx015.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with SMTP id k513X8Jd002780; Thu, 1 Jun 2006 05:33:09 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <004101c6852c$2e6d7b60$b6aaf551@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "yourpattern" <yourpattern@126.com>,
        "TIFF mailing list" <tiff@lists.maptools.org>
References: <447BB035.0000B7.11049@m54.126.com>
Subject: Re: [Tiff] New Old Jpeg Support
Date: Thu, 1 Jun 2006 05:33:35 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807
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.0000173d
X-MSP-STORE: Thu, 01 Jun 2006 05:42:21 +0200
Status:   

yourpattern wrote:
> Since the new Old Jpeg available in the libtiff 3.8.3. I found it
> can almost read all the OJPEG-IN-TIFF files that i have
> encountered.

Thank you... I think. You seem to imply there are some it can't (yet)
read. If so, please post them to my private e-mail address, if
convinient. I currently don't have much time, but I'll try and
investigate them as soon as possible.

> Recently I meet another task related with
> OJPEG-IN-TIFF, I want retrieve all the raw JPEG stream data from
> the OJPEG-IN-TIFF file without decoding, then output this stream as
> JFIF file or save it as another well-formated tiff file that can be
> read by other applications.(this approach saved the time of
> decompression and compression of the image data)

I recommend this approach. It doesn't just save time by shaving off
decompression and subsequent recompress, it also prevents accumulating
loss. JPEG, and its OJPEG incarnation in TIFF, are lossy compression
schemes, and repetitive recompression with JPEG can cummulate loss
badly.

> And i have a glimpse on the new tif_ojpeg.c file , and try to doing
> so. do anyone have any suggestions ?

Part of the reason I designed tif_ojpeg the way I did, was this need. It
has JPEG (not JFIF!) file generation code already reasonably
independent. This does generate a single valid JPEG for the complete
image, in the case of continuous non-planar planarconfiguration (99.9%
of the tif_ojpeg files). Currently that JPEG is streamed to a LibJpeg
decoding session, and the output of that decoding session is streamed to
a processing step that re-organizes subsampling, after which it is
suitable as TIFF subcodec decoded output. But instead of streaming to
LibJpeg, it should be very feasable to make it stream to something else
entirely, like file or memory buffer. And it should also not be too hard
to add a few markers to make it valid JFIF instead of colorspace
ignorant JPEG...

To find out what is what, take a look at the comments near the top of
the tif_ojpeg.c file. I've tried to somewhat explain the different parts
there.

It was/is my intention to add this particular functionality. But, like I
said, I don't have much time right now...

Are there funds available for this project? Do you have an urgent
deadline?


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/
