If you want a similar result to the example you posted, then there's no tool to automate this in Photoshop or GIMP like in your example. You'd need to do it manually: Cut a portion of an image, paste as a new layer, reposition it, and then crop the image.
However, I honestly can't see the point in cutting up an image like your example - it will look absolutely terrible. If your goal is to change the aspect ratio of an image without distorting the content too much, there are much better ways to do this. In Photoshop you could use Content Aware Scaling.
An example in Photoshop, you'd need to crop the image afterwards.

This is also possible in GIMP using the Liquid Rescale plugin. After installation, restart GIMP. Then you open the plugin using the main menu Layer > Liquid Rescale, go into the Interactive Mode, and type in a new image width. No need to crop separately here, as the plugin does it for you. There's also a protected areas mask if you want to tweak this for optimal results
