diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-02-21 12:15:51 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-02-21 12:15:51 +0200 |
commit | 0078222a95b7833c591ac58419eb380b66f9f14e (patch) | |
tree | e3a18f62a66dac4df73326114b1e74be79e888ae | |
parent | 9bc64103edc0cb484fe346497e8a0bf8975c0037 (diff) | |
download | fpGUI-0078222a95b7833c591ac58419eb380b66f9f14e.tar.xz |
Use unicode enabled types for the BMP loading code.
-rw-r--r-- | src/corelib/fpg_imgfmt_bmp.pas | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/corelib/fpg_imgfmt_bmp.pas b/src/corelib/fpg_imgfmt_bmp.pas index 1ea61551..f678b79b 100644 --- a/src/corelib/fpg_imgfmt_bmp.pas +++ b/src/corelib/fpg_imgfmt_bmp.pas @@ -25,15 +25,19 @@ interface uses Classes, SysUtils, + fpg_base, fpg_main; procedure ReadImage_BMP(img: TfpgImage; bmp: Pointer; bmpsize: longword); -function LoadImage_BMP(const AFileName: String): TfpgImage; +function LoadImage_BMP(const AFileName: TfpgString): TfpgImage; function CreateImage_BMP(bmp: Pointer; bmpsize: longword): TfpgImage; implementation +uses + fpg_utils; + function CreateImage_BMP(bmp: Pointer; bmpsize: longword): TfpgImage; begin @@ -41,14 +45,14 @@ begin ReadImage_BMP(Result, bmp, bmpsize); end; -function LoadImage_BMP(const AFileName: String): TfpgImage; +function LoadImage_BMP(const AFileName: TfpgString): TfpgImage; var AFile: file of char; AImageData: Pointer; AImageDataSize: integer; begin Result := nil; - if not FileExists(AFileName) then + if not fpgFileExists(AFileName) then Exit; //==> AssignFile(AFile, AFileName); |