title: Screenshot created by function takes huge memory, in Delphi 7
body: <p>I have used a function to create screenshot of my desktop in Delphi 7. I am getting correct screenshots, however the picture taken has a size of around 3 MB. Normally, screenshots have a size of 150 KB or so. I am not sure why.
  Here is my code:</p>
  
  <pre><code>procedure TForm1.btnDesktopShotClick(Sender: TObject);
  VAR
     ScreenH, ScreenW : Integer;
     dc : HDC;
     hWin :Cardinal;
     bm : TBitMap;
  begin
  
    //get handle of desktop
   try
     hWin :=GetDesktopWindow;
    dc:=getDC(hWin);
    ScreenH :=GetDeviceCaps(dc,VertRes);
    ScreenW :=GetDeviceCaps(dc,HORZRES );
    //set bitmap
    bm:=TBitmap.Create;
    bm.Width :=ScreenW ;
    bm.Height :=ScreenH ;
    //copy to dest bitmap
    BitBlt(bm.Canvas.Handle,0,0,bm.Width ,bm.Height ,dc,0,0,SRCCOPY );
    Image1.Picture.Bitmap.Assign(bm);
    Image1.Picture.SaveToFile('screenShotDesktop.jpeg');
  finally
  
    ReleaseDC(hWin,DC);
  end;
  end;
  </code></pre>
  
  <p>Help will be appreciated.</p>
  
  <p>Thanks</p>