Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

47 wiersze
1.5 KiB

  1. /*
  2. * commin.h: common stuff
  3. * $Id$
  4. *
  5. * Copyright: (c) 2004 Sam Hocevar <sam@zoy.org>
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the Do What The Fuck You Want To
  8. * Public License as published by Banlu Kemiyatorn. See
  9. * http://sam.zoy.org/projects/COPYING.WTFPL for more details.
  10. */
  11. /* image structure */
  12. struct image
  13. {
  14. int width, height, pitch, channels;
  15. unsigned char *pixels;
  16. void *priv;
  17. };
  18. /* debug function */
  19. void dprintf(const char *fmt, ...);
  20. /* available CAPTCHA decoders */
  21. char *decode_phpbb(struct image *img);
  22. char *decode_slashdot(struct image *img);
  23. char *decode_test(struct image *img);
  24. /* image operations */
  25. struct image *image_load(char *name);
  26. struct image *image_new(int width, int height);
  27. void image_free(struct image *img);
  28. void image_display(struct image *img);
  29. int getgray(struct image *img, int x, int y, int *g);
  30. int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
  31. int setpixel(struct image *img, int x, int y, int r, int g, int b);
  32. /* image filters */
  33. void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
  34. struct image *filter_fill_holes(struct image *img);
  35. struct image *filter_detect_lines(struct image *img);
  36. struct image *filter_equalize(struct image *img, int threshold);
  37. struct image *filter_trick(struct image *img);
  38. struct image *filter_smooth(struct image *img);
  39. struct image *filter_median(struct image *img);
  40. struct image *filter_contrast(struct image *img);