| 104 | } |
| 105 | |
| 106 | image border_image(image a, int border) |
| 107 | { |
| 108 | image b = make_image(a.w + 2*border, a.h + 2*border, a.c); |
| 109 | int x,y,k; |
| 110 | for(k = 0; k < b.c; ++k){ |
| 111 | for(y = 0; y < b.h; ++y){ |
| 112 | for(x = 0; x < b.w; ++x){ |
| 113 | float val = get_pixel_extend(a, x - border, y - border, k); |
| 114 | if(x - border < 0 || x - border >= a.w || y - border < 0 || y - border >= a.h) val = 1; |
| 115 | set_pixel(b, x, y, k, val); |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | return b; |
| 120 | } |
| 121 | |
| 122 | image tile_images(image a, image b, int dx) |
| 123 | { |
no test coverage detected