Autor Beitrag
cux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Fr 17.12.04 15:42 
JPEGImage1.CompressionQuality:= 80;
JPEGImage1.Compress;

Nachden das passiert ist das bild in JPEGImage1 einfach so weg!
was kann ich machen, damit das nicht weg ist?

cux
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Fr 17.12.04 15:47 
Das dürfte eigebtlich nicht weg sein. Gib mal etwas von de Code vor diesem.

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
cux Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: So 26.12.04 15:35 
var
jpg: Array[1..1000] of TJPEGImage;
bmp: Array[1..1000] of TBitmap;

...


procedure TForm1.SPEICHERN_JPG;
var pfad: String;
z: Integer;
n: TJPEGQualityRange;
begin
for z:= 1 to n_bilder do begin
pfad:=fordner.text + daten[z].neu; //fordner.text ist der pfad des ordners und daten[z].neu ist der name der neuen datei
n:= StrToInt(FKompress.Text); //FKompress ist ein Edit-Feld
if typ = 1 then begin //wenn typ 1 ist, besteht noch eine bmp-datei. Sie wird zu einer jpg-Datei umgewandelt
jpg[z]:= TJPEGImage.Create;
jpg[z].Assign(bmp[z]);
end;
jpg[z].CompressionQuality:= n;
jpg[z].Compress;
jpg[z].SaveToFile(pfad);
end;
end;