Results 1 to 3 of 3

Thread: TDXImageList *.jpg Support?

  1. #1

    TDXImageList *.jpg Support?

    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 :

    [pascal]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;[/pascal]

    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

    [pascal]GameTiles.Items[ItemCounter].Picture.Graphic.LoadFromFile();[/pascal]

    However, this also does not work and gives me an Access Violation error. Any ideas?

  2. #2

    TDXImageList *.jpg Support?

    Make sure you have added 'JPEG' to your uses clause...
    [size=10px][ Join us in #pgd on irc.freenode.net ] [ Sign the Petition for a Software Patent Free Europe ][/size]

  3. #3

    TDXImageList *.jpg Support?

    JPEG into my uses clause? Havent heard of that one before... but Great! Thankyou... I will try it tonight when I get back.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •