Recent

Author Topic: TImage: PNG file with alpha channel. Showing without alpha channel !  (Read 7529 times)

azatsh

  • New member
  • *
  • Posts: 7
...........................................
image1 := TImage.Create(self);
image1.picture.loadfromfile('/home/azat/1.png'); // image with alpha channel
image1.transparent := true;
...........................................

I use lazarus 0.9.29.26103. This problem exists only in Linux

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2510
Re: TImage: PNG file with alpha channel. Showing without alpha channel !
« Reply #1 on: January 13, 2011, 01:37:13 am »
This is known. On linux (gtk) only a 1 bit alpha channel is supported
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

azatsh

  • New member
  • *
  • Posts: 7
Re: TImage: PNG file with alpha channel. Showing without alpha channel !
« Reply #2 on: January 13, 2011, 09:48:23 am »
ok!

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: TImage: PNG file with alpha channel. Showing without alpha channel !
« Reply #3 on: February 22, 2011, 05:25:12 pm »
Is there any way to omit this problem? My toolbar icons on GTK have some jagged edges

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2510
Re: TImage: PNG file with alpha channel. Showing without alpha channel !
« Reply #4 on: February 22, 2011, 11:47:17 pm »
Is there any way to omit this problem? My toolbar icons on GTK have some jagged edges
Wait, a rewrite of the lcl-gtk-devicecontext is planned
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Gintas

  • Jr. Member
  • **
  • Posts: 71
    • Developer's Diary
Re: TImage: PNG file with alpha channel. Showing without alpha channel !
« Reply #5 on: March 11, 2011, 04:41:58 pm »
Well seems the best solution to this is using QT interface instead GTK2.

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: TImage: PNG file with alpha channel. Showing without alpha channel !
« Reply #6 on: March 11, 2011, 04:56:54 pm »
I found very good temporary solution:
http://wiki.lazarus.freepascal.org/BGRABitmap

 

TinyPortal © 2005-2018