Autor Beitrag
w-stefan
Hält's aus hier
Beiträge: 3

WIN XP
Delphi 6 Prof.
BeitragVerfasst: Do 07.12.06 17:02 
Servus.

Ich möchte in einer Datei nicht nur String-Werte abspeichern, sondern auch Bilder. Ich weiss zwar wie ich eine Datei mit String-Werten hinbekomme, allerdings habe ich keine Ahnung, wie ich Bitmaps in einer Datei ablege.

Weiss jemand wie das geht?

w-stefan
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Do 07.12.06 17:04 
Willst du mehrere Bitmaps in einer Datei haben? Wenn nein, dann kannst du zB. mit Image1.Picture.Bitmap.SaveToFile('Filename.bmp');

Vielleicht hilft dir das...
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 07.12.06 17:06 
Da solltest du dich mal mit Streams beschäftigen, und dir ein eigenes Dateiformat überlegen. Z.B. so etwas:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
1 Byte: ID der Information, z.B. 1 für Strings, 2 für Bilder etc.
4 Byte: Größe der Information in Bytes
x Byte: Information selbst
1 Byte: ID der nächtsen Information 
4 Byte: Größe der Information in Bytes
x Byte: Information selbst
...


Das kann man dann speichern, und mit Hilfe der zusätzlich in der Datei gespeicherten Informationen auch wieder auslesen.

_________________
We are, we were and will not be.
w-stefan Threadstarter
Hält's aus hier
Beiträge: 3

WIN XP
Delphi 6 Prof.
BeitragVerfasst: Do 07.12.06 17:12 
Also erstmal Danke an euch.

Jacob: Ich möchte schon mehrere Bitmaps in einer Datei haben.

Gausi: Werde mich mal intensiver mit Streams beschäftigen.