The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Alpha Transparency and me

SeñorAmorSeñorAmor !!!Registered User regular
edited December 2006 in Help / Advice Forum
Hi folks. Not sure if this would be better placed in Artists' Corner, but I've heard scary, bad things about that place, so you get my question. :P

I'm working on some images with solid backgrounds, on top of which, the original artist did his/her work. Any anti-aliased lines in the original work, blends perfectly with the background.

I would like to make the background transparent, but use an alpha transparency so any anti-aliasing in the picture becomes partially transparent as well.

I am currently at an impasse. I cannot figure out how to get the alpha transparency to work without initially starting with a transparent background. I'm sure there's some way to do it, however it eludes me.

I have access to both Paint Shop Pro and Photoshop, but I feel much more comfortable using PSP. If anyone could help me out, I'd be eternally grateful. For reference, here's one of the pictures I'm using:

ann.png

SeñorAmor on

Posts

  • The FritzThe Fritz Registered User regular
    edited December 2006
    If you are talking about alpha blending, as used in games and the like:

    (talking photoshop here)

    1) Make the background all the same color.. or not.. It only matters a little for the color of the edges.

    2) Create a fourth channel in your image, name it alpha.

    3) Color in the fourth channel, realising that this 'color' represents the transparancy of the image. 255 being invis, 0 being visible. (usually)

    4) Save the image as a targa or (I think) png. Enable the alpha channel when saving it.

    5) ...

    6) Profit!

    The Fritz on
  • SeñorAmorSeñorAmor !!! Registered User regular
    edited December 2006
    The Fritz wrote:
    If you are talking about alpha blending, as used in games and the like:

    (talking photoshop here)

    1) Make the background all the same color.. or not.. It only matters a little for the color of the edges.

    2) Create a fourth channel in your image, name it alpha.

    3) Color in the fourth channel, realising that this 'color' represents the transparancy of the image. 255 being invis, 0 being visible. (usually)

    4) Save the image as a targa or (I think) png. Enable the alpha channel when saving it.

    5) ...

    6) Profit!

    I'm not really following you, sorry. There's no way of saying, "Hey, take this nice pinkish background color and set it as the alpha channel" is there?

    SeñorAmor on
  • The FritzThe Fritz Registered User regular
    edited December 2006
    Nope, unfortunately that only works for transparant gifs.

    Are you sure you want to use the alpha channel? Is this a texture for a game or some such? If you are planning on putting this on a webpage, then you want a transparant gif, which uses a certain color as 'transparant'.

    To explain the alpha channel a bit more: It is quite literally another color. RGB+Alpha makes RGBA. You have to paint alpha seperately (shows up as black and white), but when it is exported, then it makes that black/white transparant/not transparant.

    Here are a couple sites that can probably help ya out with PSP.

    http://www.sluniverse.com/kb/Article.aspx?id=10190

    http://www.thebest3d.com/pdp/tutorials/psp7/index.html

    The Fritz on
  • freekfreek Registered User regular
    edited December 2006
    The Fritz wrote:
    If you are talking about alpha blending, as used in games and the like:

    (talking photoshop here)

    1) Make the background all the same color.. or not.. It only matters a little for the color of the edges.

    2) Create a fourth channel in your image, name it alpha.

    3) Color in the fourth channel, realising that this 'color' represents the transparancy of the image. 255 being invis, 0 being visible. (usually)

    4) Save the image as a targa or (I think) png. Enable the alpha channel when saving it.

    5) ...

    6) Profit!

    I'm not really following you, sorry. There's no way of saying, "Hey, take this nice pinkish background color and set it as the alpha channel" is there?

    Yes, but because her skin color is the same as the background, she will be transparent as well.

    easier way - photoshop

    double click layer to make it not "background"

    magic wand select the pink area

    press delete

    save for web

    save as a gif or png with transparency. Mess around with the settings there and you should get what you want.

    ann.gif

    (if you read the rules, the AC isn't that bad a place)

    freek on
  • nexuscrawlernexuscrawler Registered User regular
    edited December 2006
    freek wrote:
    The Fritz wrote:
    If you are talking about alpha blending, as used in games and the like:

    (talking photoshop here)

    1) Make the background all the same color.. or not.. It only matters a little for the color of the edges.

    2) Create a fourth channel in your image, name it alpha.

    3) Color in the fourth channel, realising that this 'color' represents the transparancy of the image. 255 being invis, 0 being visible. (usually)

    4) Save the image as a targa or (I think) png. Enable the alpha channel when saving it.

    5) ...

    6) Profit!

    I'm not really following you, sorry. There's no way of saying, "Hey, take this nice pinkish background color and set it as the alpha channel" is there?

    Yes, but because her skin color is the same as the background, she will be transparent as well.

    easier way - photoshop

    double click layer to make it not "background"

    magic wand select the pink area

    press delete

    save for web

    save as a gif or png with transparency. Mess around with the settings there and you should get what you want.

    ann.gif

    (if you read the rules, the AC isn't that bad a place)

    you could probably get a similar effect simply using the magic wand tool

    nexuscrawler on
  • robaalrobaal Registered User regular
    edited December 2006
    As you can see it usually ends up looking like crap if you just magic-wand delete it so you'll have to either manually remove the offending border pixels or even totally re-do the red glow.

    wow, you can just drag and drop an image from the browser to save it or open in a image editor, neat

    robaal on
    "Love is a snowmobile racing across the tundra when suddenly it flips over, pinning you underneath.
    At night, the ice weasels come."

  • DrFrylockDrFrylock Registered User regular
    edited December 2006
    The difficulty with doing this is that, if the original author used antialiasing, the background color will bleed into/mix with the edges of your picture (as seen in that transparent GIF above.

    Transparent GIFs + antialiasing are a minor nightmare because, as others have pointed out, a pixel is either transparent or not. This means if you want outer edges to be antialiased, you have to put the image against a background of roughly the same color as the intended target background, let that background bleed into the edges, and then make the outer, solid part of the background (away from the edges) transparent.

    The alpha channel solves this problem by allowing pixels at the edge to be (0-255) transparent, meaning you can antialias/ease the edges of a picture without having to know what kind of background you're going to put it on.

    Now the problem is, if you only have a one-layer bitmap image and you want to get rid of that pink background and replace it with transparent, but the edges of the image are antialiased, you're going to have a problem getting rid of all the pink. The solid pink stuff away from the edges is easy - the magic wand will get that. The pink that is blended in with the antialiased edges is a bee-yotch for you, though. For that, you might need to do some spot correction with the border select tool and the airbrush, or edge feathering, or something like that.

    DrFrylock on
Sign In or Register to comment.