Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-c.b-one.net (mx-c.one.com [91.198.169.50])
	by mail9.b-one.net (Postfix) with ESMTP id 482AB40080A
	for <info@awaresystems.be>; Tue, 16 Feb 2010 15:13:27 +0100 (CET)
Received: by mx-c.b-one.net (Postfix, from userid 106)
	id 3C1CC3301965; Tue, 16 Feb 2010 15:13:27 +0100 (CET)
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-c.b-one.net (Postfix) with ESMTP id CCD3C330193F for
 <info@awaresystems.be>; Tue, 16 Feb 2010 15:13:25 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id E59491D4A6570; Tue, 16 Feb 2010
 09:11:46 -0500 (EST)
Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by
 lists.maptools.org (Postfix) with ESMTP id A3DA51D4A64EA for
 <tiff@lists.maptools.org>; Tue, 16 Feb 2010 09:08:36 -0500 (EST)
MIME-version: 1.0
Received: from origin1 ([24.203.49.110]) by VL-MO-MR005.ip.videotron.ca (Sun
 Java(tm) System Messaging Server 6.3-4.01 (built Aug  3 2007; 32bit)) with
 ESMTP id <0KXX00JDMTY15VD0@VL-MO-MR005.ip.videotron.ca> for
 tiff@lists.maptools.org; Tue, 16 Feb 2010 09:08:25 -0500 (EST)
Received: from [10.10.10.163] (spock [10.10.10.163])	by origin1 (Postfix)
 with ESMTP id 346A0605088; Tue, 16 Feb 2010 09:08:25 -0500 (EST)
Message-id: <4B7AA6D8.7030806@3delight.com>
Date: Tue, 16 Feb 2010 09:08:24 -0500
From: Olivier Paquet <olivier@3delight.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6)
 Gecko/20091218 SeaMonkey/2.0.1
To: Weichao Wang <weichao_wang@hotmail.com>
References: <BAY128-W274F37D0CF5213A6E728EAF14A0@phx.gbl>
In-reply-to: <BAY128-W274F37D0CF5213A6E728EAF14A0@phx.gbl>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Using libtiff in Visual C++ 6.0
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

Weichao Wang wrote:
> I've implemented reading, writing and dithering tiff in Visual C++ 6.0
> for gray scale tiff image, but (unfortunately!!!) only for uncompressed
> tiff files (and not for tiled files), since I don't know the various
> (un)compression processes. Now I'd like to make use of libtiff to enable
> the programm to process compressed files. Is there a step by step guide
> on how to use libtiff in VC++6? Many thanks!

Is your problem using libtiff or building it with compression support?

Reading compressed files is transparent for many formats as long as 
support for the compression format was built into your version of 
libtiff. Some compression formats require other libraries (eg. libz, 
libjpeg).

Writing compressed files can be as simple as setting a tag once you've 
created your file but before you start writing data to it:

TIFFSetField( tiff, TIFFTAG_COMPRESSION, COMPRESSION_LZW );

or for deflate compression (which requires libz):
TIFFSetField( tiff, TIFFTAG_COMPRESSION, COMPRESSION_ADOBE_DEFLATE );

there many others as well, some of which have particular requirements on 
how the data is provided and decoded.

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