source: pwntcha/trunk/src/common.h @ 402

Last change on this file since 402 was 402, checked in by Sam Hocevar, 16 years ago
  • print colour count in debug messages
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1/*
2 * commin.h: common stuff
3 * $Id: common.h 402 2005-01-04 02:59:22Z sam $
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
12/* image structure */
13struct image
14{
15    int width, height, pitch, channels;
16    unsigned char *pixels;
17    void *priv;
18};
19
20/* debug function */
21void dprintf(const char *fmt, ...);
22
23/* available CAPTCHA decoders */
24char *decode_phpbb(struct image *img);
25char *decode_scode(struct image *img);
26char *decode_slashdot(struct image *img);
27char *decode_test(struct image *img);
28
29/* image operations */
30struct image *image_load(char *name);
31struct image *image_new(int width, int height);
32void image_free(struct image *img);
33void image_display(struct image *img);
34int getgray(struct image *img, int x, int y, int *g);
35int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
36int setpixel(struct image *img, int x, int y, int r, int g, int b);
37
38/* image filters */
39void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
40struct image *filter_fill_holes(struct image *img);
41struct image *filter_dup(struct image *img);
42struct image *filter_detect_lines(struct image *img);
43struct image *filter_equalize(struct image *img, int threshold);
44struct image *filter_trick(struct image *img);
45struct image *filter_smooth(struct image *img);
46struct image *filter_median(struct image *img);
47struct image *filter_contrast(struct image *img);
48int filter_count(struct image *img);
49
Note: See TracBrowser for help on using the repository browser.