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;