Ignore:
Timestamp:
Jan 3, 2005, 4:29:46 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • renamed a few functions
File:
1 edited

Legend:

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

    r385 r387  
    2525
    2626/* Functions */
    27 void flood_fill(struct image *img, int x, int y, int r, int g, int b)
     27void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b)
    2828{
    2929    int oldr, oldg, oldb;
     
    3838    getpixel(img, x + 1, y, &nextr, &nextg, &nextb);
    3939    if(nextr == oldr && nextg == oldg && nextb == oldb)
    40         flood_fill(img, x + 1, y, r, g, b);
     40        filter_flood_fill(img, x + 1, y, r, g, b);
    4141
    4242    getpixel(img, x - 1, y, &nextr, &nextg, &nextb);
    4343    if(nextr == oldr && nextg == oldg && nextb == oldb)
    44         flood_fill(img, x - 1, y, r, g, b);
     44        filter_flood_fill(img, x - 1, y, r, g, b);
    4545
    4646    getpixel(img, x, y + 1, &nextr, &nextg, &nextb);
    4747    if(nextr == oldr && nextg == oldg && nextb == oldb)
    48         flood_fill(img, x, y + 1, r, g, b);
     48        filter_flood_fill(img, x, y + 1, r, g, b);
    4949
    5050    getpixel(img, x, y - 1, &nextr, &nextg, &nextb);
    5151    if(nextr == oldr && nextg == oldg && nextb == oldb)
    52         flood_fill(img, x, y - 1, r, g, b);
    53 }
    54 
    55 struct image *fill_holes(struct image *img)
     52        filter_flood_fill(img, x, y - 1, r, g, b);
     53}
     54
     55struct image *filter_fill_holes(struct image *img)
    5656{
    5757    struct image *dst;
     
    5959    int r, g, b;
    6060
    61     dst = new_image(img->width, img->height);
     61    dst = image_new(img->width, img->height);
    6262
    6363    for(y = 0; y < img->height; y++)
     
    103103}
    104104
    105 struct image *detect_lines(struct image *img)
     105struct image *filter_detect_lines(struct image *img)
    106106{
    107107    struct image *dst;
     
    109109    int r, ra, rb, g, b;
    110110
    111     dst = new_image(img->width, img->height);
     111    dst = image_new(img->width, img->height);
    112112
    113113    /* Remove white lines */
     
    143143}
    144144
    145 struct image *equalize(struct image *img)
     145struct image *filter_equalize(struct image *img)
    146146{
    147147    struct image *dst;
     
    149149    int r, g, b;
    150150
    151     dst = new_image(img->width, img->height);
     151    dst = image_new(img->width, img->height);
    152152
    153153    for(y = 0; y < img->height; y++)
     
    162162}
    163163
    164 struct image *trick(struct image *img)
     164struct image *filter_trick(struct image *img)
    165165{
    166166#define TSIZE 3
     
    169169    int r, g, b;
    170170
    171     dst = new_image(img->width, img->height);
     171    dst = image_new(img->width, img->height);
    172172
    173173    for(y = 0; y < img->height; y++)
     
    208208}
    209209
    210 struct image *smooth(struct image *img)
     210struct image *filter_smooth(struct image *img)
    211211{
    212212#define SSIZE 3
     
    215215    int r, g, b;
    216216
    217     dst = new_image(img->width, img->height);
     217    dst = image_new(img->width, img->height);
    218218
    219219    for(y = 0; y < img->height; y++)
     
    239239}
    240240
    241 struct image *median(struct image *img)
     241struct image *filter_median(struct image *img)
    242242{
    243243#define MSIZE 4
     
    246246    int r, g, b;
    247247
    248     dst = new_image(img->width, img->height);
     248    dst = image_new(img->width, img->height);
    249249
    250250    for(y = 0; y < img->height; y++)
Note: See TracChangeset for help on using the changeset viewer.