I have about 100 scanned pictures (.jpg), all with black borders (top/right/bottom/left), like this:
I want to trim my picture automatically, that it is without ANY black border.
I tried different codes, the best result I get with this code (I use Imagemagick Version 7.0.7-Q16 for Windows):
magick mogrify -bordercolor black -fuzz 20% -trim -format jpg *.jpg
It generates this picture:
Which is a good start, but as you can still see there is a rest of the black border on the top, right, bottom and left side of the image and two black areas in the sky .
I want that the picture looks like this:
How can I do this?
Any help or hint for my problem will be appreciated! Thanks in advance!