Sign in to follow this  
entY8

Taking a certain number of pixel away from a selection

Recommended Posts

I've got a short question: Is it possible to take away a certain number of pixel from the border of a selection (not streching the selection, but equally taking away a pixel from the border all around)? If, how? If not, when will it be? :D

Apart from this function I missed when using this tool for some first little works I really think it's great! Carry on the good work :wink:

edit: i found how that function is called in gimp: "select" menu -> "shrink"

("grow" is analogue)

Share this post


Link to post
Share on other sites

Go to image/canvas size and then select the center square in the anchor optrions as highlighted below. This will tell paint.net to expand the canvas relative to the center of the image. This means that if you change add an extra 20 pixels to the width, it will expand the canvas by 10 pixels on either side of the image. So just choose new a new height and a new width so that you get the correct number of pixels taken away from the image, and click ok (If your image is not a square it will help to uncheck the maintain aspect ratio option so you can choose the right height and width).

pixel_help.png

Share this post


Link to post
Share on other sites

Hm... this is not what I meant. Maybe I didn't explain good enough, I'll give it another try:

I don't want to resize the picture or modify it in any way. I just have got a curved selection (e.g. made with the magic wand thingy) and I want to change the selected area (not the picture, just the selection mask), change it in this way, that it shrinks but keeps shape.

If you've got Gimp you can see what i mean by making a curved selection there and using "shrink" from the "select" menu. You'll also have to specify there how many pixels the border of the selection should go back.

This is just the tool I'm missing :wink:

Share this post


Link to post
Share on other sites

I see this in some photoshop tutorials too.

It's not included in Paint.NET and i don't know if it will be someday.

Share this post


Link to post
Share on other sites

Good work aatwo but try this (inspired by your method):

*Select what you want.

*Create a new layer

*Invert Selection (Ctrl + I)

*DESELECT (Ctrl + D)

*Gaussian Blur of X pixels you want

*Take care that tolerance is set to zero

*Select the transparent part

*Tadam.

You can delete the layer you've selected.

:D

Share this post


Link to post
Share on other sites

Thanks to aatwo and Bob for your tutorials; next time I'll try it using that new layer + gaussian blur method. :D

(the picture wasn't that big, so I managed to make my selection pixel by pixel all around the border of the object :roll:)

@dairyman: I tried that one first, but it didn't work out.

I wanted to do the following: I was given an image of a blue letter 'S' with background and stuff. Now I wanted to hollow that 'S' out as to fill it with another color but leaving the border with the original color.

And so this problem emerged...

A soon as I get home (I'm at school right now :?) I'll post the image here.

Of course an automated function would be much more comfortable :D

Share this post


Link to post
Share on other sites

As promised, here is the problematic picture:

logo1zx.png

Now how would you get a red 'S' inside this one with leaving an equally wide blue border remaining from the old 'S' "behind"?

Share this post


Link to post
Share on other sites
Go to image/canvas size and then select the center square in the anchor optrions as highlighted below. This will tell paint.net to expand the canvas relative to the center of the image. This means that if you change add an extra 20 pixels to the width, it will expand the canvas by 10 pixels on either side of the image. So just choose new a new height and a new width so that you get the correct number of pixels taken away from the image, and click ok (If your image is not a square it will help to uncheck the maintain aspect ratio option so you can choose the right height and width).

pixel_help.png

Nice watermark...

Share this post


Link to post
Share on other sites
As promised, here is the problematic picture:

logo1zx.png

Now how would you get a red 'S' inside this one with leaving an equally wide blue border remaining from the old 'S' "behind"?

Two words: Shrink & Stretch

Share this post


Link to post
Share on other sites
As promised, here is the problematic picture:

logo1zx.png

Now how would you get a red 'S' inside this one with leaving an equally wide blue border remaining from the old 'S' "behind"?

Two words: Shrink & Stretch

No! It does not work that way! Try it out yourself! It's because of this 'S' shape.

Share this post


Link to post
Share on other sites
with an image that small you may aswell has just used the paaintbrush....

But heres what my method produced.

s1oh.png

Yes, i used the paintbrush since at that moment you had not posted you method yet.

Your method works fine and all problems are solved, but that one guy insisted here again, it'd be possible just by streching.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this