Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas006.isp.belgacom.be (localhost [127.0.0.1])
        by inav001.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id jA3Fx9cu010426
        for <joris.at.lebbeke@skynet.be>; Thu, 3 Nov 2005 16:59:09 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx017.isp.belgacom.be (inmx017.isp.belgacom.be [195.238.4.129])
        by inas006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id jA3Fx7u6010674
        for <joris.at.lebbeke@skynet.be>; Thu, 3 Nov 2005 16:59:08 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx017.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id jA3Fx1bL026606
        for <joris.at.lebbeke@skynet.be>; Thu, 3 Nov 2005 16:59:02 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jA3Frj3x017044;
	Thu, 3 Nov 2005 10:53:52 -0500
Received: from pollux.zylab.nl ([213.201.159.34])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jA3FrdY7017041
	for <tiff@lists.maptools.org>; Thu, 3 Nov 2005 10:53:43 -0500
Received: from zynlms01.ZyLAB.WAN (unknown [192.168.1.10])
	by pollux.zylab.nl (Postfix) with ESMTP
	id 5036A1D8FA; Wed,  2 Nov 2005 15:41:28 +0100 (CET)
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Subject: Re: [Tiff] Writing bilevel and transparent TIFFs efficiently
Date: Thu, 3 Nov 2005 16:53:33 +0100
Message-ID: <FC840EC0BF7BFA45A0F94548AF36920DABF0A7@zynlms01.ZyLAB.WAN>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Tiff] Writing bilevel and transparent TIFFs efficiently
Thread-Index: AcXfzqQZMbel/BXNRYSohwP6nUwm4AAvrd+g
From: "Gerben Vos" <Gerben@zylab.com>
To: <tiff@lists.maptools.org>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	jA3FrdY7017041
Cc: Rupali Holmes <rupalih@infograph.com>
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
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
X-UIDL: 000000000023ceae.00000de3
X-MSP-STORE: Thu, 03 Nov 2005 16:59:15 +0100
Status:   

Rupali Holmes wrote:

> I'm trying to write a bilevel image as a transparent TIFF. So one of
> the colors is always transparent, and the other is opaque. What is the
> best way to do this? I can't use G3 or G4 because the colors are not
> necessarily black and white. The one option I see is to write an RGB
> image with an associated alpha but that doesn't seem very efficient.
> Is there a better way to do this? What type of compression should be
> used?

I guess it depends mostly on what is supported by the application which
will receive the TIFF.

One other thing you could try is to have a G3/G4 transparency mask
(Photometric = 4, NewSubfileType has bit 2 set), and another image in
the TIFF file containing a single coloured pixel, with the resolutions
matched so that the images are the same size. However, I can't find
anything in the spec about how the two images are to be associated
with each other, and I doubt this format is supported widely, or at all.

					Gerben Vos.

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