Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-q.b-one.net (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id BBFD6400F7E
	for <info@awaresystems.be>; Mon,  6 Jun 2011 17:53:20 +0200 (CEST)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id AA85E82FF07; Mon,  6 Jun 2011 17:52:29 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-q.b-one.net (Postfix) with ESMTP id 048F79E46F6 for
 <info@awaresystems.be>; Mon,  6 Jun 2011 17:52:28 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 5A99286F1C; Mon,  6 Jun 2011
 10:48:54 -0500 (EST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com
 [209.85.215.172]) by lists.maptools.org (Postfix) with ESMTPS id B46D186EEA
 for <tiff@lists.maptools.org>; Wed,  1 Jun 2011 08:21:52 -0500 (EST)
Received: by eye13 with SMTP id 13so2226907eye.3 for
 <tiff@lists.maptools.org>; Wed, 01 Jun 2011 06:21:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.14.124.15 with SMTP id w15mr2777823eeh.191.1306934510952;
 Wed, 01 Jun 2011 06:21:50 -0700 (PDT)
Received: by 10.14.45.67 with HTTP; Wed, 1 Jun 2011 06:21:50 -0700 (PDT)
In-Reply-To: <BANLkTimh-2wOtX8xYGus6YiOQrJ9w3-4AA@mail.gmail.com>
References: <BANLkTimw4-crmTq8fQR5zpA4+1iM2Rb6dw@mail.gmail.com>
 <4DE4E6ED.4080903@sidefx.com>
 <BANLkTimh-2wOtX8xYGus6YiOQrJ9w3-4AA@mail.gmail.com>
Date: Wed, 1 Jun 2011 09:21:50 -0400
Message-ID: <BANLkTikv4t857J5q3yPesn6Ny=BY1HWzSw@mail.gmail.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
To: Jorge Martin <jormarfe@gmail.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Write Tile
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 Wed, Jun 1, 2011 at 6:43 AM, Jorge Martin <jormarfe@gmail.com> wrote:
> Now I have another problem writting tiles. When I open the ouput TIFF there
> are strange issues in all the tiles located in the left parte of the image,
> the rest of the image is right. I think that the problem is why the image is
> 3659x701 and the tiles are 128x128, so there are not an integer number of
> tiles, If I change the Image size in order to have a integer number of tile

You should write all tiles at the same size, even the ones on the edge
of the image which are not fully used. Your code seems to clamp the
size of these tiles which is not how libtiff expects the data. eg. If
your last tile is 67x128, libtiff expects a 128x128 tile with the data
in the first 67 pixels of each row.

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