Browse Source

* fixed bound error in filter_contrast

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@441 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 20 years ago
parent
commit
1a28bcb810
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/filters.c

+ 1
- 1
src/filters.c View File

@@ -383,7 +383,7 @@ struct image *filter_contrast(struct image *img)
if(min == max) if(min == max)
histo[min] = 127; histo[min] = 127;
else else
for(i = min; i < max; i++)
for(i = min; i < max + 1; i++)
histo[i] = (i - min) * 255 / (max - min); histo[i] = (i - min) * 255 / (max - min);


for(y = 0; y < img->height; y++) for(y = 0; y < img->height; y++)


Loading…
Cancel
Save