Automatically crop image boundaries
===

I'm looking for an automatic way to grab a piece of a bitmap and extract a certain part of it.
Let me explain:
If I have this image:![butterfly](http://i.imgur.com/B9U9E.png)
http://imgur.com/B9U9E

It has a big white border. (see link for better white result) I'm looking for a way to only grab the dialog above. So no white borders around the dialog. Is there a way to do this by code or with a library?