title: How to load and display tiff images in TImage control?
body: <p>I am currently working on Delphi XE2 trial version. I want to load and display TIFF images in TImage control without using any third party component/library.</p>
  
  <p>I tried below code but it is not woking for me.</p>
  
  <pre><code>Procedure TForm1.Button1Click(Sender: TObject); 
  Var 
       OleGraphic               : TOleGraphic; 
       fs                       : TFileStream; 
       Source                   : TImage; 
       BMP                      : TBitmap; 
  Begin 
       Try 
            OleGraphic := TOleGraphic.Create; 
  
            fs := TFileStream.Create('c:\testtiff.dat', fmOpenRead Or fmSharedenyNone); 
            OleGraphic.LoadFromStream(fs); 
  
            Source := Timage.Create(Nil); 
            Source.Picture.Assign(OleGraphic); 
  
            BMP := TBitmap.Create; 
            bmp.Width := Source.Picture.Width; 
            bmp.Height := source.Picture.Height; 
            bmp.Canvas.Draw(0, 0, source.Picture.Graphic); 
  
            image1.Picture.Bitmap := bmp;
       Finally 
            fs.Free; 
            OleGraphic.Free; 
            Source.Free; 
            bmp.Free; 
       End; 
  End;
  </code></pre>
  
  <p>Please advice.</p>