How to make transparent pngs

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

How to make transparent pngs

Post by Enjay »

Can anyone help me with transparent pngs? Bear in mind I'm writing this at work, with no access to PSP, so I could be wrong, but I've looked and I can't see an obvious way of setting transparency in version 7.04. Does it allow that? If so, could someone give me a quick tut? Perhaps Animation shop (bundled with PSP) will do it. I know how to make transparent gifs using that, but haven't checked its capacity to save pngs.

If PSP 7.04 isn't going to do the job, I also have Photoshop (a pretty new version (8 I think) but haven't installed it since my last HD reformat. Presumably PS would do it, but I don't use it that often, so I don't really know my way around it. Again, anyone feel like giving me a quick tut?

Or failing either of the above, any recommendations? (I don't like the gimp.)
User avatar
solarsnowfall
Persecution Complex
Posts: 363
Joined: Fri Aug 05, 2005 8:51

Post by solarsnowfall »

I've been using PhotoShop for years, and as far as I can tell, you would need to convert a GIF with the defined transparent color to a PNG, in order to achieve this.

[edit]http://www.rdrop.com/~half/Creations/Ar ... /Tip3.html

That would appear to be a good demo of how to do it in PhotoShop, but translucent pngs aren't even compatible with IE...................

[edit again]Sorry, I just looked at that link and realised it's long winded and fairly useless.

To do this, all you need to do is right click one of the forum images, wich are in gif format (with designated transparency), save it to your HD, open it and save as a png in Photo Shop. I cannot speek for PSP, but I'd think you could do the same...

Also, when working with new images in Photo Shop, the transparency is set during the save of gif, from the default .PSD format. You then open the gif, and save it as png. Unfortunately, not even PhotoShop has very good png options, so you have to work around it.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Thanks, (I got your pm too BTW). I'll install photoshop and see how that goes. Opening a transparent gif in psp means it opens with a solid background. Simply saving again is enough to destroy the transparency. Perhaps there is an option hidden somewhere though. I'll also have a more thorough check through Animation Shop too because it does allow opening and preserving transparency.
Nuxius
Posts: 106
Joined: Fri Sep 02, 2005 9:15
Location: Texas

Post by Nuxius »

Out of curiousity, are you wanting just a regular transparent png, like to make some high resolution bars, where you can either see through a pixel or you can't? Or do you want a png with a 8-bit alpha channel, where you can have various levels of transparency, to make something like glass?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

At the moment I'm just looking for see through pixels. If I get that sorted, then maybe I'll move on to alpha channel stuff. I'm just exploring what GZdoom can do really at this stage.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Alpha channel doesn't work yet. For that I have to rewrite some of the texture handling because every line that uses translucency has to be treated specially and right now the texture object doesn't give the necessary information.
Nuxius
Posts: 106
Joined: Fri Sep 02, 2005 9:15
Location: Texas

Post by Nuxius »

Ahh, O.K., I wasn't too sure whether GZDoom supported alpha transparencies yet or not.

Anyway, as far as a standard "cut out" transparent PNG goes, in Photoshop, you treat it the exact same as you would a transparent GIF.

a)make sure all your stuff is on a single layer (not background)
b)highlight the area you want transparent and delete it
c)then use the "save for web" option
d)choose 8-bit PNG
e)make sure the 'transparent' option is selected
f)save.

(you can mess with the other options in the save for web window as well, for better or worse results, but for the sake of simplicity here, I'm leaving that out)
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Thanks for that. I haven't got round to installing PS just yet, but I need to do it anyway, so I will try it soon.

I also found out how to do it in PSP. When you save a png, you click the options button on the save as dialogue. That brings up the png options (duh!) which includes a button with "run optimizer" written on it. If you run the optimizer, there is a tab that deals with transparency.
Locked

Return to “GZDoom”