Autor Beitrag
neo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Fr 12.12.03 16:18 
Hallo!
Wie kann ich einen Screenshot direkt als JPG abspeichern. (Ohne Umwandlung von BMP nach JPG)

um die Hälfte verkleinern wäre auch nicht schlecht
Gandalfus
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 129



BeitragVerfasst: Fr 12.12.03 17:09 
neo hat folgendes geschrieben:

um die Hälfte verkleinern wäre auch nicht schlecht

Strechdraw

_________________
Wennn man feststellt, dass es drei Moeglichkeiten gibt, die einen Vorgang schiefgehen lassen koennen und man diese ausschaltet, entstehen automatisch drei neue Moeglichkeiten.
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Fr 12.12.03 17:15 
Gandalfus hat folgendes geschrieben:
Besucht doch mal meine HP. Den Link findest du meiner Sig(in anderen Delphi Foren).
Soll das ´ne Anspielung sein, dass im DF keine Werbelinks in der Signatur erlaubt sind?
Einfach in deinem Profil die Adresse der HP angeben, dann erscheint unter deinen Beiträgen so ein toller Button: "www". Probier´s mal!

@neo: Warum willst du nicht umwandeln?´

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Fr 12.12.03 17:48 
Titel: RE:
Weil es vermutlich schneller ist wenn ich direkt als JPG abspeichere
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Fr 12.12.03 17:52 
geht aber IMO nicht, da du wenn du den Screenshot machst ja erst alle Pixelwerte zurückbekommst...
in JP(E)G liegen dann ja die Werte mit (Verlust)Komprimierung bearbeitet in einer DAtei...
doch diese Komprimierung muss ja irgendwann durchgeführt werden, was beim umwandeln passiert...

->IMo ist es nciht direkt möglich darin zu speichern ...
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Fr 12.12.03 18:07 
Titel: RE:
Ok. weist du noch eine möglichkeit für meine andere Frage?

www.delphi-forum.de/viewtopic.php?t=19628
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 13.12.03 01:10 
Titel: RE: Ist doch möglich
Habe nochmal intensive gesucht, hier die Lösung:

Zitat:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
procedure ScreenToFile(aFileName: string); 
var 
  Bitmap: TBitmap; 
  JPG : TJPEGImage; 
  Canvas: TCanvas; 
begin 
  Canvas := TCanvas.Create; 
  try 
    Canvas.Handle := GetWindowDC(0); 
    try 
      Bitmap := TBitmap.Create; 
      JPG := TJPEGImage.Create; 
      try 
        Bitmap.Width := Screen.DesktopWidth; 
        Bitmap.Height:= Screen.DesktopHeight; 
        Bitmap.PixelFormat := pfDevice; 

        BitBlt(Bitmap.Canvas.Handle, 0, 0, Pred(Screen.DesktopWidth), Pred( 
            Screen.DesktopHeight), Canvas.Handle, Screen.DesktopLeft, 
            Screen.DesktopTop, Bitmap.Canvas.CopyMode); 

        JPG.Assign(Bitmap); 
        JPG.SaveToFile(aFileName); 
      finally 
        Bitmap.Free; 
        JPG.Free; 
      end; 
    finally 
      ReleaseDC(0, Canvas.Handle); 
    end; 
  finally 
    Canvas.Free; 
  end; 
end;


Moderiert von user profile iconPeter Lustig: Delphi-Tags hinzugefügt