Einzelnen Beitrag anzeigen

Moombas
(Gast)

n/a Beiträge
 
#1

Bitmap mit höherer Auflösung?

  Alt 30. Jan 2019, 10:58
Delphi-Version: 10.2 Tokyo
Hallo zusammen,

ich habe aktuell ein kleines "Schönheitsproblem"und wollte mal wissen ob ihr da eine Lösung kennt.
Ich nutze SynPDF.pas um eine PDF zu erzeugen. Währenddessen wird ein Screenshot von der Form erzeugt und im PDF als Bild abgelegt:
Delphi-Quellcode:
      try
        //.. Code ohne Kontext zum Problem
        Application.ProcessMessages;
        Win := GetForegroundWindow;
        if FullWindow then
        begin
          GetWindowRect(Win, WinRect);
          DC := GetWindowDC(Win);
        end else
        begin
          GetClientRect;
          DC := GetDC(Win);
        end;
        try
          Width := WinRect.Right - WinRect.Left - 14;
          Height := WinRect.Bottom - WinRect.Top - 8;
          Bmp := TBitmap.Create;
          try
            Bmp.Height := Height;
            Bmp.Width := Width;
            BitBlt(Bmp.Canvas.Handle, -8, -90, Width, Height, DC, 0, 0, SRCCOPY);
            PDF.VCLCanvas.Draw(120,75,bmp);
          finally
            Bmp.Free;
          end;
        finally
          ReleaseDC(Win, DC);
        end;
      finally
      //.. Code ohne Kontext zum Problem
      end;
Das Problem dabei: Die Auflösung des Bildes ist relativ unschön, kann man dies irgendwie positiv beeinflussen?
  Mit Zitat antworten Zitat