Minor omission from GFL SDKs v3.40 LibGfl.pas (Delphi)

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

varver
Posts: 1
Joined: Thu Mar 24, 2011 12:01 am

Minor omission from GFL SDKs v3.40 LibGfl.pas (Delphi)

Postby varver » Thu Mar 24, 2011 12:17 am

Hello,

there are some things missing from file GflSDK\Delphi\Include\LibGfl.pas of the GFL SDKs v3.40.

Line 590 is missing the colon (:) marked below, between load_infos and GFL_UINT32
var info: TGFL_FILE_INFORMATION; load_infos: GFL_UINT32): GFL_ERROR; stdcall;

Also, line 1303 (or thereabouts) is missing the following function implementation:
function gflGetFileInformationEx; external GflDLL;

Best Regards,
varver

User avatar
xnview
Author of XnView
Posts: 28039
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Minor omission from GFL SDKs v3.40 LibGfl.pas (Delphi)

Postby xnview » Thu Mar 24, 2011 8:37 pm

Thanks
Pierre.

User avatar
creeek
Posts: 5
Joined: Sat May 10, 2008 5:34 pm

Re: Minor omission from GFL SDKs v3.40 LibGfl.pas (Delphi)

Postby creeek » Tue Aug 09, 2011 1:16 pm

Brilliant , just what i wanted!!!

I Couldnt get this to run at all, due to 2 problems:
1: this one, where colon missing, etc. (thanks)

2: I got a missing libgfl340.dll error, THEN I changed the LibGfl.pas file (line 113) to include the path, e.g. for example

GflDLL = 'D:\Delphi7\GflSDK\Delphi\Demo\Source\libgfl340.dll'; // DLL filename (changed from GflDLL = 'libgfl340.dll' )

There is probably a more elegant way to do this, but it works and compiles, then it even runs!!! amazing, the time I tried to get this working :)

Now the Demo works, I can now experiment with it. (at last!!)
Growing old is mandatory,
Growing up is OPTIONAL!

andrefelix
Posts: 1
Joined: Wed Nov 02, 2011 4:12 am

Re: Minor omission from GFL SDKs v3.40 LibGfl.pas (Delphi)

Postby andrefelix » Wed Nov 02, 2011 4:33 am

Hi,
I would like to know if someone have it working with Delphi XE.
Today I found this library and couldn't use it yet. I made the fix suggested earlier to compile the unit LibGfl.pas but I still cannot run the demo application.
For example when I run the application I get Runtime error. Using the debugger I could see that there is probably an UNICODE issue.
Is there a Unicode DLL? I'm using Windows 7 32bit and tried adding at the demo directory the DLL's located at Lib and LibW directory from SDK, but same problem.
Then I made changes at the whole LibGfl.pas changing from Char to AnsiChar and PChar to AnsiPChar and at least the function GetFilterString loaded executed correctly, but then when I tried to open a simple JPG file the program showed an error dialog "File not readable: Error to open file".
I tried as well using the Define UNICODE_SUPPORT and removing it, but same issue.
Thx

Mobzga
Posts: 1
Joined: Wed Jul 18, 2012 1:16 am

Re: Minor omission from GFL SDKs v3.40 LibGfl.pas (Delphi)

Postby Mobzga » Wed Jul 18, 2012 1:48 am

Hi,

I also have the same problem, but found the solution, you need to call unicode (WideChar instead of PChar) functions too.
In the delphi demo file "ImageView_Form.pas" you have this code near line 140:

Code: Select all

e := gflLoadBitmap(PChar(filename), gfl_bmp, lp, finfo);

change to this

Code: Select all

e := gflLoadBitmapW(PWideChar(filename), gfl_bmp, lp, finfo);


In LibGfl.pas you can find the rest of xxxxW functions you need, just search {$IFDEF UNICODE_SUPPORT} in the file to check them.
You also need the Unicode libs, you can find in \GflSDK\libW

Short instructions from scratch (v3.40):
1.- LibGfl.pas , Line 590 is missing the colon (:) marked below, between load_infos and GFL_UINT32

Code: Select all

var info: TGFL_FILE_INFORMATION; load_infos: GFL_UINT32): GFL_ERROR; stdcall;


2.- LibGfl.pas Also, line 1303 (or thereabouts) is missing the following function implementation:

Code: Select all

function gflGetFileInformationEx; external GflDLL;

3.- LibGfl.pas add new type workaround: (Line:120)

Code: Select all

type
//GPo 2008; Workaround Delphi 2009
  Char = AnsiChar;
  PChar= PAnsiChar;

4.- Libgfl.pas Enable/Uncomment

Code: Select all

 {$DEFINE UNICODE_SUPPORT} (Line: 109)]

5.- Use \GflSDK\libW dll's (libgfl340.dll and libgfle340.dll)
6.- Change gflLoadBitmap(PChar(filename) to gflLoadBitmapW(PWideChar(filename) in the "ImageView_Form.pas" demo file near Line:140.

Code: Select all

e := gflLoadBitmapW(PWideChar(filename), gfl_bmp, lp, finfo);


Now you have a working gfl sdk v3.4 on delphi 2009+


Return to “GFL SDK”

Who is online

Users browsing this forum: No registered users and 1 guest