Author Topic: How do I use a layer with transparency as an eraser? (Photoshop)  (Read 1986 times)

0 Members and 1 Guest are viewing this topic.

Offline CelestialHusky

  • Full Member
  • Plush Collector
  • ***
  • Male
  • Posts: 135
    • Fur Affinity
Okay, the question probably sounds odd I know. Let me try to explain a bit so I can figure this out.

Anyway, I have this image here:


Normally the way I have been adjusting the color of the border of my Avatar for other sites and stuff is I would change the color of that image, then over lay it on top of this one:


However, all that does is give the illusion of transparency. It also only works on backgrounds the same color as the color of the border of the image in the first picture.

So, my main question is how can I completely eliminate the need for the first image, but still get the same effect and have a true transparent edge on my image?

I tried selecting the non-transparent pixels in the first image, then using the shape it gave me to delete pixels from the second image... That doesn't retain the partial pixel transparency that the first image has though... HALP ME! LOL!
"Everybody wins... Except for that donut thing, nobody gets that. There's no donuts in Diablo. No, I just threw it down. BlizzCon exclusive, no donuts." - Jay Wilson

Offline Old Rabbit

  • Species: Rabbit Artist
  • Official Birthday Wisher.
  • *
  • Male
  • Posts: 15469
    • Art by Oldrabbit
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #1 on: October 27, 2010, 12:20:41 pm »
If I understand the question correctly.

Perhaps the first image could be layered over the second then adjust
it's transparency to your wishes..  I know that still requires the first
image, but it should be easy to do.

Avatar drawn by me.
oldrabbit.com

Offline CelestialHusky

  • Full Member
  • Plush Collector
  • ***
  • Male
  • Posts: 135
    • Fur Affinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #2 on: October 27, 2010, 12:37:14 pm »
Uhh... That wouldn't make the main image have the transparency in the shape of the top image though. If you look at my avatar on the left, as the "finished" example. What I am trying to figure out is how to get the same effect without having to "fake" transparency with another layer.

[confusing]
I don't want the image on top to be transparent, I want the main image itself to have transparency like the image. Which is why I wanted to know if it was possible to use a shape as an eraser to remove the part of the main image in same shape as the first image.
[/confusing]
"Everybody wins... Except for that donut thing, nobody gets that. There's no donuts in Diablo. No, I just threw it down. BlizzCon exclusive, no donuts." - Jay Wilson

Offline Old Rabbit

  • Species: Rabbit Artist
  • Official Birthday Wisher.
  • *
  • Male
  • Posts: 15469
    • Art by Oldrabbit
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #3 on: October 27, 2010, 12:53:08 pm »
Ok I see what your wanting now..  Sorry about that..  Interesting effect though like a
postage stamp edge..  :) I will think on it..
Avatar drawn by me.
oldrabbit.com

Offline redyoshi49q

  • Species: (*please see above*)
  • Avatar from Dexcat's MFF 2013 Photoshoot
  • *
  • Male
  • Posts: 2071
    • Enigma Cipher (software project)
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #4 on: October 27, 2010, 01:40:09 pm »
I don't know anything about Photoshop, but this feature in Gimp is referred to as a layer mask.  For a given layer (in this case, your entire image), you associate a greyscale image, and the greyscale image makes the layer in question opaque where the greyscale is white, transparent where the greyscale is black, and translucent according to the degree of grey (you'd have to invert the greyscale you posted in your post to remove the border rather than the center).

It seems Photoshop has layer masks as well.  This link is a tutorial of a different application (gradient blending of images), but it should be helpful regardless.
"Perfect normality is impossible.  Be unique!"
-- redyoshi49q




^ (click) Puzzle game!

Offline CelestialHusky

  • Full Member
  • Plush Collector
  • ***
  • Male
  • Posts: 135
    • Fur Affinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #5 on: October 27, 2010, 02:24:42 pm »
I don't know anything about Photoshop, but this feature in Gimp is referred to as a layer mask.  For a given layer (in this case, your entire image), you associate a greyscale image, and the greyscale image makes the layer in question opaque where the greyscale is white, transparent where the greyscale is black, and translucent according to the degree of grey (you'd have to invert the greyscale you posted in your post to remove the border rather than the center).

