BUG in gflBitblt /gflBitbltEx

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

sssssssss

BUG in gflBitblt /gflBitbltEx

Post by sssssssss »

Hello,

when I try to use "gflBitblt" with a GFL_COLORS bitmap as source, it seems to copy nothing in dest bitmap (that is also a GFL_COLORS bitmap).

ssssssssss.
sssssssss

I forgot theses informations

Post by sssssssss »

my system : win XP sp 2
version : GFL v2.40 (LIBFORMAT v4.47) 30/06/2005
I use Delphi 7.
example of code to reproduce the problem (in delphi):


function Resize_Image_Area(Src:PGFL_BITMAP):PGFL_BITMAP;
var
Dest,Tmp:PGFL_BITMAP;
background:TGFL_COLOR;
Pbackground:PGFL_COLOR;
dest_coords:TGFL_RECT;
begin

if (Src.Width < 256) AND (Src.BType = GFL_COLORS) then
with background do
begin
Red:=0; Green:=0; Blue:=0; alpha:=0;
end;
Pbackground:=@background;

// note for the following code that if you use instead of "Src.BType", a
// GFL_BGR constant for example, it works !

Tmp:=Gflallockbitmap(Src.BType,256,src.Height,src.LinePadding,Pbackground);

if not assigned(Tmp) then
begin
showmessage('BAD Gflallockbitmap');
exit;
end;

With dest_coords do // select the whole old image
begin
X:=0; Y:=0; W:=src.Width; H:=src.Height;
end;

err := gflBitblt(src,@dest_coords,Dest,0,0);

if err <> GFL_NO_ERROR then
begin
showmessage('BAD gflBitblt');
exit;
end;

//... then some code to load the Dest in bitmap.

end;
ssssssssss

Post by ssssssssss »

end;
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG in gflBitblt /gflBitbltEx

Post by xnview »

sssssssss wrote:Hello,

when I try to use "gflBitblt" with a GFL_COLORS bitmap as source, it seems to copy nothing in dest bitmap (that is also a GFL_COLORS bitmap).

ssssssssss.
What do you have as destination?
Pierre.