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.
BUG in gflBitblt /gflBitbltEx
Moderators: XnTriq, helmut, xnview
I forgot theses informations
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;
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;
-
- Author of XnView
- Posts: 44920
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: BUG in gflBitblt /gflBitbltEx
What do you have as destination?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.
Pierre.