Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-j.b-one.net (mx-j.one.com [91.198.169.57])
	by mail9.b-one.net (Postfix) with ESMTP id 36E8040024F
	for <info@awaresystems.be>; Sat, 12 Jun 2010 19:15:00 +0200 (CEST)
Received: by mx-j.b-one.net (Postfix, from userid 106)
	id 2D82E5D2D36; Sat, 12 Jun 2010 19:15:00 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-j.b-one.net (Postfix) with ESMTP id 8779B5D2D36 for
 <info@awaresystems.be>; Sat, 12 Jun 2010 19:14:59 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id AB1B71CE7F014; Sat, 12 Jun 2010
 12:13:51 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org
 [65.66.246.74]) by lists.maptools.org (Postfix) with ESMTPS id 91C731D18DE1D
 for <tiff@lists.maptools.org>; Sat, 12 Jun 2010 12:01:12 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
 [65.66.246.65]) by blade.simplesystems.org (8.13.8+Sun/8.13.8) with ESMTP id
 o5CH1B6S016194; Sat, 12 Jun 2010 12:01:12 -0500 (CDT)
Date: Sat, 12 Jun 2010 12:01:11 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Thomas Richter <thor@math.tu-berlin.de>
In-Reply-To: <4C13B353.7030804@math.tu-berlin.de>
Message-ID: <alpine.GSO.2.01.1006121158100.12887@freddy.simplesystems.org>
References: <4C12AC59.1080404@math.tu-berlin.de>
 <31355_1276298527_4C12C51F_31355_2077_1_alpine.GSO.2.01.1006111817110.12887@freddy.simplesystems.org> <4C13B353.7030804@math.tu-berlin.de>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
 (blade.simplesystems.org [65.66.246.90]); Sat, 12 Jun 2010 12:01:12 -0500
 (CDT)
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Class Y (YCbCr) tiffs with 420 subsampling
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 Sat, 12 Jun 2010, Thomas Richter wrote:
>
> Sure enough, however, I'm not quite clear on the semantics of 
> TIFFScanlineSize(). Actually, if you do have subsampling, what is the the 
> "size" of "a" scan line given that every other scanline holds only a subset 
> of all samples? This is not at all clear.
>
> Given this problem, I'm not sure whether the bug is in TIFFScanlineSize() or 
> in the directory reader.

It may be that using scanline access is quite wrong for your 
subsampled files.  It is not possible to support vertical sampling in 
a scanline.  The data is stored using strips (which support multiple 
scanlines and can support vertical sampling) so it seems that 
TIFFStripSize() should be used rather than TIFFScanlineSize() and the 
strip should be read as a whole.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
