title: Stretching a Bitmap in Delphi using StretchDraw method
body: <p>I have a bitmap image of dimensions(width = 250, height = 200). I am stretching it with following code snippet, but the quality is deteriorated. Is there a way to retain the quality of bitmap image while stretching it?</p>
  
  <pre><code>with Bitmap do
  begin
    Width := 200;
    Height := 150;
    PixelFormat := pf1bit;    
    TransparentMode := tmAuto;
    Canvas.CopyMode := cmSrcCopy;
    Canvas.FillRect(Rect(0, 0, Width, Height));
    Canvas.StretchDraw(Rect(0, 0, Width, Height), MyBitMap);
  end; 
  </code></pre>
  
  <p>Here, <code>MyBitMap</code> is of type <code>TBitMap</code> in which I have loaded the original bitmap image.</p>
  
  <p>AND, Is this the right way of doing this?</p>