Autor Beitrag
Aretures
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20

XP
Delphi 7 Arch. | Delphi 2005 Arch.| Delphi 3 Prof.
BeitragVerfasst: So 08.05.05 16:52 
Hi ^^

Also ich habe ein Programm, wo ich einfach ein Bild lade ..dieses Bild soll aber dann wenn ichs geladen hab in einen bestimmten Ordner gespeichert werden ...nur wie ..
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Var Bit:TBitmap;
begin

Bit := Image1.Picture.Bitmap;
Bit.SaveToFile(....);

end;


So jetzt das Problem ..bei Savetofile muss man ja den Filename angeben ..aber diesmal wirklich den Namen und nicht den Zielort ..wie mach ich das?

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: So 08.05.05 17:19 
Du sprichst in Rätseln. Versuche doch, deine Frage und die Beschreibung präzise zu formulieren. Danke.
Erstmal: Wozu kopierst Du die TBitmap in Bit rein?
Versuchs doch einfach mit
ausblenden Delphi-Quelltext
1:
Image1.Picture.Bitmap.SaveToFile('c:\foo.bmp');					
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 08.05.05 17:24 
Bei savetofile kannst du alles so machen wie in Loadtofile:

ausblenden Delphi-Quelltext
1:
2:
3:
('.\Bilder\Bild.bmp')
oder
('C:\Programme\Bild.bmp');
Aretures Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20

XP
Delphi 7 Arch. | Delphi 2005 Arch.| Delphi 3 Prof.
BeitragVerfasst: So 08.05.05 18:36 
Aha nach dem letzten \ kommt der Name ...ok ^^.Da stellt sich noch ne Frage..wenn man jetzt ne Musik Player Programmiert..wie bekommt man den Namen des Liedes ...und nicht den Pfad zu ihm ?
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 08.05.05 19:00 
Erstell dazu einen neues Thema, da es nichts mehr mit dem eigentlichem Thema zu tun hat!!!!!!!!!!
Benutze aber davor die Forensuche!

Gruß
Heiko
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Mo 09.05.05 16:50 
ausblenden Delphi-Quelltext
1:
extractfilename(Pfad);					
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mo 09.05.05 17:02 
Und mit ExtractFileExt die Endung. Wenn du ExtractFileExt und ExtractFileName hast kannst du daraus den Namen der Datei ohne Endung ermitteln.