Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail6.b-one.net (Postfix) with ESMTP id 9AA4280150C98
	for <filtered@awaresystems.be>; Wed, 11 Jul 2012 23:41:24 +0200 (CEST)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-r: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.212.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48])
	by mx-r.one.com (Postfix) with ESMTP id 36EA41B89A72
	for <filtered@awaresystems.be>; Wed, 11 Jul 2012 21:41:24 +0000 (UTC)
Received: by vbjk17 with SMTP id k17so1524275vbj.21
        for <filtered@awaresystems.be>; Wed, 11 Jul 2012 14:41:23 -0700 (PDT)
Received: by 10.52.93.10 with SMTP id cq10mr545634vdb.122.1342042883529;
        Wed, 11 Jul 2012 14:41:23 -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.58.208.231 with SMTP id mh7csp59989vec;
        Wed, 11 Jul 2012 14:41:23 -0700 (PDT)
Received: by 10.220.116.3 with SMTP id k3mr3497970vcq.26.1342042882226;
        Wed, 11 Jul 2012 14:41:22 -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.56 as permitted sender) client-ip=91.198.169.56;
Received: by 10.230.202.193 with POP3 id ff1mf664505vbb.32;
        Wed, 11 Jul 2012 14:41:22 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-i.one.com (mx-i.one.com [91.198.169.56])
	by mail6.b-one.net (Postfix) with ESMTP id 865AB80150C98
	for <info@awaresystems.be>; Wed, 11 Jul 2012 23:38:47 +0200 (CEST)
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-i.one.com (Postfix) with ESMTP id 2EAA5105402D
	for <info@awaresystems.be>; Wed, 11 Jul 2012 21:38:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 4F5C31EDB2F;
	Wed, 11 Jul 2012 16:37:40 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id 53C241EDB2A
	for <tiff@lists.maptools.org>; Wed, 11 Jul 2012 16:35:09 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q6BLZ7Zi001794; Wed, 11 Jul 2012 16:35:07 -0500 (CDT)
Date: Wed, 11 Jul 2012 16:35:07 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Jorge Martin <jormarfe@gmail.com>
In-Reply-To: <CADH5xWqhDbnx+2ku-dCHm6ZkT_w6p2U4Y2Etph0RtCfNFfpnGg@mail.gmail.com>
Message-ID: <alpine.GSO.2.01.1207111631180.14450@freddy.simplesystems.org>
References: <CADH5xWqhDbnx+2ku-dCHm6ZkT_w6p2U4Y2Etph0RtCfNFfpnGg@mail.gmail.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-63107222-1342042507=:14450"
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Wed, 11 Jul 2012 16:35:07 -0500 (CDT)
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF
 files
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-63107222-1342042507=:14450
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT

On Wed, 11 Jul 2012, Jorge Martin wrote:

> Hello,
>        I have an important doubt about how tile/strip oriented TIFF images have to be read/written. As I know, not all
> the tiles/strips are full of data because the rowPerStrip/TileSize is not multiple of the size of the image. I understand
> that the strip/tile that are not full of data, will be filled with 0s by libtiff when the Tile/Strip are read. And this
> Strip/Tile should be filled with 0s before call to libtiff (TIFFWriteEncodedStrip/TIFFWriteEncodedTile). Are these
> assumptions correct? 

I think so.  Tiles are always full rectangles even if they refer to 
unused area.

>        I have implemented the code pasted below to read tile-oriented image, but I do not know how to manage the Tiles
> that are not full of data (border tile), because I need to return a buffer (m_TiffValuesVec->at(dirIdx).tiffBuffer) with
> only data. 

You will need to copy from the tile into your own representation if 
you don't want to preserve the unused tile portion.

Feel free to refer to GraphicsMagick's TIFF code for an example 
(seached for "TiledMethod"):

http://graphicsmagick.hg.sourceforge.net/hgweb/graphicsmagick/graphicsmagick/file/cd958baa618c/coders/tiff.c

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-63107222-1342042507=:14450
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
---559023410-63107222-1342042507=:14450--
