title: Bitmap Bounding Rectangle Algorithm C++
body: <p>I currently have my bitmap pixel data stored in an array of chars. I was wondering what would be the most effective algorithm to crop my image based on my image's bounding box.</p>
  
  <p>I've included a relatively accurate example of what I'd like to achieve below. Based on a base "pixel colour".</p>
  
  <p><a href="http://imageshack.us/photo/my-images/88/22617808.jpg" rel="nofollow noreferrer">Bounding Box Example</a></p>
  
  <p><img src="https://i.stack.imgur.com/umLW7.jpg" alt="Bounding Box Example"></p>