Problem with gflSetColorAt - always GFL_Error=50
Posted: Thu Aug 06, 2009 10:12 am
Hi
I have next problem with new version of the library. Look into the code below (it's simplistic version of my code, but error occur):
Every iteration E is equal 50 (GFL_ERROR_BAD_PARAMETERS). Why? The code is correct, gflGetColorAt works correctly, image is correct (program show it but without changes). Maybe the parameters in libgfl.pas are wrongs, but how they should be?
I have next problem with new version of the library. Look into the code below (it's simplistic version of my code, but error occur):
Code: Select all
for x:=10 to gfl_bmp.Width-10 do
begin
for y:=10 to gfl_bmp.Height-10 do
begin
gflGetColorAt(gfl_bmp, x, y, colorSrc);
colorSrc.Blue := colorSrc.Blue div 2;
colorSrc.Green := colorSrc.Green div 2;
colorSrc.Red := colorSrc.Red div 2;
E := gflSetColorAt(gfl_bmp, x, y, colorSrc); // HERE IS THE POBLEM
end;
end;