Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx005.isp.belgacom.be (inmx005.isp.belgacom.be [195.238.3.148])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id iBCBvVbk006371
        for <joris.at.lebbeke@skynet.be>; Sun, 12 Dec 2004 12:57:31 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id iBCBv30Z005421
        for <joris.at.lebbeke@skynet.be>; Sun, 12 Dec 2004 12:57:07 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 4DD0E4FF101; Sun, 12 Dec 2004 06:56:36 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from smtp4.wanadoo.fr (smtp4.wanadoo.fr [193.252.22.27])
	by xserve.flids.com (Postfix) with ESMTP id B420A4FF0D6
	for <tiff@remotesensing.org>; Sun, 12 Dec 2004 06:56:33 -0500 (EST)
Received: from me-wanadoo.net (localhost [127.0.0.1])
	by mwinf0403.wanadoo.fr (SMTP Server) with SMTP id 949921C0035A;
	Sun, 12 Dec 2004 12:56:32 +0100 (CET)
Received: from [192.168.0.4] (AToulouse-152-1-17-189.w82-125.abo.wanadoo.fr
	[82.125.15.189])
	by mwinf0403.wanadoo.fr (SMTP Server) with ESMTP id 109031C0034D;
	Sun, 12 Dec 2004 12:56:32 +0100 (CET)
User-Agent: Microsoft-Entourage/10.1.4.030702.0
Date: Sun, 12 Dec 2004 12:56:29 +0100
Subject: Re: [Tiff] TIFF Pyramid
From: Eric VERGNAUD <eric.vergnaud@jlynx.com>
To: Joris <joris.at.lebbeke@skynet.be>,
        Tiff mailing list <tiff@remotesensing.org>
Message-ID: <BDE1F07D.2CD73%eric.vergnaud@jlynx.com>
In-Reply-To: <000e01c4dfa8$b77e1610$44b8f551@dfgrrxsknr4e>
Mime-version: 1.0
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
Cc: 
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 797994d065e3b069e0020489ee039c2a

le 11/12/04 18:41, Joris =E0 joris.at.lebbeke@skynet.be a =E9crit=A0:

> Eric,
>=20
>> Is there a sample on how to write tiff pyramid. I'm not 100% sure on how=
 to
