Changeset 452


Ignore:
Timestamp:
01/12/05 03:00:33 (8 years ago)
Author:
sam
Message:
  • also blur borders in filter_blur().
File:
1 edited

Legend:

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

    r448 r452  
    292292    for(y = 0; y < img->height; y++) 
    293293        for(x = 0; x < img->width; x++) 
    294             setpixel(dst, x, y, 255, 255, 255); 
     294        { 
     295            getpixel(img, x, y, &r, &g, &b); 
     296            setpixel(dst, x, y, r, g, b); 
     297        } 
    295298 
    296299    for(y = SSIZE/2; y < img->height - SSIZE/2; y++) 
     
    308311            setpixel(dst, x, y, i, i, i); 
    309312        } 
     313 
     314    /* Remove border */ 
     315    for(y = 0; y < dst->height; y++) 
     316    { 
     317        getpixel(dst, 1, y, &r, &g, &b); 
     318        setpixel(dst, 0, y, r, g, b); 
     319        getpixel(dst, dst->width - 2, y, &r, &g, &b); 
     320        setpixel(dst, dst->width - 1, y, r, g, b); 
     321    } 
     322 
     323    for(x = 0; x < dst->width; x++) 
     324    { 
     325        getpixel(dst, x, 1, &r, &g, &b); 
     326        setpixel(dst, x, 0, r, g, b); 
     327        getpixel(dst, x, dst->height - 2, &r, &g, &b); 
     328        setpixel(dst, x, dst->height - 1, r, g, b); 
     329    } 
    310330 
    311331    image_swap(img, dst); 
Note: See TracChangeset for help on using the changeset viewer.