Discussions on GFL SDK, the graphic library for reading and writing graphic files
Moderators: XnTriq, helmut, xnview
-
reggi
- Posts: 16
- Joined: Thu Sep 16, 2004 1:32 pm
Post
by reggi »
Hi!
I have always AccessDenied in procedure:
Code: Select all
procedure BlurFragment(X, Y, W, H, blur: integer; templImage: PGFL_BITMAP; bgColorGFL: TGFL_COLOR);
var
cropRect: TGFL_RECT;
fragment: PGFL_BITMAP;
begin
rC1 := repeatCount;
try
cropRect1.x:=X;
cropRect1.y:=Y;
cropRect1.w:=W;
cropRect1.h:=H;
fragment := gflAllockBitmap(gfl_bmp.BType,
W-X,
H-Y,
gfl_bmp.LinePadding,
@bgColorGFL);
gflBitblt(templImage, @cropRect, @fragment, 0, 0);
gflGaussianBlur(fragment, nil, blurSize);
cropRect.x:=0;
cropRect.y:=0;
cropRect.w:=fragment.Width;
cropRect.h:=fragment.Height;
gflBitblt(fragment, @cropRect, @templImage, X, Y); // HERE IS ACCESS DENIED...
finally
FreeAndNil(cropRect);
gflFreeBitmap(fragment);
end;
end;
I've no idea what's wrong :/ In my opinion the code is correct but... why there is AV? :/
-
dominique
- Posts: 72
- Joined: Thu Nov 08, 2007 9:22 am
Post
by dominique »
Hello,
Here is something wrong, isn't it?
Code: Select all
fragment := gflAllockBitmap(gfl_bmp.BType,
W-X,
H-Y,
gfl_bmp.LinePadding,
@bgColorGFL);
Should be
Code: Select all
fragment := gflAllockBitmap(gfl_bmp.BType,
W,
H,
gfl_bmp.LinePadding,
@bgColorGFL);
to match with the cropRect ?
Dom
-
reggi
- Posts: 16
- Joined: Thu Sep 16, 2004 1:32 pm
Post
by reggi »
I KNOW!!
The problem is in the libgfl.pas file.
There is:
function gflBitblt(src: PGFL_BITMAP; rect: PGFL_RECT;
dst: PPGFL_BITMAP; x_dest, y_dest: GFL_INT32): GFL_ERROR; stdcall;
Should be:
function gflBitblt(src: PGFL_BITMAP; rect: PGFL_RECT;
dst: PGFL_BITMAP; x_dest, y_dest: GFL_INT32): GFL_ERROR; stdcall;
-
xnview
- Author of XnView
- Posts: 44355
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Post
by xnview »
Ok, i'll change it
Pierre.
-
reggi
- Posts: 16
- Joined: Thu Sep 16, 2004 1:32 pm
Post
by reggi »
Will You change in libgfl.pas or in dll?
I think I can verify entire libgfl.pas because there are more errors, and then i'll send you it.
-
xnview
- Author of XnView
- Posts: 44355
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Post
by xnview »
reggi wrote:Will You change in libgfl.pas or in dll?
I think I can verify entire libgfl.pas because there are more errors, and then i'll send you it.
I'll change the .pas, the dll is correct with the C header
Pierre.
-
reggi
- Posts: 16
- Joined: Thu Sep 16, 2004 1:32 pm
Post
by reggi »
OK.
Correct too error in line 265. There is:
Should be with semicolon:
Code: Select all
ExtrasInfo: Pointer;
Name: PChar;
-
madiazg
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Post
by madiazg »
Hello,
The errors I found in "libgfl.pas" are:
Code: Select all
//function gflSetColorAt(var dst: PGFL_BITMAP; x, y: GFL_INT32; var color: TGFL_COLOR): GFL_ERROR; stdcall; [ERROR]
function gflGetColorAt(const src: PGFL_BITMAP; x, y: GFL_INT32; var color: TGFL_COLOR): GFL_ERROR; stdcall;
Code: Select all
//ExtrasInfo: Pointer [ERROR]
ExtrasInfo: Pointer;
Code: Select all
//GFL_EXIF_MAIN_IFD = $0001; [ERROR]
//GFL_EXIF_IFD_0 = $0002; [ERROR]
GFL_EXIF_MAIN_IFD = $0002;
GFL_EXIF_IFD_0 = $0001;
and include:
Code: Select all
procedure gflBitmapSetEXIFValueRationalArray2(exif: PGFL_EXIF_DATAEX; ifd, tag: GFL_UINT16; const pq: PGFL_UINT32; count: GFL_INT32); stdcall;
The latter gives me an error in the EXIF data from Nikon cameras:
http://newsgroup.xnview.com/viewtopic.php?f=4&t=17966
Miguel Angel