Hello, on having used
var
gfl_bmp: PGFL_BITMAP;
pixel_color: PGFL_COLOR;
......
gflGetColorAt(gfl_bmp,10,10,pixel_color);
produces the following mistake:
Access violation at address....
Why does this happen?
gflGetColorAt
Moderators: XnTriq, helmut, xnview
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: gflGetColorAt
Do you use the last build?madiazg wrote:Hello, on having used
var
gfl_bmp: PGFL_BITMAP;
pixel_color: PGFL_COLOR;
......
gflGetColorAt(gfl_bmp,10,10,pixel_color);
produces the following mistake:
Access violation at address....
Why does this happen?
Pierre.
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Yes, with all the images and any position x, y
I have copied in system32 libgfl270.dll and libgfle270.dll (Windows XP)
I am modifying the program of example GFL_SDK_Demo.dpr and alone I add in var:
pixel_color: PGFL_COLOR;
and I add:
Also I have tried in TurboDelphi.
I have used others (gflResize, gflGetNumberOfColorsUsed...) with good results.
I have the same problem with gflSetColorAt (gfl_bmp, 10,10, pixel_color)
I have copied in system32 libgfl270.dll and libgfle270.dll (Windows XP)
I am modifying the program of example GFL_SDK_Demo.dpr and alone I add in var:
pixel_color: PGFL_COLOR;
and I add:
Code: Select all
if not (bpp in [1, 4, 8, 24, 32]) then begin
MessageDlg('Only 1, 4, 8, 24 or 32 BitsPerPixel are supported in this demo !', mtError, [mbOK], 0);
gflFreeBitmap(gfl_bmp);
exit;
end;
{Pixel Color}
gflGetColorAt(gfl_bmp,10,10,pixel_color);
// Create Delphi Bitmap. If paletted, minimize memory by setting size after pixel format
bmp := TBitmap.Create;
bmp.PixelFormat := IntToPixelFormat(bpp);
bmp.Width := gfl_bmp.Width;
bmp.Height := gfl_bmp.Height;
NewPalette := 0;
I have used others (gflResize, gflGetNumberOfColorsUsed...) with good results.
I have the same problem with gflSetColorAt (gfl_bmp, 10,10, pixel_color)
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France