View Issue Details

IDProjectCategoryView StatusLast Update
0023823LazarusLCLpublic2020-03-31 13:58
ReporterDCelso Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformi386OSlinux 
Product Version1.1 (SVN) 
Summary0023823: Bug painting 32bits tbitmaps on linux lazarus.
DescriptionLazarus fails painting alpha channel on 32bits tbitmaps, it uses only transparent or not transparent pixel skipping trasnlucent pixels.
Only happens on linux, the same example works perfectly on windows.
I done test with different methods to paint 32bits tbitmaps with same results.

In my example I create on memory the image so it is no needed load any bitmap to test and see the bug. But if you open a 32bit bitmap image happens another bugs, seems bad alligmend rgba data so the image is seems randly pixel colors painted.

Steps To ReproduceCreate a new application on linux lazarus.
Insert in the form a timage.
Insert a button.
Code the button to create a tbitmap with pt32bit and assign it to the timage.picture.

Additional InformationAttachs a more complex example doing it and some differents methods.
To text, only you need press the button.
Tagstransparent
Fixed in Revision
LazTarget
WidgetsetGTK 2
Attached Files

Relationships

related to 0025491 resolvedJuha Manninen GTK2 missing transparency (with patch for common cases) 
related to 0024241 new TBitBtn do not display bitmap correctly 

Activities

DCelso

2013-02-04 15:44

reporter  

testRawImage.7z (61,716 bytes)

DCelso

2013-02-04 18:25

reporter   ~0065477

more...
Usign tlazintfimage to create an tbitmap, happens the same. the informatio of translucent pixels are lost.
You can change the buttonclickevent of the example for this other one:

procedure TForm1.BitBtn1Click(Sender: TObject);
var
  bmp: TBitmap;
  lbmp: TLazIntfImage;
  i,j : Integer;
  tmpcolor: TFPColor;
begin
  bmp := createMyBitmap1();
  lbmp:= bmp.CreateIntfImage;
  lbmp.FillPixels(colRed);
  for j:=0 to 24 do
    for i:=0 to 24 do
    lbmp.Colors[i,j]:=colBlue;

  for j:=25 to 49 do
    for i:=0 to 24 do
     lbmp.Colors[i,j]:=colTransparent;

  tmpcolor:=colGreen;
  tmpcolor.alpha:=high(word) div 2;
  for j:=25 to 49 do
    for i:=25 to 49 do
     lbmp.Colors[i,j]:=tmpcolor;


  bmp.LoadFromIntfImage(lbmp);
  FreeAndNil(lbmp);
  image1.Picture.Assign(bmp);
  label1.Caption:=inttostr(PIXELFORMAT_BPP[image1.Picture.Bitmap.PixelFormat]);
  FreeAndNil(bmp);
end;

DCelso

2013-02-14 18:38

reporter   ~0065687

anybody are seeing this issue?

DCelso

2013-02-19 19:22

reporter   ~0065764

no body?

Issue History

Date Modified Username Field Change
2013-02-04 15:44 DCelso New Issue
2013-02-04 15:44 DCelso File Added: testRawImage.7z
2013-02-04 18:25 DCelso Note Added: 0065477
2013-02-14 18:38 DCelso Note Added: 0065687
2013-02-19 19:22 DCelso Note Added: 0065764
2014-01-04 21:28 Juha Manninen Relationship added related to 0025491
2020-03-31 11:04 Juha Manninen Relationship added related to 0024241
2020-03-31 13:58 Juha Manninen Tag Attached: transparent