resize canvas to selection

MJ
Posted By
Mark_J_Peterson
Oct 15, 2008
Views
1880
Replies
37
Status
Closed
Hi folks,
is there a way to resize the canvas to the current selection (similar to image>>crop which crops the image to the selection) ?
thanks!

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

JM
J_Maloney
Oct 15, 2008
You can always copy the selection dimensions from the info palette into the image size dialog.
M
Mylenium
Oct 15, 2008
You could simply use guides, have them snap to the selection borders (which they do) then use the crop tool with the "Hide cropped regions" option. Gives the same result, just involves a few more steps.

Mylenium
P
Phosphor
Oct 15, 2008
Mark,

Isn’t that exactly what Image>Crop is doing? Not sure I understand what you’re asking.
MJ
Mark_J_Peterson
Oct 15, 2008
Thanks for your help.

J Maloney, you mean image>>image size ? As I said, I don’t want to resize the image, but the canvas. And I wasn’t able to copy anything from the info palette (or did you mean enter the values manually in another dialogue as opposed to copy/paste?)

Mylenium, same thing, as marked bold in my OP, I need to resize the canvas, not crop the image.
M
Mylenium
Oct 15, 2008
Mylenium, same thing, as marked bold in my OP, I need to resize the canvas, not crop the image.

Umm, but that’s what you do?! I really don’t follow your logic. Technically it doesn’t matter which method you employ, as long as the layers retain their pixel data, which is what you seem to require. You can even use the Crop tool to expand the canvas size, btw.

Mylenium
MJ
Mark_J_Peterson
Oct 15, 2008
Ed (and everyone else), I think you are confusing 3 different things:

1) image resizing: you take the whole image and multiply the amount of x and y pixels by some factor (or simply change dpi in case you don’t resample the image)

2) cropping:
a) if your selection is smaller than the current image borders, than you actually delete all the pixelx outside the selection
b) if your selection is bigger than the current image borders, you resize the canvas
c) can be both a) + b)

3) canvas resizing: you just change the size of the active work space for your document.
a) make canvas smaller: like cropping 2a) but your pixels don’t get deleted (get them back with image>>reveal all)
b) make canvas bigger: add transparency (or background colour) around the layers
c) can be both a)+b)

So I hope the different concepts are clear now.

Again, my question is:

Can I resize the CANVAS to my selection?
MJ
Mark_J_Peterson
Oct 15, 2008
Umm, but that’s what you do?! I really don’t follow your logic. Technically it doesn’t matter which method you employ,

OK, Mylenium, then please tell me a method which resizes the canvas to the current selection (rectangle).
P
PeterK.
Oct 15, 2008
Make your selection, go to Image-Crop.
P
PeterK.
Oct 15, 2008
If you absolutely need to use some other tool to draw your selection and crop to it, then make your selection, create a new transparent layer and fill it. This will just be a dummy layer. Turn your snap on and use the crop tool, snapping to the edges of the dummy. Crop with the "hide" option checked in the options bar.
JM
J_Maloney
Oct 15, 2008

3) canvas resizing: you just change the size of the active work space
for your document.

No. I don’t think you can do this in PS. I’ve always wanted more of this functionality, akin to pasteboards, and would love to hear someone weigh in on plug-ins/tricks to achieve this.

And I wasn’t able to copy anything from the info palette (or did you mean enter the values manually in another dialogue as opposed to copy/paste?)

Yes.

I don’t think anyone in this thread is confused, yet. "Canvas resize," as far as I understand PS, is a full crop, where none of data outside the crop is retained.

J
MJ
Mark_J_Peterson
Oct 15, 2008
Make your selection, go to Image-Crop. Ah, but you want to keep what’s outside the crop. Just use the crop tool then.

The crop tool does not keep what’s outside the crop.

If you absolutely need to use some other tool to draw your selection and crop to it, then make your selection, create a new transparent layer and fill it. This will just be a dummy layer. Turn your snap on and use the crop tool,

Again, I don’t want to crop, but to resize the canvas.

I either have an embarrassing big black-out or you guys didn’t read post #6. I don’t want to delete any pixels. Just resize the canvas (=visible pixels).
JJ
John Joslin
Oct 15, 2008
Mark

Make your selection.

Look at the W and H in the Info Palette.

Go to Image > Crop.

Now, what is the canvas size?

Doh!
MJ
Mark_J_Peterson
Oct 15, 2008
Yes of course John. Your point being ??
JJ
John Joslin
Oct 15, 2008
The canvas is now resized to the selection.
MJ
Mark_J_Peterson
Oct 15, 2008
Yes, but the pixels outside the selection are deleted.
MJ
Mark_J_Peterson
Oct 15, 2008
3) canvas resizing: you just change the size of the active work space
for your document.

No. I don’t think you can do this in PS. I’ve always wanted more of this functionality, akin to pasteboards, and would love to hear someone weigh in on plug-ins/tricks to achieve this. I don’t think anyone in this thread is confused, yet. "Canvas resize," as far as I understand PS, is a full crop, where none of data outside the crop is retained. J

J, that’s not correct. Didn’t you ever try? Canvas resizing does *not* delete pixels.
P
Phosphor
Oct 15, 2008
"Yes, but the pixels outside the selection are deleted."

"Crop with the "hide" option checked in the options bar."

I’ve read and re-read and opened up an experiment image, trying to follow what you want to do, and still don’t understand why the italicised reply above (from PeterK) doesn’t work for what you’re after.

