I think it should be a very simple problem, but I cannot find a solution or an effective keyword for search.
I just have this image.

The black edges are useless so that I want to cut them, only leaving the Windows icon (and the blue background).
I do not want to calculate the coordinate and the size of the Windows icon. GIMP and Photoshop have sort of autocrop function. OpenCV does not have one?
I am not sure whether all your images are like this. But for this image, below is a simple python-opencv code to crop it.
first import libraries :
Read the image, convert it into grayscale, and make in binary image for threshold value of 1.
Now find contours in it. There will be only one object, so find bounding rectangle for it.
Now crop the image, and save it into another file.
Below is the result :