Photoshop: Working with Locked Pixels - Digital Photography School

Photoshop: Working with Locked Pixels

opener.jpg

If you’ve ever wondered what the small icons in the Layer palette do, you might be surprised at how useful they can be. Here’s what the Lock Transparent Pixels icon does and how you can use it.

step1.jpg

There are times when you are working with content on layers in Photoshop that the layers can do things that you don’t expect them to do. For example, in this image, I have extracted the background to a layer of its own by selecting it and then choose Layer > New > Layer via Copy.

I now want to blur this layer so if I select it and apply a Gaussian blur filter to it, you will see that the Gaussian blur filter pushes the background over the edges of the flower.

step2.jpg

This time, instead of selecting the layer contents I selected the Lock Transparent Pixels icon in the layers palette.

Now when I apply the same heavy blur filter you’ll see that the edges of the background are maintained.

The layer is blurred but only the area that was covered by the original pixels is blurred and the blur isn’t permitted to ‘bleed’ into the area that contains fully transparent pixels.

step3.jpg

This option is useful when painting over details to change their color. For example, when you photograph someone against a green screen background you will find hairs and areas around the very edge of your subject may have a green tinge. Or when you extract a subject, like a building, photographed in bright sunlight it may display some chromatic aberration around its edges.

If you select the layer by Control + Clicking on it (Command + Click on the Mac) and sample a color from adjacent pixels you can set the Brush to Color mode and paint over the edges. The problem is that, as you paint, the color is built up on partially transparent pixels which, if you paint too many times, begin to lose their transparency.

If, on the other hand, instead of selecting the layer, you click the Lock Transparent Pixels option and then paint with the brush set to the same Color blend mode and sampling colors from the image as you go, you’ll paint out the problem colors but without affecting transparency.

step4.jpg

The same option can be used when you fill a selection with a foreground or background color by pressing Alt + Backspace (, Option + Delete on the Mac). If the selection is partially transparent and if you simply Control + Click on the layer to select it, the more you fill it the more transparency is lost. On the other hand, if you select Lock Transparent Pixels you can fill it over and over again and no transparency is lost.

In short, using Lock Transparent Pixels ensures that an object on a layer can never become more or less transparent than it was when first created and that its edges won’t change if you, for example, add a blur to it.

Read more from our Post Production category.

Helen Bradley is a Lifestyle journalist who divides her time between the real and digital worlds, picking the best from both. She writes and produces video instruction for Photoshop and digital photography for magazines and online providers world wide. She has also written four books on photo crafts and blogs at Projectwoman.com.

  • http://flickr.com/photos/blasteh Matt

    Very good tip, this is just what I needed, thanks!

  • Simon

    On the flower exemple, wouldn’t it be easier to paste the flower to a new layer, put it on the foreground, and blur the background? Like that there is no way that the background will blur the foreground.

    Or am I missing a point here?

  • http://www.flickr.com/photos/cstgpa/collections/ Chris Anderson

    Thanks for the tip. I have been struggling with this very problem for some time…a solution at last and it works.

  • http://danferno.deviantart.com Danferno

    Simon – I believe your option would result in a semi-transparent edge, since the transparent part gets mixes with the normal part.

  • dok

    Thank you very much ! It seems to be the very same option that offers GIMP and I was wondering what it was for !

  • http://www.lightshootedit.com scott

    As it is the example image isn’t great either actually. This is a poor example of the usage of this tool, and I would have preferred using a mask for more control. I rarely use the lock anymore as masks are more powerful and flexible.

    -www.lightshootedit.com

  • Benjamin Hegan

    Great tip.

    Can this be done in Elements 8?

  • http://www.projectwoman.com/phototips.html Helen Bradley

    @benjamin – yes it can .. check the bottom of the Layers palette in PSE8 and you’ll see a Lock icon there. It works just the same.

    @simon you are totally right and there are far better ways to blur a background if that’s what you’re trying to do. This post, however, was about showing what lock pixels can do for you and what problems it can help you overcome. I chose examples where the problems would be fairly easy to see and understand and which anyone might encounter from time to time.

  • http://www.pixelshaping.ch Sven

    i suggest to do such tasks with layer masks to keep your selections editable… it’s way much easyer
    cheers from switzerland

  • Mary McGraw-Jarvis

    Great article and very useful information. Thank you!

Some older comments

  • Mary McGraw-Jarvis

    September 3, 2010 06:55 am

    Great article and very useful information. Thank you!

  • Sven

    July 29, 2010 10:49 pm

    i suggest to do such tasks with layer masks to keep your selections editable... it's way much easyer
    cheers from switzerland

  • Helen Bradley

    July 29, 2010 09:13 am

    @benjamin - yes it can .. check the bottom of the Layers palette in PSE8 and you'll see a Lock icon there. It works just the same.

    @simon you are totally right and there are far better ways to blur a background if that's what you're trying to do. This post, however, was about showing what lock pixels can do for you and what problems it can help you overcome. I chose examples where the problems would be fairly easy to see and understand and which anyone might encounter from time to time.

  • Benjamin Hegan

    July 29, 2010 08:51 am

    Great tip.

    Can this be done in Elements 8?

  • scott

    July 29, 2010 06:17 am

    As it is the example image isn't great either actually. This is a poor example of the usage of this tool, and I would have preferred using a mask for more control. I rarely use the lock anymore as masks are more powerful and flexible.

    -www.lightshootedit.com

  • dok

    July 29, 2010 04:28 am

    Thank you very much ! It seems to be the very same option that offers GIMP and I was wondering what it was for !

  • Danferno

    July 29, 2010 04:19 am

    Simon - I believe your option would result in a semi-transparent edge, since the transparent part gets mixes with the normal part.

  • Chris Anderson

    July 29, 2010 03:17 am

    Thanks for the tip. I have been struggling with this very problem for some time...a solution at last and it works.

  • Simon

    July 29, 2010 02:18 am

    On the flower exemple, wouldn't it be easier to paste the flower to a new layer, put it on the foreground, and blur the background? Like that there is no way that the background will blur the foreground.

    Or am I missing a point here?

  • Matt

    July 29, 2010 12:20 am

    Very good tip, this is just what I needed, thanks!

Receive a FREE SAMPLE of our Portrait Photography Ebook

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

Receive a FREE SAMPLE of our Portrait Photography Ebook

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

Receive a FREE SAMPLE of our Portrait Photography Ebook

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

Sign up to the free DPS PHOTOGRAPHY COURSE

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

GET DAILY free tips, news and reviews via our RSS Feed

Sign up to the free

DPS PHOTOGRAPHY COURSE

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

GET DAILY free tips, news and reviews via our RSS Feed

Sign up to the free

DPS PHOTOGRAPHY COURSE

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download
DPS NEWSLETTER
DPS NEWSLETTER
DPS NEWSLETTER

DPS offers a free weekly newsletter with: 
1. new photography tutorials and tips
2. latest photography assignments
3. photo competitions and prizes

Enter your email below to subscribe.
Email:
 
 
Get DAILY free tips, news and reviews via our RSS feed