Maybe you need to explain again, with more specific detail.

Maybe you could detail (using ONLY pixels as your unit of measurement) starting Canvas dimensions, layer dimensions (all data, not just the visible portion), and the dimensions of the selections/crops/final canvas size you want.

In my experiments, the "Hide" option did exactly what I interpreted your needs to be.

BTW, Mark…what version of Photoshop are you using? Might not make a difference, but revealing that info is just a good habit to get into.
P
Phosphor
Oct 15, 2008
Oh, and if you want to post screen shots (with annotations!) you can use the services of <http://www.pixentral.com> to host them and to generate thumbnails and HTML code for you to paste into a reply.
JM
J_Maloney
Oct 15, 2008
Didn’t you ever try?

I just did (use the crop tool with "hide" selected instead of the default "delete"). That’s why I edited my post and thanked PeterK (and Mylenium too 🙂 ).

However, to be clear, I still stand by my comment that "canvas resize" from the image… canvas size menu does nothing but crop/delete. Please correct me if I’m wrong.

J
O
OldBob
Oct 15, 2008
VERY flipping interesting.

I just tried this with CS3:

Made a canvas 250 x 250 pixels/clear background.

Fill with a gradient (so I can tell if I get everything back)

Image > Canvas Size: 100 x 100 pixels

Image > Canvas Size 250 x 250 pixels

And all the data was still there.

HOWEVER:

Repeating this with a white background or flattened file WILL INDEED permanently crop the data.

Curious.
P
PeterK.
Oct 15, 2008
Canvas resize will allow you to "reveal all" afterwards, as long as you change your "background" layer to a regular layer. Reveal all only works on the contents of layers, not images consisting of only background.
O
OldBob
Oct 15, 2008
Ah! Thank you. That explains it.
MJ
Mark_J_Peterson
Oct 15, 2008
Yes, but the pixels outside the selection are deleted."

"Crop with the "hide" option checked in the options bar."

I’ve read and re-read and opened up an experiment image, trying to follow what you want to do, and still don’t understand why the italicised reply above (from PeterK) doesn’t work for what you’re after.

Yes, I already acknowledged that it works. I said "sorry" (because I was mistaken) and "great".

As for your question: I’m using CS3.

I don’t even see the need for creating a "dummy" layer.

Do you see any other way to resize the canvas to a existent selection ?
MJ
Mark_J_Peterson
Oct 15, 2008
I just did (use the crop tool with "hide" selected instead of the default "delete").

good, than we are on the same page 🙂

However, to be clear, I still stand by my comment that "canvas resize" from the image… canvas size menu does nothing but crop/delete. Please correct me if I’m wrong.

huh? no, AFAIK "image>>canvas size" does not delete any pixels. It is not true that it "does nothing but crop/delete". If you just acknowledged that resizing the canvas does not delete pixels outside the selection, BUT that "image>>canvas size" DOES DELETE, then how else do you change the canvas size?? I don’t know any other method.
MJ
Mark_J_Peterson
Oct 15, 2008
OldBob VERY flipping interesting.

yes, see post #6
JM
J_Maloney
Oct 15, 2008
I stand corrected. Still doing tests on a background layer only. You are correct, Mark, that Image… canvas size (if applied to a layered doc) does allow to "reveal all" back the pixels you "cropped".

J
MJ
Mark_J_Peterson
Oct 15, 2008
OK, J Maloney. If you can, I would be thankful if you could still reply to my other question: which OTHER method of canvas resizing did you use than "image>>canvas size" ??
MJ
Mark_J_Peterson
Oct 15, 2008
As the thread evolved mainly around other issues, what’s the bottom line for my original question now?

Is there a way to: "resize canvas to selection" ?

(other than the workaround with a dummy layer)
JM
J_Maloney
Oct 15, 2008
which OTHER method of canvas resizing did you use than "image>>canvas size" ?? (or did you mean the hide-crop method?)

1) Crop tool
2) Canvas size dialog
3) Selection, then image… crop
MJ
Mark_J_Peterson
Oct 15, 2008
Thanks J.
Okay 1+2 is what I mentioned. And 3) does not resize the canvas, it delete-crops the image.
JJ
John Joslin
Oct 16, 2008
Turns out it was all down to terminological inexactitude.
BS
boarder_s_paradise
Oct 16, 2008
Yes. Hence my post #6.

So resize canvas to selection is only possible via the dummy-layer workaround, correct ?
BS
boarder_s_paradise
Oct 16, 2008
Coming to think of it: The dummy-layer workaround does not work if any 1 of the 4 canvas borders is outside the current canvas.
P
PeterK.
Oct 16, 2008
What does that mean?
BS
boarder_s_paradise
Oct 16, 2008
OK, admittedly my sentence didn’t make any sense. What I wanted to say:

The dummy-layer workaround does not work if any 1 of the 4 borders of the selection (or the dummy-layer for that matter) is outside the current canvas.
P
PeterK.
Oct 16, 2008
It does for me! I made a layer, moved it so that half of the layer was outside the visible canvas area, then used the crop tool. I was able to snap to all the sides of the layer, including the edges that fell outside of the visible range. (it snapped to a point outside in the grey part of the work area.) Executing the crop changed the canvas dimensions to correspond to the edges of the layer.
BS
boarder_s_paradise
Oct 16, 2008
Strange. I carefully tried it before posting, but it now works for me, too. Thanks for your tip.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections