#include "config.h" #include #include #include #include double kern[] = { 0., -.0625, -.125, -.0625, 0., -.0625, -.125, -.25, -.125, -.0625, -.125, -.25, 3.5, -.25, -.125, -.0625, -.125, -.25, -.125, -.0625, 0., -.0625, -.125, -.0625, 0., }; int main(int argc, char *argv[]) { char *srcname = NULL, *dstname = NULL; pipi_image_t *img, *newimg; if(argc < 3) { fprintf(stderr, "%s: too few arguments\n", argv[0]); fprintf(stderr, "Usage: %s \n", argv[0]); return EXIT_FAILURE; } srcname = argv[1]; dstname = argv[2]; img = pipi_load(srcname); newimg = pipi_convolution(img, 5, 5, kern); pipi_free(img); pipi_save(newimg, dstname); pipi_free(newimg); return 0; }