How shall I crop images with 2 colour borders in Python?

Viewed 46

My original image was this:enter image description here

After I rotate them, I got this: enter image description here

Therefore, I am currently having both black and white borders. I only want the middle part of the image, how can I crop them with Python?

I am new here, appreciate if anyone can help! Thanks in advance.

0 Answers
Related