AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.02.28 11:51 "Delphi TIFF visualization", by JosÚ N˙˝ez
2005.02.28 12:41 "Re: Delphi TIFF visualization", by Joris Van Damme
2005.02.28 12:48 "Re: Delphi TIFF visualization", by Joris Van Damme
2005.02.28 12:58 "Re: Delphi TIFF visualization", by JosÚ N˙˝ez
2005.02.28 13:16 "Re: Delphi TIFF visualization", by JosÚ N˙˝ez
2005.02.28 13:44 "Re: Delphi TIFF visualization", by Joris Van Damme
2005.02.28 13:27 "Re: Delphi TIFF visualization", by Joris Van Damme

2005.02.28 12:48 "Re: Delphi TIFF visualization", by Joris Van Damme

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 could 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