summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-02-21 12:15:51 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-02-21 12:15:51 +0200
commit0078222a95b7833c591ac58419eb380b66f9f14e (patch)
treee3a18f62a66dac4df73326114b1e74be79e888ae /src
parent9bc64103edc0cb484fe346497e8a0bf8975c0037 (diff)
downloadfpGUI-0078222a95b7833c591ac58419eb380b66f9f14e.tar.xz
Use unicode enabled types for the BMP loading code.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_imgfmt_bmp.pas10
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);