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

Last change on this file since 416 was 414, checked in by Sam Hocevar, 18 years ago
  • vbulletin captcha support.
  • Property svn:keywords set to Id
File size: 1.9 KB
RevLine 
[382]1/*
2 * commin.h: common stuff
3 * $Id: common.h 414 2005-01-04 17:07: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 */
[381]11
12/* image structure */
13struct image
14{
15    int width, height, pitch, channels;
16    unsigned char *pixels;
17    void *priv;
18};
19
[392]20/* debug function */
21void dprintf(const char *fmt, ...);
22
[381]23/* available CAPTCHA decoders */
[389]24char *decode_phpbb(struct image *img);
[398]25char *decode_scode(struct image *img);
[389]26char *decode_slashdot(struct image *img);
[414]27char *decode_vbulletin(struct image *img);
[389]28char *decode_test(struct image *img);
[381]29
30/* image operations */
[413]31struct image *image_load(const char *name);
[389]32struct image *image_new(int width, int height);
33void image_free(struct image *img);
[413]34void image_save(struct image *img, const char *name);
[389]35void image_display(struct image *img);
[381]36int getgray(struct image *img, int x, int y, int *g);
37int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
38int setpixel(struct image *img, int x, int y, int r, int g, int b);
39
[385]40/* image filters */
[387]41void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
42struct image *filter_fill_holes(struct image *img);
[398]43struct image *filter_dup(struct image *img);
[413]44struct image *filter_black_stuff(struct image *img);
[387]45struct image *filter_detect_lines(struct image *img);
[389]46struct image *filter_equalize(struct image *img, int threshold);
[387]47struct image *filter_trick(struct image *img);
48struct image *filter_smooth(struct image *img);
49struct image *filter_median(struct image *img);
[389]50struct image *filter_contrast(struct image *img);
[413]51struct image *filter_crop(struct image *img,
52                          int xmin, int ymin, int xmax, int ymax);
[402]53int filter_count(struct image *img);
[385]54
Note: See TracBrowser for help on using the repository browser.