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

Last change on this file since 430 was 430, checked in by Sam Hocevar, 16 years ago
  • support for -s / --share
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * commin.h: common stuff
3 * $Id: common.h 430 2005-01-06 00:51:07Z 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/* global variables */
21extern char *share;
22
23/* debug function */
24void dprintf(const char *fmt, ...);
25
26/* available CAPTCHA decoders */
27char *decode_authimage(struct image *img);
28char *decode_clubic(struct image *img);
29char *decode_linuxfr(struct image *img);
30char *decode_phpbb(struct image *img);
31char *decode_scode(struct image *img);
32char *decode_slashdot(struct image *img);
33char *decode_vbulletin(struct image *img);
34char *decode_test(struct image *img);
35
36/* image operations */
37struct image *image_load(const char *name);
38struct image *image_new(int width, int height);
39void image_free(struct image *img);
40void image_save(struct image *img, const char *name);
41int getgray(struct image *img, int x, int y, int *g);
42int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
43int setpixel(struct image *img, int x, int y, int r, int g, int b);
44
45/* image filters */
46void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
47struct image *filter_fill_holes(struct image *img);
48struct image *filter_dup(struct image *img);
49struct image *filter_scale(struct image *img, float ratio);
50struct image *filter_black_stuff(struct image *img);
51struct image *filter_detect_lines(struct image *img);
52struct image *filter_equalize(struct image *img, int threshold);
53struct image *filter_trick(struct image *img);
54struct image *filter_smooth(struct image *img);
55struct image *filter_median(struct image *img);
56struct image *filter_contrast(struct image *img);
57struct image *filter_crop(struct image *img,
58                          int xmin, int ymin, int xmax, int ymax);
59int filter_count(struct image *img);
60
Note: See TracBrowser for help on using the repository browser.