Image Editing Question

Posted by: Dignan

Image Editing Question - 19/06/2002 08:47

I've got a bit of a weird question here...

I've been fairly proficient for a long time in the mere basics of image editing with Paint Shop Pro. No, I don't want Photoshop. We've agreed that we are not right for each-other

I have a question. Say I have an image with a background and I want to change that background. Take this image for example:



Lets say the yellow part with the black border is the subject, and the blue is the background. You see how the black slowly transitions into the blue background? If I wanted to change the background to say, white, I'd have a blue-tinged border around the whole image. If I deleted all the parts that have the blue tint in it, I'd end up with an image that was a little jagged all around the edges. What I'm asking is if there is a way to do some sort of fill that will automatically effect a certain level of that black->blue transition and make it a black->white transition or whatever background I choose, even transparent (which might bring up its own difficulties).

Can I do this? Can I do it with PSP? If you have Photoshop, is there a way to do it in there? Thanks for any help you can give me.


*edit*
ps- 10 points to whoever can guess what the picture is of
*edit*
Posted by: tonyc

Re: Image Editing Question - 19/06/2002 08:53

ps- 10 points to whoever can guess what the picture is of

I gotta go with Bart Simpson.
Posted by: robricc

Re: Image Editing Question - 19/06/2002 08:57

I think you want to adjust the tolerance in PSP. The latest version I have is 4, so attached is a screen shot. This can also be done in Photoshop.
Posted by: peter

Re: Image Editing Question - 19/06/2002 09:02

attached is a screen shot

But not only has that left you with a jagged edge (rather than an anti-aliased black-to-white edge), it's still left you with some border pixels with a blue tinge that doesn't belong to them. What Dignan wants is a fill that knows the background and foreground colours, and replaces any adjacent pixel that's any linear combination of the two, with the same linear combination of foreground and new background.

This is technically feasible, but I don't know of a package that does it.

Peter
Posted by: David

Re: Image Editing Question - 19/06/2002 09:11

This is what you'd do in Photoshop (I'm the opposite to you - PSP just seems clunky to me and I can't bear using it) so you'll have to translate it.

Select menu>colour range.
Click the colour in the image you want, then adjust the slider to get the range of shades you want.

Using that as a starting point, go over and retouch any edges that need it. This sort of operation isn't something you can just do with a couple of clicks, unfortunately.

If you want an easy option, select the edge around it, exapnd the selection by a few pixels, feather it the same number of pixels and you'll have a neat looking edge, with a blue glow effect.

Posted by: robricc

Re: Image Editing Question - 19/06/2002 09:11

Well, I think the previously attached image is much better compared to when the tolerance is set to 0 (see attached).
Posted by: tfabris

Re: Image Editing Question - 19/06/2002 09:40

Dignan, there are two aftermarket products that will do exactly what you are looking for, but they are not cheap.

They are Mask Pro and Knock Out.

Their job is to be able to select and mask fuzzy-edged objects properly. They are rather amazing in what they can do. The example you've cited above is like the easiest thing they can tackle, they can do a lot more than that.

If you don't want something as powerful as those products, you have to mess around with the fuzzy-edge features of your selection tool. For instance, in Paint Shop Pro, you can feather the edges of a selection. However, it will not get a perfect accurate selection that removes the blue from your selection exactly the way you want it, you'll have to futz with it.
Posted by: peter

Re: Image Editing Question - 19/06/2002 09:43

This is technically feasible, but I don't know of a package that does it.

