Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-e.b-one.net (mx-e.one.com [91.198.169.52])
	by mail9.b-one.net (Postfix) with ESMTP id 5F048400122
	for <info@awaresystems.be>; Wed, 29 Apr 2009 12:43:09 +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=6 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-e.b-one.net (Postfix) with ESMTP id C1239C2E036
	for <info@awaresystems.be>; Wed, 29 Apr 2009 12:43:08 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 08B9F1D18EA86;
	Wed, 29 Apr 2009 05:42:24 -0500 (EST)
Received: from fmmailgate02.web.de (fmmailgate02.web.de [217.72.192.227])
	by lists.maptools.org (Postfix) with ESMTP id 9B14F1D1AF289
	for <tiff@lists.maptools.org>; Wed, 29 Apr 2009 04:58:23 -0500 (EST)
Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166])
	by fmmailgate02.web.de (Postfix) with ESMTP id 48A9FFDF05EA
	for <tiff@lists.maptools.org>; Wed, 29 Apr 2009 11:58:22 +0200 (CEST)
Received: from [79.222.55.30] (helo=simon.fritz.box)
	by smtp05.web.de with asmtp (WEB.DE 4.110 #277) id 1Lz6YY-00088v-00
	for tiff@lists.maptools.org; Wed, 29 Apr 2009 11:58:22 +0200
To: tiff@remotesensing.org
Date: Sun, 26 Apr 2009 19:22:26 +0200
From: "Simon Berger" <simon_-berger@web.de>
Message-ID: <op.usz7voo3foqvse@simon.fritz.box>
User-Agent: Opera Mail/10.00 (Win32)
Resent-To: tiff@lists.maptools.org
MIME-Version: 1.0
Resent-From: "Simon Berger" <simon_-berger@web.de>
Resent-Date: Wed, 29 Apr 2009 11:58:13 +0200
Resent-Message-ID: <op.us47bbqtfoqvse@simon.fritz.box>
X-Sender: simon_-berger@web.de
X-Provags-ID: V01U2FsdGVkX1+Y3DBY2TDH6LTrYK27rpRvIgVRqPbbLz+Qf4YS
	x0Z1h2nfrblVf8VcgyYhX3mnX5AIraB6zSIT1sw2hNk65KEi7f
	ADJXFWLyzR4keN5bllyQ==
Subject: [Tiff] Packbits worst case encoded length
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

I implemented the packbits encode/decode functions of libtiff. It works  
great overall, but sometimes the worst case formula:

srcByteLen + (srcByteLen + 126) / 127

doesn't work. On a 24 bit image with big width I got 1 - 15 higher output.  
Is this due to a non standard implementation and is there any length I  
can safely use instead of any flushing inside the function (I cut the  
block off)?

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