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
July 2008

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

2008.07.03 15:36 "Converting BMP to Tiff", by Lou Feliz
2008.07.03 21:18 "Converting BMP to Tiff", by Lou Feliz
2008.07.21 11:48 "Re: Converting BMP to Tiff", by Gerben Vos

2008.07.03 15:36 "Converting BMP to Tiff", by Lou Feliz

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