Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / No transparency while using png image

Author
Message
Dead Guy Alive
16
Years of Service
User Offline
Joined: 25th Mar 2008
Location: Where no man has gone before..the toilet
Posted: 31st May 2008 15:46 Edited at: 31st May 2008 17:29
Hi, I´m new to the forums so please be kind.

Well, here is the problem: I have a sprite sheet which animates fine, BUT! when I use this
command to make the background color transparent it doesnt work!

So then I converted the sheet to bmp format and it worked fine.

Do I need to use another method for png files or does Dark GDK
not support tranparency for that format?

Any help is appreciated

Just sitting in here and waiting for something interessting to happen
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 31st May 2008 22:02
hmm, 0 messages? How does that work? how can you have a topic without a starter post? And Png transparency works fine for me, so if you actually make a post it hould be easy to fix.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 23:03
True dat. It's worked for me pretty much straight out of box as it were. Just one graphic image with transparency surrounding it led around by the mouse in a few lines of code.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Dead Guy Alive
16
Years of Service
User Offline
Joined: 25th Mar 2008
Location: Where no man has gone before..the toilet
Posted: 31st May 2008 23:21
Hi I´m the post starter and I have no idea why my post dissapeared

Just sitting in here and waiting for something interessting to happen
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 23:24
Quote: "Hi Ím the post starter and I have no idea why my post dissapeared"


Regardless, can you post some details? How the png file was created for example?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Jun 2008 00:52
If you are under post approval and edit an existing post, that post goes back for approval.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Jun 2008 01:35
PNG has built-in transparency. Maybe DGDK assumes that PNG files control their own transparency so doesn't try to apply a color key to that file type.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 1st Jun 2008 01:42
I have a .png file that when I try to use with DGDK, it doesn't work.

~~Its not about what you know, its about how you figure it out.~~

Attachments

Login to view attachments
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Jun 2008 01:45
Doesn't work in what way? Doesn't show through the transparent region? Try the small one I have attached.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Attachments

Login to view attachments
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 1st Jun 2008 01:48
Look at the picture attached-- it shows the |_| (box) around it.....

~~Its not about what you know, its about how you figure it out.~~

Attachments

Login to view attachments
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Jun 2008 02:12
And yet here's mine with a randomly chosen background color. Here's the code



Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Attachments

Login to view attachments
Dead Guy Alive
16
Years of Service
User Offline
Joined: 25th Mar 2008
Location: Where no man has gone before..the toilet
Posted: 1st Jun 2008 11:46
Thanks Lilith, it seems like you know your stuff

I also think that it has to do with most png files have their own "built in transparency" but is there some way I can force Dark GDK to ignore this?

Sorry, for the weird "post problem" in the beginning everyone XD.

Just sitting in here and waiting for something interessting to happen
Dead Guy Alive
16
Years of Service
User Offline
Joined: 25th Mar 2008
Location: Where no man has gone before..the toilet
Posted: 1st Jun 2008 13:40
And also the png I´m using lack transparency instead it has "255,0,255" background color (bright pink)

Just sitting in here and waiting for something interessting to happen
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 1st Jun 2008 15:55
Hey, I got my transparency to work for my png! Yay! Also, is there a way to use GIMP and make a .png picture with transparency, I cant find a way...

~~Its not about what you know, its about how you figure it out.~~
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Jun 2008 17:43
Quote: "Also, is there a way to use GIMP and make a .png picture with transparency, I cant find a way..."


I'm not sure this will work since I started out with a transparent embedded image, but....

Look for a program called Irfanview (it's free.) It deals with a lot of graphics images. It's not a drawing program but it allows you to manipulate an image in several ways. When I saved a .PNG file it asked during the save process what color I wanted to use as transparent. I made the selection by clicking on the background. It worked, but it probably isn't as good a method as generating it in the original rendering application.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 1st Jun 2008 19:16
That is exactly what I am looking for!!! Thanks! it worked perfectly.

~~Its not about what you know, its about how you figure it out.~~

Login to post a reply

Server time is: 2024-11-20 11:30:59
Your offset time is: 2024-11-20 11:30:59