Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Puzzler183

Transparency

This topic is 5929 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I get a 32-bit PNG to have transparent areas using paint, flash MX, or fireworks 4? I have used a erase to transparent in firworks, and now it comes up grey instead of completely white.

Share this post


Link to post
Share on other sites
Advertisement
May I suggest you try to read the mini tutorial I posted in this forum a week or so ago ?
If it''s not helpful, I''ll gladly answer any question you might have left.





Sancte Isidore ora pro nobis !

Share this post


Link to post
Share on other sites
Well, firstly, your tutorial didn''t work for me. For example, the last time I tried it, it gave me a totally white alpha channel, which was not useless.

For many purposes you don''t need to go to this much trouble - you just need to erase the background. If it won''t let you erase the background, it''s usually cos you''re working on the special Background layer. So duplicate that layer into a ''proper'' layer, delete the original Background layer, and use the background eraser on the new layer.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
I have a feeling you didnt select properly the parts to be shown.
Maybe you Ctrl+cliked on the background ?

let''s make one thing clear, in the tutorial, whatever you select will be the visible parts of your pictures, the rest will be transparent.
Since selection is not all or nothing, you can make shades of alpha. To see exactly how it looks, you can switch to the Quickmask mode instead of the classic selection tool.

Once you have selected what you want, you go to the Channels panel and create a new channel. By default, the button uses the current selection, so you end up with what you want, a proper alpha layer.

Then you need a software that can actually *display* the alpha layer properly.
You also need, in between, to have saved to a format that will support the alpha layer : PNG being one.



Sancte Isidore ora pro nobis !

Share this post


Link to post
Share on other sites
you are welcome
Like I said, if you guys want more details, I can always give it a try...


Sancte Isidore ora pro nobis !

Share this post


Link to post
Share on other sites
quote:
Original post by ahw
I have a feeling you didnt select properly the parts to be shown.
Maybe you Ctrl+cliked on the background ?

I ctrl-shift-clicked on each channel. Each time it gave me a ''no pixels are more than 50% selected'' message. You didn''t really explain what ctrl-shift-clicking does, though, so I have no idea why it wasn''t selecting what I wanted selecting. How would it know?

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
And this time when I tried it, it -did- create an alpha channel, except the alpha channel was inappropriate - it seemed to blank out parts of the image that I wanted to keep, just because they were bright or something. How does it decide what you want selecting? I am doing everything the tutorial says, but I think you wrote it to work with a certain type of image which I probably don''t have.

Oh, and I can''t seem to get it to save with the alpha channel either. It doesn''t work in IE when it''s saved as a PNG. (I''m using Photoshop 6.)

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
quote:
Original post by Kylotan
And this time when I tried it, it -did- create an alpha channel, except the alpha channel was inappropriate - it seemed to blank out parts of the image that I wanted to keep, just because they were bright or something. How does it decide what you want selecting? I am doing everything the tutorial says, but I think you wrote it to work with a certain type of image which I probably don't have.

Oh, and I can't seem to get it to save with the alpha channel either. It doesn't work in IE when it's saved as a PNG. (I'm using Photoshop 6.)



You can try this: use the magic wand and select some blank part of your image. Right-click, then choose "select inverse". Now all your images should be selected. Now add a new channel in the channels tab.

Keep your selection, select the Pen or Brush with a [big size], then white out the selection. Save as TGA 32-bit or PNG



Explorer has and always has had problems with PNGs. Microsoft is aware of this, but doesn't seem to want to do anything about it. Unfortunately.

Edit: sorry, that's the ALPHA part of PNGs ofcourse.


Cheers!

2DNow - Specializing in yesterday's technology today!

[edited by - llyod on September 17, 2002 1:12:18 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Kylotan
I ctrl-shift-clicked on each channel. Each time it gave me a 'no pixels are more than 50% selected' message. You didn't really explain what ctrl-shift-clicking does, though, so I have no idea why it wasn't selecting what I wanted selecting. How would it know?



Ah yes, sorry
Ctrl+clicking on a *layer* in the Layers panel will select ALL pixels on this layer. It's that simple. If a pixel is transparent, i.e. its opacity is under 100%, it's selected as well, but if you check the Quickmask (that's at the bottom of the toolbar, you can switch the Marquee tool between normal and quickmask), you'll see those areas are indeed selected.(If you dont know what I am on about, you'll have to read up about the Marquee tool and the quickmask mode )

The error message you get is only a warning.
It explains you that it *has* selected pixels, but because of the way the Marquee tool works, it will look as if you didnt select anything. That's because the Marquee tool draws it's "marching ants" border around pixels which are 50% or more visible. Anything under is considered "outside".
If you want to see what you have actually selected, you should switch to the Quickmask mode.

Notice I emphasized the *layer* word 'cause I notice you talk about channels. We dont want to mess with the channels, we just want to create one. The Alpha channel, which doesnt exist by default.
To create it, we need to know which areas are going to be transparent and which will not.
To do this, we use the select tool.
The reason I talk about the Ctrl+click trick, is because this allow you to select all you need, without worrying about pixel opacity. In fact, it's exactly what you want : the Ctrl+click trick select all your pixels with their respetive opacity, which is what we want to get our transparent picture in the end.
When you use the quickmask mode, you get a preview of what your alpha layer will be (a Mask is saved as a Channel, btw).

hope this clears a few things up.

As for the IE glitch, well, I dont usually say that, but this is one of those times where it's appropriate to shout out loud "Microsoft Sucks". They know it, they dont give a damn about it. Go figure...



Sancte Isidore ora pro nobis !

[edited by - ahw on September 21, 2002 10:36:28 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!