Recent

Author Topic: [SOLVED] BGRABitmap bug  (Read 1923 times)

las

  • New Member
  • *
  • Posts: 26
[SOLVED] BGRABitmap bug
« on: February 08, 2013, 12:13:53 pm »
I'm use BGRAControls with PNG graphics.When i'm using QT, all Ok, but in GTK2 picture don't right.
The program is very simple.

I'm tryed compile and run on Lazarus 1.02 and 1.06, BGRAControls 2.05, 2.06, BGRABitmap 6.1, 6.4, in OpenSuse 11.2, OpenSuse 10.1.

procedure TForm1.FormCreate(Sender: TObject);
var
  pic:TBGRABitmap;
begin
  pic:=TBGRABitmap.Create('test.png');
  BGRAImageButton1.bitmap.LoadFromBitmapHandles(pic.Bitmap.Handle,0);
  BGRASpriteAnimation1.sprite.LoadFromBitmapHandles(pic.Bitmap.Handle,0);
  pic.free;
end;

« Last Edit: February 09, 2013, 08:01:15 pm by las »

las

  • New Member
  • *
  • Posts: 26
[SOLVED] BGRAControls bug
« Reply #1 on: February 09, 2013, 07:58:16 pm »
Hello all!

I'm found this error in BGRAbitmap in module BGRADefaultBitmap.

In function TBGRADefaultBitmap.LoadFromRawImage don't initialized variable "mustReverse32" when "mustSwapRedBlue=true"

For correct this error I'm simple added "mustReverse32:=false;" in the first row of this function.
« Last Edit: February 09, 2013, 08:01:32 pm by las »

circular

  • Hero Member
  • *****
  • Posts: 3446
    • Personal webpage
Re: [SOLVED] BGRABitmap bug
« Reply #2 on: February 09, 2013, 08:39:58 pm »
Ok, i've updated on subversion. I've put the affectation inside the first part of the if.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018