[Gambas-user] gb.image: image alpha channel accessibility
Benoît Minisini
gambas at ...1...
Thu Aug 12 00:35:27 CEST 2010
> I'm writing a game and am exploring my graphical options using gb.image.
> While it's not hardware accelerated, it's easier to get into than OpenGL
> and the SDL component seems to be missing key features such as image
> rotation. The various filter/effect methods also offer a huge range of
> possibilities, CPU speed permitting.
>
> The GAMBAS documentation states that images in gb.image are treated as
> read/write arrays, which I'm assuming means that they're allocated in
> memory similarly and that their elements are accessed similarly. .Load,
> .Copy and .Draw operate on the alpha channel and RGB channel together, but
> I don't see any way to read or write to an image's alpha channel
> exclusively. Is this possible, and if so, how?
>
> If the only available method is something like getting the pointer to where
> the image is stored in memory and accessing it one pixel at a time, it
> might be a good idea to expand the existing gb.image methods to include
> performing operations specifically on the alpha channel. This could also
> be
> accomplished by allowing all the existing methods to work directly on the
> alpha channel, such as .Copy and .Draw.
>
> As always, any ideas or reflections are appreciated.
>
> -----
> Kevin Fishburne, Eight Virtues
> www: http://sales.eightvirtues.com http://sales.eightvirtues.com
> e-mail: mailto:sales at ...1887... sales at ...1887...
> phone: (770) 853-6271
- There is no rotation in gb.image because I don't have the algorithm at the
moment. It is a bit complex, because all gb.image color formats should be
supported.
- The alpha channel is the highest byte of the 4-bytes pixel color. What do
you want to do with the alpha channel?
--
Benoît Minisini
More information about the User
mailing list