Greenshot has a built-in Auto-Crop feature, but it only works when the background is a uniform color.
However, Greenshot does have an "External Commands" plugin, which you can use to run one of the scripts from your code golf question.
Here's an updated version of @DenDenDo's delrows
Python script:
#delrows.py, from DenDenDo at https://codegolf.stackexchange.com/a/46964
import imageio
from matplotlib import pylab
from pylab import *
from sys import argv
from subprocess import call
threshold = int(argv[2])
def delrows(im, threshold):
d = diff(im, axis=0)
mask = where(sum((d!=0), axis=(1,2))>threshold)
return transpose(im[mask], (1,0,2))
im7 = imageio.imread(argv[1])
newFile = argv[1] + "_" + argv[2] + ".png"
file = imageio.imwrite(newFile, delrows(delrows(im7,threshold),threshold))
call(["C:\Program Files\Greenshot\Greenshot.exe",newFile])
Setup (Windows)
If necessary, replace C:\Program Files\Greenshot\Greenshot.exe
in the last line of delrows.py
with the actual path of greenshot.exe
.
Save the script, e.g. C:\Programmes\seam-carving\delrows.py
.
Install Greenshot and Python 3.
Install the needed Python modules with Pip:
pip install imageio matplotlib pillow numpy
Click the Greenshot icon in the notification area and go to "Quick Preferences" > "Destination" > "Open in Image Editor".
Click the Greenshot icon in the notification area again and select "Configure External Commands."

Click "New".
For "Name", enter "Auto-Chop".
For "Command", enter the full path to python.exe, e.g. C:\Python37\python.exe
For "Argument", enter the full path to delrows.py
, in quotation marks, followed by a space, "{0}"
, space, and the threshold
value. For example:
"C:\Programmes\seam-carving\delrows.py" "{0}" 29
(Remember, the threshold
value is how many pixels can differ for two lines to be considered the same, so start small and increase as needed)
Click "OK" and "OK" to save your settings.

Usage
Hit Print Screen and select a region of your screen to capture.
The region opens in the Greenshot Image Editor. Select the "Auto-Chop" button in the toolbar at the top.

The script runs, and the auto-chopped screenshot opens in a new Greenshot window.

If too much was chopped, decrease the Threshold value in step 10 of the setup. If not enough was chopped, increase the Threshold value and try again.
Features
- Can open image files from clipboard, disk, or by capturing directly.
- Automatically removes identical or similar columns and rows from the image.
- Result can be copied to clipboard or saved to file.
- Offline program for Windows
- Gratis
- Includes other built-in editing tools (ellipse, arrow, blur, add text, counter, etc.)