methods.h 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef METHODS_H
  2. #define METHODS_H
  3. #include "libspngstream.h"
  4. #define METHODS 21
  5. #define MAX_BRT 254
  6. /* methods */
  7. void superpos(spng*);
  8. void invert(spng*);
  9. void flip(spng*);
  10. void scanlines(spng*);
  11. void burn(spng*);
  12. void toonstep(spng*, int);
  13. void toon(spng*);
  14. void toonextreme(spng*);
  15. void pinkify(spng*);
  16. void more_x(spng*, int);
  17. void morered(spng*);
  18. void moreblue(spng*);
  19. void moregreen(spng*);
  20. void moreblack(spng*);
  21. void lessred(spng*);
  22. void lessblue(spng*);
  23. void lessgreen(spng*);
  24. void lessblack(spng*);
  25. void average_x(spng*, int);
  26. void averagered(spng*);
  27. void averageblue(spng*);
  28. void averagegreen(spng*);
  29. void edge(spng*);
  30. void gauss(spng*);
  31. struct methods {
  32. char *name;
  33. void (*f)(spng*);
  34. };
  35. extern struct methods t[METHODS];
  36. /* utility functions */
  37. void apply_method(spng*, void(*method)(spng*));
  38. void apply_kernel(spng*, float(*k)[], int);
  39. int mult_by_kernel(png_byte(*s)[], float(*k)[], int);
  40. #endif