Tk Images - Transparency

I'm making a game with Ruby and Tk, but the transparency in the .gif
images are not showing through in the program, the graphics are instead
filled with white. I'm not sue if Tk can handle transparencies, but if
there is an option or a way I have to make the graphics, that would be
much easier than creating a background for each graphic, for each
background.

Any help, links, or code would be extremely appreciated.

···

--
Posted via http://www.ruby-forum.com/.

This should help you out:

http://www.tek-tips.com/faqs.cfm?fid=6789

-Jonathan Nielsen

···

On Sat, May 8, 2010 at 7:52 AM, Jesse Jurman <e.j.jurman@gmail.com> wrote:

I'm making a game with Ruby and Tk, but the transparency in the .gif
images are not showing through in the program, the graphics are instead
filled with white. I'm not sue if Tk can handle transparencies, but if
there is an option or a way I have to make the graphics, that would be
much easier than creating a background for each graphic, for each
background.

Any help, links, or code would be extremely appreciated.

This should help you out:

How do I use transparency in my Tk window icons? - Perl FAQ - Tek-Tips

Actually looks like I'm a bit wrong about that (that's for window
icons)... but this seems to indicate that at least PNG alpha-channel
transparency works. I couldn't find much info on GIF transparency.

http://docstore.mik.ua/orelly/perl3/tk/ch17_11.htm

-Jonathan Nielsen

Jonathan Nielsen wrote:

This should help you out:

How do I use transparency in my Tk window icons? - Perl FAQ - Tek-Tips

Actually looks like I'm a bit wrong about that (that's for window
icons)... but this seems to indicate that at least PNG alpha-channel
transparency works. I couldn't find much info on GIF transparency.

Tile and Transparent Images (Mastering Perl/Tk)

-Jonathan Nielsen

Thanks, but I don't think ruby has native support for PNGs and after
some more research, it doesn't have support for transparent GIFs
either... there is an extension called Img, but I'm not sure how to
integrate that into Ruby...

···

--
Posted via http://www.ruby-forum.com/\.