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

Last change on this file since 390 was 389, checked in by Sam Hocevar, 18 years ago
  • use OpenCV rather than Imlib2 if both are available.
  • cleaned up the slashdot code.
  • decode phpBB captchas.
  • added filter_contrast.
  • Property svn:keywords set to Id
File size: 1.4 KB
2 * commin.h: common stuff
3 * $Id: common.h 389 2005-01-03 21:48:54Z sam $
4 *
5 * Copyright: (c) 2004 Sam Hocevar <>
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 * for more details.
10 */
12/* image structure */
13struct image
15    int width, height, pitch, channels;
16    unsigned char *pixels;
17    void *priv;
20/* available CAPTCHA decoders */
21char *decode_phpbb(struct image *img);
22char *decode_slashdot(struct image *img);
23char *decode_test(struct image *img);
25/* image operations */
26struct image *image_load(char *name);
27struct image *image_new(int width, int height);
28void image_free(struct image *img);
29void image_display(struct image *img);
30int getgray(struct image *img, int x, int y, int *g);
31int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
32int setpixel(struct image *img, int x, int y, int r, int g, int b);
34/* image filters */
35void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
36struct image *filter_fill_holes(struct image *img);
37struct image *filter_detect_lines(struct image *img);
38struct image *filter_equalize(struct image *img, int threshold);
39struct image *filter_trick(struct image *img);
40struct image *filter_smooth(struct image *img);
41struct image *filter_median(struct image *img);
42struct image *filter_contrast(struct image *img);
Note: See TracBrowser for help on using the repository browser.