You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 rivejä
646 B

  1. #include "config.h"
  2. #include "common.h"
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <pipi.h>
  7. int main(int argc, char *argv[])
  8. {
  9. char *srcname = NULL, *dstname = NULL;
  10. pipi_image_t *img, *newimg;
  11. if(argc < 3)
  12. {
  13. fprintf(stderr, "%s: too few arguments\n", argv[0]);
  14. fprintf(stderr, "Usage: %s <src> <radius> <dest>\n", argv[0]);
  15. return EXIT_FAILURE;
  16. }
  17. srcname = argv[1];
  18. dstname = argv[3];
  19. img = pipi_load(srcname);
  20. newimg = pipi_gaussian_blur(img, atof(argv[2]));
  21. pipi_free(img);
  22. pipi_save(newimg, dstname);
  23. pipi_free(newimg);
  24. return 0;
  25. }