A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: making transparent PNG's but chosing another color for transparency

  1. #1
    poet and narcisist argonauta's Avatar
    Join Date
    Nov 2001
    Location
    Under the bed
    Posts
    2,080

    making transparent PNG's but chosing another color for transparency

    The thing is this:

    You open photoshop, go save your png, and everything that's white is then transparent. Is there a way to choose another color to be used for the transparency?

    I mean, in this specific case, i have a pic of a cloud, the bg is the sky of course. So, I want to save it, but i want the sky being transparent. Well, I can remove the sky and having just a cloud, so then i can save the png, but as the cloud is all white, the png seems all transparent (except for a few shades the cloud used to have).

    I usually solve this problem inverting the colors. saving a black cloud, and then applying a white tint in flash....easy, but what if i have a more complex pic, lets say a white cloud with an orange UFO in the middle. If I do the "invert-colors and apply tint later" in flash, the UFO won't appear.

    So, is there a way to specify that when saving as PNG, instead of white, everything that is blue (for example) has to be transparent? (just like you can do with GIFS)
    my blog: blog.innocuo
    Sponsored by your mom.

  2. #2
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    I'm pretty sure you can set the index colour, like you can with GIFs but the main point of a 32 bit PNG is that it has a built in alpha channel and to take advantage of that you need transparency in your psd, so you add a transparent bg layer and then remove whatever colour you want to remove in photoshop (using the GIF method you will only be able to remove one specific colour, this way anything you remove in the image is trnasparent), and also of course you can make certain layers a variable transparency which will carry through to the 32 bit PNG.

    make sure you have a transparent BG layer in photoshop, then when you remove the sky the PNG will know what is transparent and leave the white cloud (as a 32 bit PNG).

  3. #3
    poet and narcisist argonauta's Avatar
    Join Date
    Nov 2001
    Location
    Under the bed
    Posts
    2,080
    thanks mang.

    haven't test it yet, bt i will. Now that someone else somewhere else mentioned it. Is fireworks better for png handling and all that? I really stayed limited with only PS and Flash. Haven't got the need to use Fireworks. Is it any good for this kind of tasks?
    my blog: blog.innocuo
    Sponsored by your mom.

  4. #4
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    I think it is better than PS at pngs but photoshop does an ok job, file sizes are higher imho. Either app will recognise the alpha channel content and make that transparent (or semi-) on export for 32bit PNGs.

  5. #5
    poet and narcisist argonauta's Avatar
    Join Date
    Nov 2001
    Location
    Under the bed
    Posts
    2,080
    well i tried a simple white brush stroke (and an orange spot inside), really easy, and a transparent layer as background. I used PS, and it worked ok. It seems i was doing something wrong, because this time it worked easily.
    my blog: blog.innocuo
    Sponsored by your mom.

  6. #6
    FK Photoshop Slut rugbystud's Avatar
    Join Date
    Jul 2000
    Location
    Too drunk to remember...
    Posts
    3,537
    http://www.phong.com/tutorials/flash/transparent/

    Best tut for transpaarency Ive found!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center