![]() |
Gtk image transparencies
Bear with me here, there's many firsts:
My first Maemo app My first Python app My first Gtk app As you can see, the odds are stacked against me. Anyway, I'm building a Windows SideShow application. I'm using the universal driver which means no Windows side code. I've got the protocol handling working fine (Bluetooth for now) and getting all the relevant data. Part of the data obtained is a gadget icon. This is supposed to be a 32bpp with alpha-channel bitmap. I can display the icon in a Gtk button no problem, but it has a black background. Is there anyway to extract the alpha-channel and use it? |
Re: Gtk image transparencies
I can't help but just had to say that is a great idea for an application!
|
Re: Gtk image transparencies
Thanks for the support! :)
Anyway, I've sort of found a solution. It's less than ideal, but I've noticed that all the icons have a solid black background. So I was able to use add_alpha to at least eliminate the horrible black background: Code:
pixbuf = pixbuf.add_alpha(True, chr(0), chr(0), chr(0)) |
Re: Gtk image transparencies
1 Attachment(s)
|
Re: Gtk image transparencies
1 Attachment(s)
I was REALLY struggling with GTK. Had I known that pygame was available on Maemo sooner, I'd have started with that. :mad:
Anyway, the switch to pygame has been made and my app now looks like this: Attachment 4262 |
Re: Gtk image transparencies
This looks like a really cool app. Any info on the exact uses and what your future plans are. How does it hook up with Windows Side Show exactly?
|
Re: Gtk image transparencies
You can find out more information about SideShow here.
My app uses the SideShow universal driver. The great thing about this is that nothing needs doing on the Windows side. It detects a sideshow device and automagically installs the drivers. The app currently connects by Bluetooth, but the universal driver also supports network and USB connections. I plan to eventually include network support, but that uses pnp-x (a Microsoft bolt on to uPNP) and means some extensive coding. :mad: I'm thinking, at this stage, that I should maybe post a Work In Progress thread in another area of the forums and get comments/feedback. |
All times are GMT. The time now is 05:29. |
vBulletin® Version 3.8.8