Skip navigation
Currently Being Moderated

resize canvas to selection

Oct 15, 2008 6:46 AM

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!
 
Replies
  • Currently Being Moderated
    Oct 15, 2008 7:29 AM   in reply to (Mark_J_Peterson)
    You can always copy the selection dimensions from the info palette into the image size dialog.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 7:51 AM   in reply to (Mark_J_Peterson)
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 8:00 AM   in reply to (Mark_J_Peterson)
    Mark,

    Isn't that exactly what Image>Crop is doing? Not sure I understand what you're asking.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 8:09 AM   in reply to (Mark_J_Peterson)
    >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
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 8:45 AM   in reply to (Mark_J_Peterson)
    Make your selection, go to Image-Crop.

    Ah, but you want to keep what's outside the crop. Just use the crop tool then. You draw the rectangle with the crop tool, instead of using some other tool to make the selection.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 8:58 AM   in reply to (Mark_J_Peterson)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 9:02 AM   in reply to (Mark_J_Peterson)
    [ed]
    >Crop with the "hide" option checked in the options bar.

    Thanks PeterK. Make sure the background layer isn't selected.

    J
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 9:25 AM   in reply to (Mark_J_Peterson)
    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!
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 9:29 AM   in reply to (Mark_J_Peterson)
    The canvas is now resized to the selection.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 9:54 AM   in reply to (Mark_J_Peterson)
    > "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. I don't even see the need for creating a "dummy" layer.

    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 9:58 AM   in reply to (Mark_J_Peterson)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 9:59 AM   in reply to (Mark_J_Peterson)
    >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
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 10:11 AM   in reply to (Mark_J_Peterson)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 10:17 AM   in reply to (Mark_J_Peterson)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 10:24 AM   in reply to (Mark_J_Peterson)
    Ah! Thank you. That explains it.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 11:29 AM   in reply to (Mark_J_Peterson)
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 1:07 PM   in reply to (Mark_J_Peterson)
    >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
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2008 11:48 PM   in reply to (Mark_J_Peterson)
    Turns out it was all down to terminological inexactitude.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2008 4:04 AM   in reply to (Mark_J_Peterson)
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2008 4:07 AM   in reply to (Mark_J_Peterson)
    The dummy-layer workaround does not work if any 1 of the 4 canvas borders is outside the current canvas.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2008 10:08 AM   in reply to (Mark_J_Peterson)
    What does that mean?
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2008 11:47 AM   in reply to (Mark_J_Peterson)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2008 12:52 PM   in reply to (Mark_J_Peterson)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2008 1:26 PM   in reply to (Mark_J_Peterson)
    Strange. I carefully tried it before posting, but it now works for me, too.
    Thanks for your tip.
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)