It seems Photoshop has layer masks as well.  This link is a tutorial of a different application (gradient blending of images), but it should be helpful regardless.
I got all that to work, but I can't seem to paste anything into the mask layer. I can use the gradient too like the tutorial says but you can't paste anything into the mask layer... It just creates a new layer when I try to paste into it... *shrug* I tried a bunch of stuff based on that tutorial and doesn't seem to work.
"Everybody wins... Except for that donut thing, nobody gets that. There's no donuts in Diablo. No, I just threw it down. BlizzCon exclusive, no donuts." - Jay Wilson

Offline Old Rabbit

  • Species: Rabbit Artist
  • Official Birthday Wisher.
  • *
  • Male
  • Posts: 15469
    • Art by Oldrabbit
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #6 on: October 27, 2010, 04:45:41 pm »
I worked out a way to make the image with a transparent edge. It's
not done the way you asked, but isn't all that difficult.
I used photoshop 7.

Ok here is what I did. Take the frame image and add it as a layer on top the image layer you want to frame. Then use the magic wand tool to select the center cut it out.
After making sure the layers are centered over each other merge them together..

Now enlarge the canvas both ways a small amount. Then create a new layer with the image layer  on top and change the image mode to indexed color.It will ask if you wish to flatten layers and choose ok.

Then use the magic wand tool to cut the outside out creating a transparent edge and save it as a gif. You should have a image with the outside edge transparent.

Making the canvas larger just gives you room to select the part outside the edge.
You can reduce the canvas back down after your done.

You might have to select the image layer when converting to indexed mode..

Hope that helps.

Old Rabbit :orbunny:
Avatar drawn by me.
oldrabbit.com

Offline CelestialHusky

  • Full Member
  • Plush Collector
  • ***
  • Male
  • Posts: 135
    • Fur Affinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #7 on: October 27, 2010, 04:54:31 pm »
That's fairly similar to the method I have tried already actually. The end result for me looks really rough and the transparency isn't smooth. Could you post an example of how it turned out for you?

Also, you don't have to expand the canvas in Photoshop 7, that's what I use as well. You can actually just draw outside of the canvas and back onto it seamlessly. I tend to use .png files instead of .gif too if I am not working with animation. I like to avoid .gif files as much as possible because of the quality loss when going down to 256 colors.
"Everybody wins... Except for that donut thing, nobody gets that. There's no donuts in Diablo. No, I just threw it down. BlizzCon exclusive, no donuts." - Jay Wilson

Offline Old Rabbit

  • Species: Rabbit Artist
  • Official Birthday Wisher.
  • *
  • Male
  • Posts: 15469
    • Art by Oldrabbit
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #8 on: October 27, 2010, 05:46:24 pm »
I sent you a pm..
Avatar drawn by me.
oldrabbit.com

Offline CelestialHusky

  • Full Member
  • Plush Collector
  • ***
  • Male
  • Posts: 135
    • Fur Affinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #9 on: October 27, 2010, 06:01:10 pm »
I sent you a pm..
Yup, that's the same effect I ended up with. >_<

Anyone else have any ideas? Thanks for giving it a shot though Rabbit, plus I learned how to do the gradient fading from that link you sent too. :)
"Everybody wins... Except for that donut thing, nobody gets that. There's no donuts in Diablo. No, I just threw it down. BlizzCon exclusive, no donuts." - Jay Wilson

Offline redyoshi49q

  • Species: (*please see above*)
  • Avatar from Dexcat's MFF 2013 Photoshoot
  • *
  • Male
  • Posts: 2071
    • Enigma Cipher (software project)
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #10 on: October 27, 2010, 07:44:38 pm »
Once again, I use Gimp, not Photoshop.  Once again, there is likely a parallelism for what I describe in Photoshop.