>> create and save the subifds.
>=20
> I've build such a tile pyramid TIFF with Photoshop 7.0, and this is what =
that
> got me:
>=20
> Page 0 at offset 8
>  + SubIFDs 0 at offset 6432380
>  + SubIFDs 1 at offset 7331432
>  + SubIFDs 2 at offset 7485948
>  + Exif IFD 0 at offset 6432336
>=20
> Page 0 at offset 8
> NewSubfileType, 1 LONG: -
> ImageWidth, 1 SHORT: 6000
> ImageLength, 1 SHORT: 4003
> BitsPerSample, 3 SHORT: 8, 8, 8
> Compression, 1 SHORT: JPEG ('new-style' JPEG)
> PhotometricInterpretation, 1 SHORT: YCbCr
> StripOffsets, 1335 LONG: 34220, 39056, 44068, 49084, 54100, 59258,...
> SamplesPerPixel, 1 SHORT: 3
> RowsPerStrip, 1 SHORT: 3
> StripByteCounts, 1335 LONG: 4836, 5012, 5015, 5016, 5158, 5054,...
> XResolution, 1 RATIONAL: 305
> YResolution, 1 RATIONAL: 305
> PlanarConfiguration, 1 SHORT: Chunky format
> ResolutionUnit, 1 SHORT: Inch
> Software, 20 ASCII: "Adobe Photoshop 7.0"
> DateTime, 20 ASCII: "2004:12:11 18:03:21"
> SubIFDs, 1 IFD: 6432380
> JPEGTables, 459 UNDEFINED: 255, 216, 255, 219, 0, 132, 0, 16, 11,...
> XMP, 4649 BYTE: "<?xpacket begin=3D'   ' id=3D'W5M0MpCehiHzreSzNTczkc9d...
> Photoshop, 18102 BYTE: 56, 66, 73, 77, 4, 37, 0, 0, 0, 0, 0, 16, 0,...
> Exif IFD, 1 LONG: 6432336
>=20
> SubIFDs 0 at offset 6432380
> NewSubfileType, 1 LONG: Reduced-resolution version
> ImageWidth, 1 SHORT: 3000
> ImageLength, 1 SHORT: 2002
> BitsPerSample, 3 SHORT: 8, 8, 8
> Compression, 1 SHORT: JPEG ('new-style' JPEG)
> PhotometricInterpretation, 1 SHORT: YCbCr
> StripOffsets, 286 LONG: 6435336, 6438382, 6441464, 6444610,...
> SamplesPerPixel, 1 SHORT: 3
> RowsPerStrip, 1 SHORT: 7
> StripByteCounts, 286 LONG: 3046, 3081, 3145, 3108, 3233, 3227,...
> XResolution, 1 RATIONAL: 152,5
> YResolution, 1 RATIONAL: 152,5
> PlanarConfiguration, 1 SHORT: Chunky format
> ResolutionUnit, 1 SHORT: Inch
> JPEGTables, 459 UNDEFINED: 255, 216, 255, 219, 0, 132, 0, 16, 11,...
>=20
> SubIFDs 1 at offset 7331432
> NewSubfileType, 1 LONG: Reduced-resolution version
> ImageWidth, 1 SHORT: 1500
> ImageLength, 1 SHORT: 1001
> BitsPerSample, 3 SHORT: 8, 8, 8
> Compression, 1 SHORT: JPEG ('new-style' JPEG)
> PhotometricInterpretation, 1 SHORT: YCbCr
> StripOffsets, 72 LONG: 7332676, 7334308, 7336024, 7337828, 7339494,...
> SamplesPerPixel, 1 SHORT: 3
> RowsPerStrip, 1 SHORT: 14
> StripByteCounts, 72 LONG: 1632, 1715, 1803, 1665, 1649, 1627, 2054,...
> XResolution, 1 RATIONAL: 76,25
> YResolution, 1 RATIONAL: 76,25
> PlanarConfiguration, 1 SHORT: Chunky format
> ResolutionUnit, 1 SHORT: Inch
> JPEGTables, 459 UNDEFINED: 255, 216, 255, 219, 0, 132, 0, 16, 11,...
>=20
> SubIFDs 2 at offset 7485948
> NewSubfileType, 1 LONG: Reduced-resolution version
> ImageWidth, 1 SHORT: 750
> ImageLength, 1 SHORT: 501
> BitsPerSample, 3 SHORT: 8, 8, 8
> Compression, 1 SHORT: JPEG ('new-style' JPEG)
> PhotometricInterpretation, 1 SHORT: YCbCr
> StripOffsets, 18 LONG: 7486760, 7489102, 7491628, 7494930, 7498102,...
> SamplesPerPixel, 1 SHORT: 3
> RowsPerStrip, 1 SHORT: 29
> StripByteCounts, 18 LONG: 2341, 2525, 3302, 3171, 3588, 3985, 3871,...
> XResolution, 1 RATIONAL: 38,125
> YResolution, 1 RATIONAL: 38,125
> PlanarConfiguration, 1 SHORT: Chunky format
> ResolutionUnit, 1 SHORT: Inch
> JPEGTables, 459 UNDEFINED: 255, 216, 255, 219, 0, 132, 0, 16, 11,...
>=20
> Exif IFD 0 at offset 6432336
> ColorSpace, 1 SHORT: Uncalibrated
> PixelXDimension, 1 LONG: 6000
> PixelYDimension, 1 LONG: 4003
>=20
> In my opinion, that is completely in accordance with the specification
> supplement that describes the SubIFDs tag. All differently sized versions=
 are
> part of the single main IFD, either the main image in that IFD, or the im=
age
> in
> a SubIFD of that IFD. That should indicate to a reader that this is all r=
eally
> the same image. The NewSubfileType tag is used as an extra indication of =
this
> relation. The SubIFDs tag points only to the first SubIFD, and each SubIF=
D
> points to the next.
>=20
> As Photoshop writes it, the big 'real' image is written as primary image =
in
> the
> primary page IFD, and each subsequent SubIFD has vertical and horizontal =
pixel
> sizes divided by 2. That you could decide to mimick, but you could also d=
o
> this
> any other way. DNG and related TIFFs store a thumbnail in the primary IFD=
,
> marked as NewSubfileType 'Reduced-resolution version', if I'm not mistaki=
ng.
> So
> the only really important thing is to keep all downsamples part of the sa=
me
> main
> IFD, thus indicating it's the same image, and thus also being ready to on=
e day
> write two or more tile pyramids in the same TIFF, as multiple pages.
>=20
> 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
>=20

Yes I know how it is structured, since that is described in a tech note fro=
m
Adobe. Each image in the main ifd has a subifd for the lowres. All lowres
are chained in that subifd.

What I'm looking for is sample code to write that.

-------------------------------
Eric VERGNAUD - JLynx Software
Cutting-edge technologies and
services for software companies
web: http://www.jlynx.com
-------------------------------


_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
