I need to extract the biggest (area) rectangle which contains no transparent pixels from a picture.
Here’s an exemple (maybe this hand made solution is wrong though):
I find some link about principles (in python) or same topic related issue (here) but without any answer.
Is it possible to make it with Imagemagick? or any command-line tool on linux?


I didn’t find a command-line based tool to do that, so I ‘forked’ the version proposed by zed (J.F. Sebastian here) on github : largest_rectangle script by zed.