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

Last change on this file since 438 was 438, checked in by Sam Hocevar, 16 years ago
  • use IPicture's DC instead of CreateCompatibleDC.
  • nicer error message.
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * commin.h: common stuff
3 * $Id: common.h 438 2005-01-09 00:24:24Z 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 *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);
40void image_free(struct image *img);
41void image_save(struct image *img, const char *name);
42int getgray(struct image *img, int x, int y, int *g);
43int getpixel(struct image *img, int x, int y, int *r, int *g, int *b);
44int setpixel(struct image *img, int x, int y, int r, int g, int b);
45
46/* image filters */
47void filter_flood_fill(struct image *img, int x, int y, int r, int g, int b);
48struct image *filter_fill_holes(struct image *img);
49struct image *filter_dup(struct image *img);
50struct image *filter_scale(struct image *img, float ratio);
51struct image *filter_black_stuff(struct image *img);
52struct image *filter_detect_lines(struct image *img);
53struct image *filter_equalize(struct image *img, int threshold);
54struct image *filter_trick(struct image *img);
55struct image *filter_smooth(struct image *img);
56struct image *filter_median(struct image *img);
57struct image *filter_contrast(struct image *img);
58struct image *filter_crop(struct image *img,
59                          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.