Fix IndexOutOfBoundsException when retrieving min and max from image

The histogram class does excludes the max value, hence an exception ocurs when we try to add the maximum value.
This fix increases the max value by 1 when min/max are retrieved from the image.
Merge pull request #22 from sebp/unittest-fix

Fix IndexOutOfBoundsException when retrieving min and max from image