png alpha-transparency in linux lazarus / 39-Graphics ---------------------------------------------------------------------- cd · 2010-04-04 17:29 compare the two following wheres alpha in linux? ---------------------------------------------------------------------- Troodon · 2010-04-04 20:02 That is antialiasing. ---------------------------------------------------------------------- cd · 2010-04-04 22:13 No, that has nothing to do with antialiasing. That is ignoring semi-transparent alpha-channel. pixels with alpha>0.5 are shown as fully opaque, alpha<0.5 is treated as fully transparent. The same thing concerns 32bit icons, which are displayed well in windows, but have same coarse edge in lunix. ---------------------------------------------------------------------- Marc · 2010-04-05 22:04 Currently the routines we use for graphics drawing support 1-bit alpha only. Change is planned, but don't count on it soon. ---------------------------------------------------------------------- cd · 2010-04-06 09:34 is the code that is used in windows os-dependent? ---------------------------------------------------------------------- Marc · 2010-04-06 10:12 Yes, in windows, winapi functions are used ---------------------------------------------------------------------- circular · 2010-04-11 17:53 Ok, i added it. Try this with BGRABitmap : Code: [Select]uses BGRABitmap; {...} procedure TForm1.FormCreate(Sender: TObject); begin   png := TBGRABitmap.Create('somefile.png'); end; procedure TForm1.FormDestroy(Sender: TObject); begin   png.Free; end; procedure TForm1.FormPaint(Sender: TObject); begin   png.Draw(Canvas,0,0,False); end; ---------------------------------------------------------------------- cd · 2010-04-12 05:21 circular your BGRABitmap is very good, but i can't use it becaus it is GPLed. ---------------------------------------------------------------------- circular · 2010-04-12 07:43 See the other topic to continue talking about the license : TBitmap.ScanLine