Page 1 of 1
gflGetColorAt
Posted: Thu Jul 19, 2007 8:18 pm
by madiazg
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?
Re: gflGetColorAt
Posted: Fri Jul 20, 2007 6:58 am
by xnview
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?
Do you use the last build?
Posted: Fri Jul 20, 2007 8:16 am
by madiazg
I am using the last version (GFL SDK v2.70) and Delphi 7.0.
The image is RGB/8bits.
Posted: Fri Jul 20, 2007 2:06 pm
by xnview
madiazg wrote:I am using the last version (GFL SDK v2.70) and Delphi 7.0.
The image is RGB/8bits.
I have not this problem, even with x,y=0? With all pictures?
Posted: Sat Jul 21, 2007 11:48 am
by madiazg
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:
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;
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)
Posted: Mon Jul 23, 2007 12:10 pm
by xnview
madiazg wrote: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;
No you must use a var GFL_COLOR not PGFL_COLOR!
Posted: Sun Aug 05, 2007 3:43 pm
by madiazg
Hello.
with "pixel_color: GFL_COLOR;" produces the mistake of "Undeclared identifier GFL_COLOR"
Posted: Mon Aug 06, 2007 7:03 am
by xnview
madiazg wrote:Hello.
with "pixel_color: GFL_COLOR;" produces the mistake of "Undeclared identifier GFL_COLOR"
TGFL_COLOR