Discussions on GFL SDK, the graphic library for reading and writing graphic files
Moderators: XnTriq , helmut , xnview
madiazg
Posts: 82 Joined: Wed Jul 18, 2007 8:00 pm
Location: Tenerife - Islas Canarias
Post
by madiazg » Sat Aug 27, 2011 9:39 pm
Hi,
I have problems with the function gflConvolve. In Delphi:
Code: Select all
var
Filtro : PGFL_Filter;
....
begin
....
Filtro.Size := 3; //-> ERROR
...
end;
Error in the application when I define the width of the matrix.
What is the problem?
Regards...
Miguel Angel
xnview
Author of XnView
Posts: 44936 Joined: Mon Oct 13, 2003 7:31 am
Location: France
Post
by xnview » Mon Aug 29, 2011 8:43 am
What is the error?
Pierre.
madiazg
Posts: 82 Joined: Wed Jul 18, 2007 8:00 pm
Location: Tenerife - Islas Canarias
Post
by madiazg » Wed Aug 31, 2011 8:33 pm
xnview wrote: What is the error?
The error occurs when running the application:
"
Access violation at address FEFCC481. Read of address FEFCC481 "
Miguel Angel
xnview
Author of XnView
Posts: 44936 Joined: Mon Oct 13, 2003 7:31 am
Location: France
Post
by xnview » Thu Sep 01, 2011 11:54 am
It's not TGFL_FILTER that you must use??
Pierre.
madiazg
Posts: 82 Joined: Wed Jul 18, 2007 8:00 pm
Location: Tenerife - Islas Canarias
Post
by madiazg » Sat Sep 03, 2011 11:07 pm
xnview wrote: It's not TGFL_FILTER that you must use??
I'm sorry but i don't understand you
Miguel Angel
xnview
Author of XnView
Posts: 44936 Joined: Mon Oct 13, 2003 7:31 am
Location: France
Post
by xnview » Mon Sep 05, 2011 7:54 am
TGFL_FILTER is a pointer, no? Not the struct?
Pierre.
madiazg
Posts: 82 Joined: Wed Jul 18, 2007 8:00 pm
Location: Tenerife - Islas Canarias
Post
by madiazg » Mon Sep 05, 2011 7:38 pm
xnview wrote: TGFL_FILTER is a pointer, no? Not the struct?
yes, PGFL_FILTER is a pointer to the structure TGFL_FILTER. In libgfl.pas:
Code: Select all
PGFL_FILTER = ^TGFL_FILTER;
TGFL_FILTER = record
Size: GFL_INT16;
Matrix: array[0..15, 0..7] of GFL_INT16;
Divisor: GFL_INT16;
Bias: GFL_INT16;
end;
function gflConvolve(src: PGFL_BITMAP; dst: PPGFL_BITMAP; var filter: PGFL_FILTER): GFL_ERROR; stdcall;
Regards...
Miguel Angel
xnview
Author of XnView
Posts: 44936 Joined: Mon Oct 13, 2003 7:31 am
Location: France
Post
by xnview » Tue Sep 06, 2011 8:04 am
Ok, but i don't understand why with
you have a crash...
Pierre.
Mike
Posts: 3 Joined: Mon Dec 26, 2011 6:03 am
Post
by Mike » Mon Dec 26, 2011 8:44 am
Hi,
Filtro is pointer. It must be defined. I.e. must point to a chunk of memory where located structure GFL_FILTER. Please use getmem() or similar function. After that, it can be used in parts of your sample. Or use T GFL_FILTER