Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx008.isp.belgacom.be (inmx008.isp.belgacom.be [195.238.3.88])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id j1SCnDbM025927
        for <joris.at.lebbeke@skynet.be>; Mon, 28 Feb 2005 13:49:13 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx008.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j1SCmwJH022093
        for <joris.at.lebbeke@skynet.be>; Mon, 28 Feb 2005 13:49:01 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 1455AEA86FE; Mon, 28 Feb 2005 07:48:44 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from outmx001.isp.belgacom.be (outmx001.isp.belgacom.be
	[195.238.3.51])
	by xserve.flids.com (Postfix) with ESMTP id 4B7ADEA86EB
	for <tiff@remotesensing.org>; Mon, 28 Feb 2005 07:48:42 -0500 (EST)
Received: from outmx001.isp.belgacom.be (localhost [127.0.0.1])
	by outmx001.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with
	ESMTP id j1SCmbmU003218
	for <tiff@remotesensing.org>; Mon, 28 Feb 2005 13:48:38 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (160-182.245.81.adsl.skynet.be [81.245.182.160])
	by outmx001.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with SMTP
	id j1SCmSiq003107; Mon, 28 Feb 2005 13:48:28 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <000901c51d93$dd9bf230$a0b6f551@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: =?iso-8859-1?B?Sm9z6SBNYXLtYSBO+vFleiBPcnR18W8=?= <jnunez@indomotika.com>,
        "Tiff mailing list" <tiff@remotesensing.org>
References: <20050228115152.9F512EA81AA@xserve.flids.com>
	<001101c51d92$c5a012c0$a0b6f551@dfgrrxsknr4e>
Subject: Re: [Tiff] Delphi TIFF visualization
Date: Mon, 28 Feb 2005 13:48:55 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
Cc: 
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 19669f082885f90e64399ae85146b36b

Oh, and, like I said, going from what I posted before to display in a TImage
component is simply a matter of assigning the TBitmap to the TImage.Picture
property. Note that this does not transfer ownership of the TBitmap, but
increments usage counters in a copy-on-write scheme (which can be though of as
being the same as making a copy, except that it doesn't require duplicate memory
and duplication processing resources as long as you don't change either copy).
So if you're not doing anything else with the TBitmap, you'll have to clean up
the owned copy, which people tend to forget. Therefore, you code use the
following example code for exactly 'to simply visualize a TIFF image in a Timage
control using LibTiffDelphi', using normal Delphi exception raising/handling
methods.

procedure TForm1.VisualizeTIFFFileInImage(Filename: String; Image: TImage);
var
  m: TBitmap;
begin
  try
    m:=ReadTiffIntoBitmap(Filename);
    Image.Picture.Assign(m);
    m.Destroy;
  except
    Image.Picture.Assign(nil);
  end;
end;


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
