Recent

Author Topic: BGRABitmap - strange artifact when changing glyph  (Read 4427 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1057
BGRABitmap - strange artifact when changing glyph
« on: October 02, 2012, 10:20:12 pm »
Hi,

When I load glyph in design time to buttons based on BGRA Bitmap (like TBGRASpeedButton, TBCButton) then everything works fine. But when I try to load it in runtime from TImageList.GetBitmap, then glyph has yellow color instead of alpha (see screen bgra-ongetbitmap.png). When I move mouse over button then artifact disappear. Even call Repaint, Refresh, Update, Invalidate on button after changing glyph doesn't help. I thought that maybe this is TImageList bug, but on TBitBtn it works fine. Am I doing something wrong in BGRA Controls? I attached demo (you need BGRA Controls, don't need to be fresh, TBGRASpeedButton is old control)

Ubuntu linux 12.04 64bit, GTK.
BGRA Bitmap 5.9.4 (stable)
Lazarus 1.1 from svn (CodeTyphon 2.80)
FPC 2.7.1 from SVN (from CodeTyphon 2.80)

Regards

fenix

  • New Member
  • *
  • Posts: 10
Re: BGRABitmap - strange artifact when changing glyph
« Reply #1 on: November 28, 2012, 02:08:55 pm »
I had the same problem. The cause is TImageList. Looks like it do some transformations. I replaced it with loading images from lazarus resource. It helped.

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: BGRABitmap - strange artifact when changing glyph
« Reply #2 on: November 28, 2012, 03:41:29 pm »
Yes, I finally did this too.

lainz

  • Guest
Re: BGRABitmap - strange artifact when changing glyph
« Reply #3 on: November 30, 2012, 12:14:08 am »
not fully related, but glyph has problems with bgra a lot of time ago =)

http://bugs.freepascal.org/view.php?id=23227

also loading some png (32 or 24 bits, i don't remember, one works, the other not) alpha turns black... basically bitmaps exported from the 'glyph editor'-

 

TinyPortal © 2005-2018