Autor Beitrag
FatalError
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WIN ME
D6 Pers
BeitragVerfasst: Mo 29.12.03 20:17 
Hi,

wie kann ich eine gespeicherte bmp-Grafik in eine Variable des Typs bmp laden? "loadfromfile" scheint da nicht zu gehen!?

Grüße
Andy :D
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Mo 29.12.03 20:23 
Hallo

in eine TBitmap? warum sollte dort denn loadfromfile nicht gehen?

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Mo 29.12.03 23:14 
Hallo,

warscheinlicht hast du vergessen, das Bitmap zu initialisieren:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var
  B: TBitmap;
begin
  B := TBitmap.Create;
  B.LoadFromFile('Test.bmp');

Und beim Programmende freigeben nicht vergessen!!!
ausblenden Delphi-Quelltext
1:
B.Free;					

War das dein Problem?

_________________
Life is a bad adventure, but the graphic is really good!
FatalError Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WIN ME
D6 Pers
BeitragVerfasst: Di 30.12.03 01:06 
Hi,

ne mein Problem war meine Faulheit :oops: vorher immer mit Images gearbeitet, hab ich geschriebn
Zitat:

Bitmap.picture.loadfromfile ('PK2.bmp');


Konnte ja nicht funktionieren.. :x
Initialisiert hab ich, aber nicht freigegeben :roll: was bewirkt das freigeben eigentlich?

Grüße
Andy :lol:
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: Di 30.12.03 01:10 
Zitat:
Initialisiert hab ich, aber nicht freigegeben was bewirkt das freigeben eigentlich?


Es bewirkt das der Hauptspeicher den das Objekt belegt hat wieder an das System zurückgegeben wird, ansonsten ist er verloren. (Das Objekt das ihn belegt hat is zwar weg, aber er kann trotzdem nicht mehr verwendet werden... bis Programmende, da dort alles freigegeben wird was da ist)....
DAs ist jetzt aber nur das gröbste an Info....

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.