Ignore:
Timestamp:
Jan 4, 2005, 7:43:28 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • do equalizing on grayscale image.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk/src/filters.c

    r413 r417  
    217217    }
    218218
    219     for(y = 0; y < img->height; y++)
    220         for(x = 0; x < img->width; x++)
    221         {
    222             getpixel(img, x, y, &r, &g, &b);
    223             if(r < threshold)
     219    threshold *= 3;
     220
     221    for(y = 0; y < img->height; y++)
     222        for(x = 0; x < img->width; x++)
     223        {
     224            getpixel(img, x, y, &r, &g, &b);
     225            if(r + g + b < threshold)
    224226                setpixel(dst, x, y, min, min, min);
    225227            else
Note: See TracChangeset for help on using the changeset viewer.