Update entropy algorithm

I discovered your code through a blog post on /r/programming. I decided to write about how it worked, but found it didn't seem to work for me. 

I updated the algorithm in the crop function call to get the results I expected, though this could be completely wrong. I wanted to submit a pull request with my changes, to see if I am close or way off. 

You can find my blog post on my site, envalo dot com.