Autor Beitrag
smepal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

Win XP, Linux Mandbrake,SUSE 10.1, SUSE 9 PE, DEBIAN, Win 2000 Pro, Win XP Pro
Delphi
BeitragVerfasst: Mi 27.06.07 18:39 
ausblenden 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:
procedure TForm1.WMDROPFILES (var Msg: TMessage);
var i, anzahl, size: integer;
endung: String;
  Dateiname: PChar;
  jpg: TJpegimage;
begin
jpg := TJpegimage.Create;
  inherited;
  anzahl := DragQueryFile(Msg.WParam, $FFFFFFFF, Dateiname, 255);
  for i := 0 to (anzahl - 1) do
  begin
    size := DragQueryFile(Msg.WParam, i , nil, 0) + 1;
    Dateiname:= StrAlloc(size);
    DragQueryFile(Msg.WParam,i , Dateiname, size);
    if ((pos('.JPG',StrPas(Dateiname))<>0) or (pos('.JPEG',StrPas(Dateiname))<>0)) then
          begin
          jpg.LoadFromFile(dateiname);
jpg.compress;
          jpg.SaveToFile( inttostr(i)+'.JPEG');

          end
    else showmessage('Dateityp nicht erlaubt!');

    StrDispose(Dateiname);
  end;
  DragFinish(Msg.WParam);
  ftp.RetrieveCurrentDir;
openchangeddir;      jpg.Free;
end;



Dies liefert bei mir nur 0 byte große JPEG dateien!
Ohne jpg.compress; hat es funktioniert.

Und vorher auch mit! Jetzt aber nicht mehr ! Ka warum!