Changeset 110


Ignore:
Timestamp:
Jan 30, 2018, 5:02:20 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Load also image without file extension specified by default as .png files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ScreenTools.pas

    r88 r110  
    5959procedure EditFrame(ca: TCanvas; p: TRect; const T: TTexture);
    6060function HexStringToColor(s: string): integer;
    61 function LoadGraphicFile(bmp: TBitmap; const Path: string;
     61function LoadGraphicFile(bmp: TBitmap; Path: string;
    6262  Options: integer = 0): boolean;
    6363function LoadGraphicSet(const Name: string): integer;
     
    451451end;
    452452
    453 function LoadGraphicFile(bmp: TBitmap; const Path: string; Options: integer): boolean;
     453function LoadGraphicFile(bmp: TBitmap; Path: string; Options: integer): boolean;
    454454var
    455455  jtex: tjpegimage;
     
    457457begin
    458458  Result := True;
     459  if ExtractFileExt(Path) = '' then Path := Path + '.png';
    459460  if ExtractFileExt(Path) = '.jpg' then begin
    460461    jtex := tjpegimage.create;
Note: See TracChangeset for help on using the changeset viewer.