How to crop borders/white spaces from image?

I have a lot of images which have white borders around them. I would like to crop those borders all at once, preferably from command line. I believe that it can be done with ImageMagick, but I coul...