[Gambas-user] gb.image: image alpha channel accessibility

Benoît Minisini gambas at ...1...
Thu Aug 12 01:34:21 CEST 2010


> Benoît Minisini wrote:
> > - 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.
> 
> Did you mean the SDL component? gb.image does have rotation (although I
> don't know if it preserves the alpha channel):
> 
> http://gambasdoc.org/help/comp/gb.qt/image/rotate
> http://old.nabble.com/gb.image:-how-to-keep-a-rotated-image-centered-td2936
> 9608.html
> 
> Benoît Minisini wrote:
> > - The alpha channel is the highest byte of the 4-bytes pixel color. What
> > do
> > you want to do with the alpha channel?
> 
> Thanks, that is good to know. Briefly, I'd like to copy the alpha channel
> from one image to the alpha channel of another image, preserving the target
> RGB channel. It would be like using Image.Draw but being able to specify
> the source channel[s] (RGB, Alpha, All) and destination channel[s] (RGB,
> Alpha, All).
> 
> Specifically, the game I'm writing uses a layered landscape (bedrock, sand,
> soil, vegetation, snow) with one large tileable texture for each layer. As
> each layer is rendered it needs to be seamlessly blended with the other
> layers using smaller alpha channel images. The smaller images used only for
> their alpha channel are "interconnective" or "in-between" tiles and create
> a smooth transition between, for example, sand and grass tiles.
> 
> I could address the pixels individually, but that would be super
> inefficient as opposed to using a GAMBAS method with its underlying C
> code's speed. I'm probably pushing GAMBAS in a direction it wasn't meant
> to go, but
> nevertheless that would be a damn useful functionality for games and
> graphics apps.
> 
> Let me know what you think, and here's my web site if you're curious:
> 
> http://www.eightvirtues.com/sanctimonia
> 
> -----
> 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

I'm not sure to really understand. Would you make some images for me?

-- 
Benoît Minisini




More information about the User mailing list