From 0078222a95b7833c591ac58419eb380b66f9f14e Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 21 Feb 2012 12:15:51 +0200 Subject: Use unicode enabled types for the BMP loading code. --- src/corelib/fpg_imgfmt_bmp.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/corelib') 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); -- cgit v1.2.3-70-g09d2