OK, I know of one now: the Gimp will do it.
  • Load your image.
  • Right-click and choose Image->Mode->RGB to make it deep
  • Use the dropper tool to pick up the blue as foreground
  • Right-click again and choose Filters->Colors->Color To Alpha
  • Right-click on the swatch and choose Foreground
  • Click OK.
  • You now have an alpha channel. All you need to do to recomposite it on the background of your choice is to add a new solid colour layer underneath.

    Peter




  • Posted by: Dignan

    Re: Image Editing Question - 19/06/2002 09:54

    That looks perfect! I tried the GIMP once, but it was a little tough to use. I'll try it again as this is something I seem to run into a lot.

    And Tony, you said Bart Simpson....you get 3 points
    Posted by: snoopstah

    Re: Image Editing Question - 19/06/2002 10:00

    Yeah, the spikes have too obtuse an angle for Bart (they're getting on to form an equilateral triangle), and they're also going around an object, whereas Bart's head is quite flat. So, by a process of elimination, I'm going for Lisa Simpson.

    A.
    Posted by: tfabris

    Re: Image Editing Question - 19/06/2002 10:22

    Nice feature in Gimp. "Color to Alpha", huh? I'll have to look at that package more closely.

    Of course that would only work with a solid background, but if that's all that you needed, it's certainly simple. The beauty of Mask Pro and Knock Out is that they can do it even with complex photographic backgrounds. Lemme see if I can show you an example...

    Okay, this is just a real quick one in Knock Out, done by taking all the defaults:



    There are tweaks you can do to make it even better, for example, preserving the hair detail even more. I just did that one really fast.
    Posted by: peter

    Re: Image Editing Question - 19/06/2002 10:31

    Of course that would only work with a solid background, but if that's all that you needed, it's certainly simple. The beauty of Mask Pro and Knock Out is that they can do it even with complex photographic backgrounds.

    Yeah, that's a completely different problem.

    Peter
    Posted by: Dignan

    Re: Image Editing Question - 19/06/2002 10:52

    So, by a process of elimination, I'm going for Lisa Simpson.

    Ding ding! 10 points, sir.

    That's a cool program, Tony!
    Posted by: David

    Re: Image Editing Question - 19/06/2002 11:00

    Ah, I've found the function in Photoshop that'll remove the blue tinge in the edges from the image once you've removed the colour.

    It is in Layer>matting>remove white matte. It would seem that GIMP does this part automatically.
    Posted by: Dignan

    Re: Image Editing Question - 19/06/2002 11:28

    Thanks for your great instrustions! I've gotten to where I've taken out the background color, but it is registering as the background it's self. I tried adding another layer, but it was automatically made the foreground. How do I add a background layer?

    *edit* nevermind, found it darn those arrows *edit*
    Posted by: Dignan

    Re: Image Editing Question - 19/06/2002 11:33

    I have another problem that I can't solve for the life of me (although I know I will right after I post this)

    How do you save your file in GIMP??
    Posted by: genixia

    Re: Image Editing Question - 19/06/2002 13:08

    Gimp's native file format is .xcf - this will store layers and masks etc. separately and allows you to save a work in progress. You can also save as all the common image types. (and quite a few not-so-common types too!)

    Check http://manual.gimp.org/manual/GUM/GUM.html for all your Gimp questions.
    Posted by: snoopstah

    Re: Image Editing Question - 19/06/2002 13:59

    In reply to:

    Ding ding! 10 points, sir.




    Yay! Can I exchange my ten points for a cookie, perchance?

    (And no, not the kind I keep refusing from doubleclick.com)

    A.
    Posted by: Dignan

    Re: Image Editing Question - 20/06/2002 12:01

    Hehe, no no. Points are no return, no exchange.

    But I have a question for someone regarding this process in GIMP. How do I appy it to only the background around the image? I tried doing this to Homer and hi pants became translucent! Ewww...translucent pants...

    What's the trick?
    Posted by: genixia

    Re: Image Editing Question - 20/06/2002 12:05

    Read the chapter on layers and masks, and also check out the fuzzy select tool.
    Posted by: Dignan

    Re: Image Editing Question - 20/06/2002 12:25

    I tried the fuzzy select tool. that's the magic wand tool in PSP, right? the one that automatically selects only a certain range of colors? I tried using that, but it still affected the entire image.

    Wouldn't layers not help me in the process before dong this stuff with the background? that's when I'm trying to seperate the background already. and I can't seperate the background from the image I can't make a new layer, can I?

    Also, what do you mean chapter?? Do you mean in GIMP? I guess I need to download the help file. I have no idea why they don't include the help file in the download. oh well
    Posted by: Dignan

    Re: Image Editing Question - 20/06/2002 12:51

    Actually, it worked for me this time. hmmm...we'll see how this goes.
    Posted by: Dignan

    Re: Image Editing Question - 20/06/2002 13:10

    Here's what I have done. This example should use a transparent background:

    Posted by: Dignan

    Re: Image Editing Question - 20/06/2002 13:11

    and the new image:

    Posted by: Dignan

    Re: Image Editing Question - 20/06/2002 13:15

    Hmmm. I've got some practicing to do. GIMP isn't very graceful. At least in windows it isn't. For example, if I'm using th magnify tool, I'll be increasing by certain magnitudes, and then it will jump very far forward. Like it'll be 2x-4x-8x-50x. And the same going out.

    Anyway, for this purpose it does what I want. I think I may try a demo of the newer PSP and see if it does this. I've had version 5 for like 6 years
    Posted by: muzza

    Re: Image Editing Question - 21/06/2002 15:08

    Using Photoshop you could use a channel, say blue, to create a mask of the background. This will preserve the colour variences in the background and the border. Create a new colour/hue adjustment layer and copy across your mask. You can, with a bit of teaking, get any colour you want easily,