I was able to paste the greyscale you posted into the bitmask.  I did it this way:
  • I put both images as layers in the same file.
  • I set visibility on the layers so that the greyscale layer was visible and the image layer was not.  I selected that layer, used the main interface's Colors->Invert followed by Select->All and Edit->Copy Visible.
  • I created a bitmask for the image layer, and set the visibility on the layers so that the image layer was visible and the greyscale layer was not.
  • I right clicked the image layer and checked the Edit Layer Mask option.
  • From the main window, I used Edit->Paste.
  • Making sure the image layer was selected, I anchored the pasted layer by right clicking it and selecting Anchor Layer.  Since the image's bitmask was set to be edited, the program wrote the pasted image to the bitmask rather than the picture itself.

Basically, pasting an image into a bitmask (and, as far as I'm aware, any image editing whatsoever including brushes, gradients, and other effects) works just like regular pasting, except for making sure there is a check by "Edit Layer Mask" for that layer's options.  I tested my result by zooming in on it and putting a plain red layer behind it, and the image does have a gradient of transparency.  Hopefully, this helps you to get this working yourself.  If not (or if you just want the finished image), I can send you what I made.
"Perfect normality is impossible.  Be unique!"
-- redyoshi49q




^ (click) Puzzle game!

Offline Yip

  • Species: vulpes vulpes
  • *
  • Female
  • Posts: 4005
    • Furaffinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #11 on: October 27, 2010, 10:05:52 pm »
I can think of several ways to accomplish what you describe in photo-shop. Of course there are "dirty" ways where you are actually deleting stuff from the image. But I prefer whenever possible to work non-destructively. You course, as already suggested, use layer masks. The easiest way to paste to a layer mask that I've found, is to select the mask and show it's contents (ALT-click the mask). Then paste while the mask contents are showing.

However, probably the easiest way to get the effect you want, assuming the first image has transparency, is to simply make the second image a child of the first. To do this, place the parent layer beneath the one you want to make a child, then ALT-click between the two layers (the cursor will change to a 'link' symbol). BTW, This technique is also very useful when working with adjustment layers to get them to only effect what you want.


(Note: listed hot-keys might be wrong as I'm going from memory and don't have photoshop in front of me at the moment  Edit: Hotkeys corrected).
-----
If you need any other PS help, feel free to message me.
« Last Edit: October 28, 2010, 03:30:53 pm by Vararam »

Offline CelestialHusky

  • Full Member
  • Plush Collector
  • ***
  • Male
  • Posts: 135
    • Fur Affinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #12 on: October 28, 2010, 09:24:58 am »
@Vararam
I can't seem to get the stuff you mentioned to work in photoshop at all. I don't seem to be getting the functionality that you mentioned. I tried a few different key combinations but can't seem to figure it out. What you mention sounds right, but I can't get it to work. >_<
"Everybody wins... Except for that donut thing, nobody gets that. There's no donuts in Diablo. No, I just threw it down. BlizzCon exclusive, no donuts." - Jay Wilson

Offline furtopia02

  • *****
  • Posts: 1801
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #13 on: October 28, 2010, 10:11:07 am »
I am on my phone and in a hurry so forgive brevity. This is really easy to do.

Make a duplicate of your original layer

Turn off the original layer to save it in case you mess
Up

Make a new transparent layer and put it on the bottom layer

Erase th desired portions of the duplicated layer. Voilą. Transparency 

Save as transparent gif via save images for web and devices. Or as png with transparency through the same
Menu



Offline Yip

  • Species: vulpes vulpes
  • *
  • Female
  • Posts: 4005
    • Furaffinity
Re: How do I use a layer with transparency as an eraser? (Photoshop)
« Reply #14 on: October 28, 2010, 03:32:43 pm »
Ok, I now have photoshop here in front of me, and it turns out that both the hotkeys I mentioned wrong. In both cases, it's alt-click (or option-click on a Mac)

I'm using Photoshop CS4 if that makes a difference (though I don't think it does).

----
To make a layer into a sub-layer, hold alt and click on the line between the layers. When holding alt and hovering over the correct place, the cursor should change to a link symbol which looks something like:
« Last Edit: October 28, 2010, 03:43:24 pm by Vararam »