Paint Shop Pro--Convert One Color to Transparent?
|
Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
|
03-13-2007 08:46
OK, here's one for you PSP pros. Is it possible to take a black-and-white image and just convert all the white to transparent? I've got some uses for this in SL but now it's cropped up in my RL job and would really, really, really help me.
If it's not possible, is there a way to do it in another program that keeps it when moving to PSP? I can make index and alpha transparent gifs this way in Fireworks but they aren't transparent when I open them in PSP.
Thanks!
|
Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
|
03-13-2007 15:05
I've made some progress but it's not too encouraging at this point. PSP allows substituting transparency (of some sort...) for one color but it requires reducing the image to 265 colors. Then, inserting the mask layer necessary before making the TGA file requires promoting the file back to 16 million colors and undoes the transparency. No joy yet but I continue to investigate the situation.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-13-2007 16:11
You won't see the transparency visibly in a TGA in PSP. TGA transparency comes the alpha channel. PSP, like all decent raster editors, is smart enough to know that alpha channels don't automatically mean transparency. They can mean literally anything. Interpreting the alpha data to mean transparency (or anything else) is the job of the destination program, which in this case is SL. In another application, that same channel might mean specularity or bump or your last year's tax return info. PSP won't ever make assumptions about what the alpha might or might not mean. It simply is.
Now, since all you want to do is turn the white part transparent, that's easy. Alpha channels are just grayscale images, so since you're starting with a black & white picture anyway, half your work is already done. Simply copy the image to a mask, invert it, save the mask to alpha, and then delete the mask. Save the image as 32-bit TGA, and upload to SL. It's a 2-5 second job.
If you don't know what I mean by all that "mask" and "alpha channel" talk, by the way, see the sticky at the top of this forum, entitled "Transparency and Alpha Channels: The Definitive Guide".
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
|
03-14-2007 07:30
Thanks much, Chosen! I'll definitely read the guide and try some things out. Unfortunately I have PSP only at work and SL only at home so trying thing like this and then seeing the results is something of a back-and-forth process. I'll also investigate what Photoshop Elements can do since I do have that at home too. Erasing to make transparency I've got down like a pro in both programs. Unfortunately I'm wanting textures that require a lot of that and better coordination than I can get with my mouse.
Thanks again!
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-14-2007 07:55
I'd strongly encourage you to forget the eraser even exists. By its very nature, it's the most destructive tool there is, and as you noted, it's far from precise. You want to work as non-destructively as possible. That's where masks and alpha channels come in.
Once you erase something it's gone forever. Instead of erasing it, if you mask it, it's still there, but it will be just as transparent as if it had been erased. This way, if you want to make changes, you easily can.
I encourage you to transition out of WYSIWYG thinking, and look at your images more in terms of what's going on functionally. One of the main purposes of using alpha transparency instead of visible transparency is so that your transparency element is not dependent on your color elements, and vise versa. By having transparency and color existing as separate individual components, you can infinitely change either one without affecting the other.
If you're drawing a picture, and you want to get rid of a line that you drew in the wrong place, then by all means, use the eraser as you go. For all other purposes, throw that eraser away.
Oh, and on a side note, since you mentioned your mouse is a little clumsy, I'd encourage you to invest in a Wacom drawing tablet. Prices start at just under $100 US. You'll be amazed at what a difference a Wacom will make for you. It'll take you a day or two to get used to it, but then you'll never go back. The pressure sensitivity you get with a tablet makes all the difference in the world.
(And don't even look at any other brands but Wacom. No other make has anything even approaching comparison with Wacom's technology. The difference between Wacom and all the others is beyond the difference between night and day. It's more like day on Earth vs. night on the far side of Pluto. No exaggeration.)
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
|
03-14-2007 08:55
I've just been skimming the Alpha Channel sticky and subsequent posts again. Lots of useful info there. I'll print it and read it more thoroughly over lunch.
Regarding the Wacom tablet, I might look into one of those if I get deeper into this. I actually use an older 24x36" Calcomp tablet in my job. We're possibly transitioning from purely a CAD department to more of a computer graphics one so I think I might be able to convince the powers that be that a pen/stylus pointer might be useful in addition to the clunky pucks we use now. Just off the top of your head do you know if the Wacom can be calibrated point for point with a screen image?
Thanks for your responses.
EDIT: Just found for myself that it does calibrate. Cool!
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-14-2007 09:43
From: Bodhisatva Paperclip Just off the top of your head do you know if the Wacom can be calibrated point for point with a screen image? Absolutely, it can. That's one of its major benefits. Unlike mice, which only use relative positioning, all Wacom tablet tools work in two positioning modes. There's traditional relative positioning, called "mouse mode", and precise absolute positioning, called "pen mode". In pen mode, every spot on the tablet corresponds to an exact pixel on your screen. All Wacom tablets come with both a mouse and a stylus, both of which are wireless and battery free. By default, the stylus works in pen mode, and the mouse works in mouse mode, but you can customize it any way you want. For the Intuos 3 tablet series (their current top of the line), there's an accessory you can get called a lens cursor, which is basically a mouse with a cross-hair lens attachment, designed specifically for CAD type operations (tracing blueprints, that sort of thing). To demonstrate the screen calibration you asked about (and to show off a little), below are a couple pics of my work space. I have the 12x19" Intuos3. I use dual monitors, and I set up the tablet to span both of them with the working area of the tablet using the exact proportions of both screens put together. The white area you see on the tablet is an 8.25x19" a piece of paper, which I keep underneath the tablet's tracing surface, to visually designate the working area I set up. I find it to be a very useful aid to help me coordinate my hand movements with the screen. This just happens to be how I prefer to use mine, but you could set yours any way you want. You could have the whole tablet correspond to the whole screen, a portion of one correspond to a portion of the other, whatever works best for you. You can also change any of these settings on the fly very easily. It's awesome.   Please forgive the slightly blurry images. My camera sucks.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Virrginia Tombola
Equestrienne
Join date: 10 Nov 2006
Posts: 938
|
03-14-2007 10:31
From: Chosen Few
Now, since all you want to do is turn the white part transparent, that's easy. Alpha channels are just grayscale images, so since you're starting with a black & white picture anyway, half your work is already done. Simply copy the image to a mask, invert it, save the mask to alpha, and then delete the mask. Save the image as 32-bit TGA, and upload to SL. It's a 2-5 second job.
I have to confess that I am in the "use background eraser to get rid of the desired colour, then make mask from that image" set. So your technique would be a lot more elegant. How does copy an image to a mask? I have a picture of a feather on a black background I would like to make an alpha. I went to Layers>New Mask layer and the only option was from Image. But that creates a blank mask (all white). Just to check, I saved that mask to an alpha channel. As I expected, the alpha channel preview was blank as well. So far the only way I know to create transparencies is what was described in the tutorials--that is, start with an image against a transparent background, make a mask from that image, then save that mask to the alpha channel (thanks to this forum, I've learnt to delete the mask after doing that, so my no-halo layer can work) I have PSP 8 (I downloaded PSP XI, but my computer wasn't fast enough to run it)
|
Thunderclap Morgridge
The sound heard by all
Join date: 30 Sep 2006
Posts: 517
|
03-14-2007 21:00
Nice setup. Really. Dual monitors are so nice. But How can you handle the split keyboard? And I will disagree with you on the easer. It how you use it. And you are forgetting that if you set your undo properly you can go back a hundred steps. ( I can at least). I use easer all the time because it removes stuff. I want to remove errent pixels, backgrounds I don't need. A mask is more steps than one button, magnification to about 500% and 3 mouse clicks. And I would love a wacom tablet. *sigh*
_____________________
Gimp: n : disability of walking due to crippling of the legs or feet ie. lameness, limping, gameness, claudication secondlife://Amaro/77/130/39 Come to Thunderclap: the gospel chapel and Thunderburst: Mens clothes and more.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-15-2007 08:32
From: Thunderclap Morgridge Nice setup. Really. Dual monitors are so nice. But How can you handle the split keyboard? I have to handle the split keyboard. The last few years, my left wrist feels like it's on fire whenever I try to type on a standard keyboard. The adjustable Goldtouch keyboard was an absolute lifesaver. I'd sell my first born before I'd part with it. When something relieves you of searing pain, it's worth whatever money it takes to get it, and whatever time it takes to get used to it. The split takes actually takes no more than a few hours to get used to. Then you fly on it. Really, you'd be surprised how quickly your brain adapts to it. Your body adapts to it instantly, of course, since unlike standard keyboards, the Goldtouch actually fits your hands properly. It also has a pretty cool side benefit. It almost forces you to type properly. Before I started using the Goldtouch, I used to always look at the keyboard while I typed instead of at the monitor. Now I never have to look down at all. They keyboard's shape keeps my hands in the home position almost automatically, so hunting for keys is never necessary. I love this keyboard. From: Thunderclap Morgridge And I will disagree with you on the easer. We can certainly disagree, but before we do, I'd encourage you to be careful in your judgment about this. Are you sure you're not just defending what you're used to and comfortable with just because you're used to it and comfortable with it? Can you really say there are compelling advantages to erasing? Let's examine the points you brought up. From: Thunderclap Morgridge It how you use it. And you are forgetting that if you set your undo properly you can go back a hundred steps. ( I can at least). It's not about undoing. It's about having the flexibility to make deliberate changes at any time, whether now or later on. Relying on undo is problematic for many reasons: - It's risky.
Undo history resides in active memory. You should never rely on active memory alone. What if the power goes out? What if your computer crashes? It's not always possible to undo everything. What if you're working on an image over more than one sitting? If all you ever do is simple 5-minute images, then undo will likely always be available to you, but if you're doing anything even remotely complex, often you won't do the whole thing in one session. You want to be able to save your work and walk away from it at any time without fear that your changes will become permanent. You want to be able to shut the program down or even shut the whole computer down, and then when you come back to it later, be able to pick up right where you left off, with complete freedom to alter what you did before. Mistakes become uncorrectable.What if you make a mistake in all that erasing, and you don't discover it until way later? It happens. Do you really want to have to do the whole thing over again, just to correct one little part that shouldn't have been erased? As I said before, once something has been erased, it's gone forever. If it's just masked, you can bring it back at any time, now, tomorrow, next year, any time. Just alter the mask a little bit, and it's all fixed. It's extremely inflexible. What if you want multiple versions of the same image with varying levels of transparency? Do you really want to have to start all over again with a different opacity on the eraser, and manually do all that erasing work again? With a mask in place, all you'd have to do is change the brightness & contrast of the mask itself, and you can have infinite variability in your transparency, instantly. It's incredibly time consuming.Erasing by hand takes time. There's no way around that. Masking, even complex masking, usually on takes a few seconds. Even for extremely complicated images, you'll find that in most cases creating a channel mask is several orders of magnitude faster than erasing. By taking advantage of the plethora of selection tools at your disposal, you can create highly detailed masks in just a few clicks, whereas erasing to create the same affect could take hours. Those are just a few things off the top of my head. There are many more. From: Thunderclap Morgridge I use easer all the time because it removes stuff. I want to remove errent pixels, backgrounds I don't need. A mask is more steps than one button, magnification to about 500% and 3 mouse clicks. If you're really insistent on working that slowly, then everything you're saying about your erasing technique can be done just as easily with a mask, using virtually the exact same methodology. Just apply a blank mask, and then use a black paint brush the same way you would normally use the eraser. The work-flow will be exactly the same, as will be the visual results. By working this way, you are of course choosing to negate the speed advantages of masking, but you still have all the advantages of non-destructiveness. You can easily make any changes you want later on without having to start all over again. From: Thunderclap Morgridge And I would love a wacom tablet. *sigh* Get one.  If money is tight, even a cheapie from their Graphire line is still an excellent piece of equipment. I used a 4x5" Graphire 3 for many years before I bought the big Intuos 3 you see in the picture. It was a great starter tablet. You can get a 4x5" Graphire 3 right now on eBay for around $20.00 US. I see a few of the same size Graphire 4's for around $50. If you want a more expensive one, but you can't afford it yet, do what I did. Start with what you can afford now, and then upgrade when you have the money. A Graphire isn't quite as cool as an Intuos, but it still beats the hell out of a mouse. Going from mouse to Graphire is way bigger than going from Graphire to Intuos. From: Virrginia Tombola How does copy an image to a mask? I don't have PSP installed on this machine, so I'm afraid I can't walk you through the exact steps, but I can certainly give you the concept. All you need to do is copy the image, and then paste it into the mask. If you're just working with one layer, this should be pretty straight forward. Select all, copy to clipboard, create a new blank mask, select the mask, and paste. If you're working with multiple layers, chances are you're making your image from scratch, meaning you can do this much more efficiently by following the steps in the alpha channel tutorial at the top of the forum, but on the off chance that you're just stacking the the kinds of images we've been discussing, here's what you'd want to do. First, put all your layers into a single group. Then duplicate the group, and flatten the duplicate (the duplication was to protect your original layers from being flattened unnecessarily). You'll now have a single layer that is visually identical to your working layer stack. Simply select all on that layer, and then copy and paste the selection into a mask, as described above. Sorry I can't give you the exact menu commands, but that should be enough to get you on your way.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Bodhisatva Paperclip
Tip: Savor pie, bald chap
Join date: 12 Jan 2007
Posts: 970
|
03-16-2007 05:08
Nice setup! But I can't believe with that nice equipment and even a sweet birdie you don't have a decent camera.  After some annoying RL interruptions I was able to get into this and it's working like a dream. Funny thing is I've known about the magic wand for selections for ages and it just hadn't clicked yet. Now I'm all click-delete click click click and I've got the kickbutt textures I want. Perhaps just a few more twists on the technique and I'll be flying. Thanks again for your help. In SL I'm repeatedly struck by how generous people are with their knowledge and other resources and it inspires me to be the same way. ~~Bodhi
|
Virrginia Tombola
Equestrienne
Join date: 10 Nov 2006
Posts: 938
|
03-17-2007 11:01
From: Chosen Few IIf you're just working with one layer, this should be pretty straight forward. Select all, copy to clipboard, create a new blank mask, select the mask, and paste. Thanks for the help! As you noted, this sort of thing isn't usually necessary if one is working with multiple layers, but for making quicky transparencies, it's a great technique. In this case, I had a photo of a ostrich feather against a black background, and I wanted to make the black tranparent. Up until now, I would have background erased the black, then made a mask from the image. Instead, in PSP I created a new mask layer from the image (which gave a blank mask for some reason), then copy/pasted the feather layer onto the mask. Load Alpha from the mask, and voila. The only difficulty here was making sure that the "black" is truly black. My first run, I had a light grey surrounding the feather that wasn't really visible with the preview window. I colour replaced the "black" with pure black, and that did the trick.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-17-2007 11:42
From: Virrginia Tombola Thanks for the help!
As you noted, this sort of thing isn't usually necessary if one is working with multiple layers, but for making quicky transparencies, it's a great technique. In this case, I had a photo of a ostrich feather against a black background, and I wanted to make the black tranparent. Up until now, I would have background erased the black, then made a mask from the image. Glad it's working out for you, Virginia. I have a couple additional tips based on your comments. From: Virrginia Tombola Instead, in PSP I created a new mask layer from the image (which gave a blank mask for some reason), then copy/pasted the feather layer onto the mask. Load Alpha from the mask, and voila. So you know, the reason the "mask from image" command gave you a blank mask is that it pulls from layer transparency, not from layer color. Since your image was 100% opaque, your mask came out 100% white. From: Virrginia Tombola The only difficulty here was making sure that the "black" is truly black. My first run, I had a light grey surrounding the feather that wasn't really visible with the preview window. I colour replaced the "black" with pure black, and that did the trick. You can often achieve smoother results either by using the dodge & burn tools, or by adjusting the brightness & contrast or the levels of the mask. Replacing the color works well enough in some circumstances if the image is simple enough, but it's less than ideal in most situations.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
|
08-23-2007 16:08
I hate necroposting, but I came across the very same issue recently (Using PaintShopPro X) and it was so simple I could have kicked myself.
Use the magic wand with RGB color and select all of the areas you wish to make transparent.
Go to Layers, make a new mask from selection, and then hide selection. BAM. It does it for you. Save the alpha channel, delete mask layer without merging, put down the black layer underneath and you have bootiful semitransparent texture.
edit: and the converse is true - if you want to show selection, then everything else will be alpha'd out.
|
Incony Hathaway
Registered User
Join date: 18 Feb 2007
Posts: 235
|
08-23-2007 16:55
There is another easy way to replace a colour or range of related colours or a transparency to any other colour or range of another colour or to transparent.
Use Animation Shop that comes with PSP..
Open the picture using Animation shop... Select Animation in the Tool bar.. choose Replace colour from its menu
The choices that appear are self explanatory,
Replace transparent regions or replace colour , if colour..select from your pic using the dropper or, from a pallette..
Tolerance.. how many colours close to the one you select will get taken too.. ie lets suppose you choose a red.. how many reds close to the one you pick will go too, or be changed to the colour you select
You can select a Match mode , and then what you want the colour or transparent parts replaced with..
remember the transparency in animation shop is non alpha loaded, so.. you can use the mask in PSP to load an alpha on a transparency or colour created in animation shop.
This effect in animation shop is very usefull for removing stuff from pictures without having to worry about edges, if, the colour your removing is not the same as the edge..
its also usefull to to change particular shades of white or blacks.. to a colour your never going to use..and therefore use as a mask unnaffecting other whites in your pic you want to keep.
|
Ayalara Merlin
Registered User
Join date: 31 May 2007
Posts: 5
|
08-23-2007 17:51
So far I didn't read the whole thread...but...for eliminating black or white to transparency I have a plugin  . Yes, I'm lazy, but it works perfect...not need to try it with the eraser, because the results are not the best...or with selection and delete... But beat me right now..I can't remember the name of the plugin right now...but if you want I can post it tomorrow  .
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
08-23-2007 19:26
as far as other programs "the gimp" has a color to alpha plugin and of course you can transport it back n fourth to psp using the psd file format 
|
Thunderclap Morgridge
The sound heard by all
Join date: 30 Sep 2006
Posts: 517
|
08-25-2007 13:10
I will take that plugin, please. As for the gimp comment, honestly, that is like comparing a High school track star to a special olympics athlete w/ one leg. Gimp is free, that is only plus.
_____________________
Gimp: n : disability of walking due to crippling of the legs or feet ie. lameness, limping, gameness, claudication secondlife://Amaro/77/130/39 Come to Thunderclap: the gospel chapel and Thunderburst: Mens clothes and more.
|