I need to cut a large number of columns out of a PNG image. The area I want to remove is in the centre of the image; I therefore want the left and right edges to be closer together after the cut.

I can't find an obvious way of doing this in Gimp or Photoshop CS5 (I am very much a beginner). I would really like a tool which lets me say "cut out 100 columns, starting 4 pixels from the left". Any suggestions?

4 Answers 4


Maybe someone else will come along with a simpler method, but the simplest method I can think of would be these steps:

  1. Use the Marquee tool to select the middle section that you want to remove.

  2. Select > Inverse to select everything other than that middle section.

  3. Copy and paste. This will create a new layer with an invisible center.

  4. Select the right half and use the Move tool to slide it over so the two halves are aligned.

  5. Hide the background layer/original image.

  6. Image > Trim with the bottom-right pixel.

  • this is simplest method...+1
    – Jack
    Commented Apr 13, 2011 at 4:33
  • The only part of this that wouldn't work in an Action is step 4, since that involves manual adjustment. I bet I can think of another way that would work in an Action...
    – jhocking
    Commented Apr 13, 2011 at 16:17
  • Step 4 & Step 1 both require Marquee tool... which can be saved in an action, but will always use the same selection dimensions. If we used both of our solutions as actions, the only difference would be that mine works on any height whereas yours would only work with the original recorded height. It's like we both found ugly dates for the gala...
    – Farray
    Commented Apr 13, 2011 at 16:50
  • I was thinking something like you marquee select the part you want to remove (ie. step 1) and then run the action. If I can just think of another way to accomplish step 4 then that would work.
    – jhocking
    Commented Apr 13, 2011 at 17:43
  • 1
    There would be no sane reason to ever do this... but I figured out an actionable replacement for step 4. (4a) select visible pixels (4b) invert selection (4c) transform selection and set width to max width with left anchor (4d) clear selection (4e) paste (4f) transform selection and set width to max width with right anchor (4g) clear selection (4h) paste (4i) select visible pixels (4j) invert selection (4k) delete layer (4l) align layer's left edge with selection (4m) flatten layer (4n) select visible pixels (4o) crop to selection. (4p) flatten visible layers Pheuw!!!
    – Farray
    Commented Apr 15, 2011 at 4:50

This isn't any better than jhocking's answer, but is a different way...

Double-offset the image, and then crop it.

  1. Duplicate your layer (drag it onto the New Layer icon at the bottom of the Layers palette)
  2. Offset the top layer to the left
    1. Filter > Other > Offset
    2. Set Horizontal to the negative sum of the pixels you are removing and where you want them to be removed from (-104 in your example)
    3. Make sure Undefined areas are set to transparent
  3. Offset the top layer back to the right
    1. Filter > Other > Offset
    2. Set Horizontal positive offset where you wanted the removal to start (+4 in your example)
    3. Make sure Undefined areas are set to transparent
  4. Reduce the canvas size
    1. Image > Canvas Size
    2. Reduce the width by the number of pixels you removed (reduce by 100 in your example)
    3. Make sure you choose an anchor point from the far-left column.
  5. Flatten the layers (Ctrl + E)

You can turn this into an Action if you need to do it to a bunch of images...

  • I like that you can turn this method into an Action, which you can't do with my approach. On the other hand, as an Action the offsets would be exactly the same each time, which may not be any use.
    – jhocking
    Commented Apr 13, 2011 at 16:16
  • @jhocking Yeah... I realized after-the-fact that this is as actionable as your step. The only real benefit would be that it's done with numeric inputs instead of staring at the Info palette. That said, I'd personally use your approach (select, clear, invert-select, copy, paste, ctrl+shift+move, crop) if I was doing this... no elegant answer, just have to use the tools. (But I kept feeling like "there has to be an easier way!" and there still isn't...)
    – Farray
    Commented Apr 13, 2011 at 16:48

I know it's an old question, but if this is a simple picture (no layers) like the PNG you mentioned, and if you have SnagIt (I tried with version 11.00), you can use the "Cut Out" functionality that lets you select an area and just collapse it horizontally or vertically.


I was looking to do the same type of thing. Easiest way for me to do it was create a new image with the desired dimensions. Copy the contents of the original image, and paste into the new image. Select the pixels on the left side of the original image with an easy to remember width (height of both images will be the same, so it doesn't matter.) Select the same rectangle in new image and paste. Repeat for right side. Worked fine for my simple needs.

Not the answer you're looking for? Browse other questions tagged or ask your own question.