tronied
18-03-2003, 07:05 PM
Since I am trying to economise on space with my project I have decided to stop using *.bmp files and convert over to *.jpg. However, when I use the following :
for ItemCounter := 0 to ImagePreLoad.Items.Count -1 do
begin
//Load the Images Into the DXImageList Component
GameTiles.Items.Add;
GameTiles.Items[ItemCounter].Picture.LoadFromFile(
ExtractFilePath(Application.ExeName)+'Images\'+
ImagePreLoad.Items[ItemCounter]);
end;
GameTiles = TDXImageList
ImagePreLoad = TFileListBox
Basically, when I create an item (TPictureCollection) manually and load an image into it, the format for *.jpg is there... However, when I try and do the above and load it I get "Unknown Picture File Extension `.jpg`". I have also tried
GameTiles.Items[ItemCounter].Picture.Graphic.LoadFromFile();
However, this also does not work and gives me an Access Violation error. Any ideas?
for ItemCounter := 0 to ImagePreLoad.Items.Count -1 do
begin
//Load the Images Into the DXImageList Component
GameTiles.Items.Add;
GameTiles.Items[ItemCounter].Picture.LoadFromFile(
ExtractFilePath(Application.ExeName)+'Images\'+
ImagePreLoad.Items[ItemCounter]);
end;
GameTiles = TDXImageList
ImagePreLoad = TFileListBox
Basically, when I create an item (TPictureCollection) manually and load an image into it, the format for *.jpg is there... However, when I try and do the above and load it I get "Unknown Picture File Extension `.jpg`". I have also tried
GameTiles.Items[ItemCounter].Picture.Graphic.LoadFromFile();
However, this also does not work and gives me an Access Violation error. Any ideas?