Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 6100 invoked from network); 3 Jul 2008 15:38:43 -0000
Received: from chuck.telenet-ops.be ([195.130.136.1])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 3 Jul 2008 15:38:43 -0000
Received: from mindy.telenet-ops.be (mindy.telenet-ops.be [195.130.136.8])
	by chuck.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m63Fchp9000530
	for <info@awaresystems.be>; Thu, 3 Jul 2008 17:38:43 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mindy.telenet-ops.be (Postfix) with SMTP id 39CD760003
	for <info@awaresystems.be>; Thu,  3 Jul 2008 17:38:43 +0200 (CEST)
Received: from apate.telenet-ops.be (apate.telenet-ops.be [195.130.132.43])
	by mindy.telenet-ops.be (Postfix) with ESMTP id 3368360002
	for <info@awaresystems.be>; Thu,  3 Jul 2008 17:38:43 +0200 (CEST)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by apate.telenet-ops.be (Postfix) with ESMTP id DF54C27ECB3
	for <info@awaresystems.be>; Thu,  3 Jul 2008 17:38:42 +0200 (CEST)
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 m63FaWlv005165;
	Thu, 3 Jul 2008 11:37:27 -0400
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m63FaUAX005160
	for <tiff@lists.maptools.org>; Thu, 3 Jul 2008 11:36:30 -0400
Received: by rv-out-0506.google.com with SMTP id f6so871236rvb.9
	for <tiff@lists.maptools.org>; Thu, 03 Jul 2008 08:36:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:mime-version:content-type:content-transfer-encoding
	:content-disposition;
	bh=+ZbLPyxN34uphmSw/hqeaZN8uoGKHs/o/THbC7k0Bho=;
	b=FuZxqM6GoMkKenQeyYW3rYhdu9nPhPzxXPKg7VesoepNWy739UQSj9o6hKQ69npAvp
	MLmxj9/c0u8pXAZAZrk71yJTn69zyXdtaNfNOm81x2HY8Nozd0v7c9oiKknF/V74dV0Q
	WC5U2tsaeUmhOswLqotfIfy3XzN6FjKDzE07Q=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:mime-version:content-type
	:content-transfer-encoding:content-disposition;
	b=SDERNZ1ld5BO9+EaVgdWy4k25QnUCw1ZiWtuPTvn2O3W8pbUAXZlMZSRyfuZbRj29k
	o3oeZoozN0OkPuK/0sqMerNruj9QEAeEsUrZfD0JGpBHYLGMRPjber8WyBVRm9pW/ltg
	0iAW6Yo/7JNKEhNKlPZBQ5cAAG6YGEfPGwcUw=
Received: by 10.141.176.4 with SMTP id d4mr41110rvp.14.1215099401683;
	Thu, 03 Jul 2008 08:36:41 -0700 (PDT)
Received: by 10.141.82.14 with HTTP; Thu, 3 Jul 2008 08:36:41 -0700 (PDT)
Message-ID: <88cdec030807030836q7effd25elfa2284d59064e17b@mail.gmail.com>
Date: Thu, 3 Jul 2008 08:36:41 -0700
From: "Lou Feliz" <lfeliz@gmail.com>
To: tiff@lists.maptools.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Subject: [Tiff] Converting BMP to Tiff
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-SpamCatcher-Score: 50 [XX]

Hello,

I found a thread with an example function for converting a BMP to
TIFF.  It does work, however I am having a problem.  The BMP is Black
text on a white background and the resulting TIF is white text on
black background.  What causes this?  I am a newbie to graphics
programming, but am thinking I missed something real simple here.

   BMP := TBitmap.create;
   with BMP do
   begin
      Width := 920;
      Height := 1150;
      Canvas.Brush.Color := clWhite;
      Pixelformat := pf1bit ;
      with Canvas.Font do begin
        Name := 'Arial';
        Size := 12;
        Color := clBlack;
      end;
      Canvas.TextOut(50,100,'Hello World');
   end;

   BMP.SaveToFile('c:\temp\TEST.BMP');
// THE BMP Saved to a file looks fine

   WriteBitmapToTiff(BMP,'c:\temp\TEST.TIF');
   BMP.Free;


The Function IAm using is as found in this thread
http://www.asmail.be/msg0054866090.html
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
