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

Revision 445, 2.0 KB checked in by sam, 8 years ago (diff)
  • don't duplicate picture in filter functions.
  • removed OLE code; it doesn't work and won't be needed.
  • Property svn:keywords set to Id
Line 
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
12/* image structure */
13struct image
14{
15    int width, height, pitch, channels;
16    unsigned char *pixels;
17    void *priv;
18};
19
20/* global variables */
21extern char *argv0;
22extern char *share;
23
24/* debug function */
25void dprintf(const char *fmt, ...);
26
27/* available CAPTCHA decoders */
28char *decode_authimage(struct image *img);
29char *decode_clubic(struct image *img);
30char *decode_linuxfr(struct image *img);
31char *decode_phpbb(struct image *img);
32char *decode_scode(struct image *img);
33char *decode_slashdot(struct image *img);
34char *decode_vbulletin(struct image *img);
35char *decode_test(struct image *img);
36
37/* image operations */
38struct image *image_load(const char *name);
39struct image *image_new(int width, int height);
40struct image *image_dup(struct image *img);
41void image_free(struct image *img);
42void image_save(struct image *img, const char *name);
43void image_swap(struct image *img1, struct image *img2);
44int getgray(struct image *img, int x, int y, int *g);
45int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
46int setpixel(struct image *img, int x, int y, int r, int g, int b);
47
48/* image filters */
49void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
50void filter_fill_holes(struct image *img);
51void filter_scale(struct image *img, float ratio);
52void filter_black_stuff(struct image *img);
53void filter_detect_lines(struct image *img);
54void filter_equalize(struct image *img, int threshold);
55void filter_trick(struct image *img);
56void filter_smooth(struct image *img);
57void filter_median(struct image *img);
58void filter_contrast(struct image *img);
59void filter_crop(struct image *img, int xmin, int ymin, int xmax, int ymax);
60int filter_count(struct image *img);
61
Note: See TracBrowser for help on using the repository browser.