|
@@ -76,16 +76,16 @@ namespace bbiwarg.Images
|
|
|
Int16 minDepth = getMinDepth();
|
|
|
Int16 maxDepth = getMaxDepth();
|
|
|
|
|
|
- histogram = new int[maxDepth - minDepth];
|
|
|
+ histogram = new int[maxDepth - minDepth + 1];
|
|
|
for (int x = 0; x < width; ++x)
|
|
|
{
|
|
|
for (int y = 0; y < height; ++y)
|
|
|
{
|
|
|
int depth = getDepth(x, y);
|
|
|
- if (depth != maxDepth)
|
|
|
- histogram[depth - minDepth]++;
|
|
|
+ histogram[depth - minDepth]++;
|
|
|
}
|
|
|
}
|
|
|
+ histogram[maxDepth - minDepth] = 0;
|
|
|
|
|
|
return histogram;
|
|
|
}
|