File: ppmtool.h

package info (click to toggle)
gimp 2.2.13-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 94,832 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (43 lines) | stat: -rw-r--r-- 1,377 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __PPM_TOOL_H
#define __PPM_TOOL_H

#include <glib.h>

typedef struct ppm {
  int width;
  int height;
  unsigned char *col;
} ppm_t;

void fatal(char *s);
void ppm_kill(ppm_t *p);
void ppm_new(ppm_t *p, int xs, int ys);
void get_rgb(ppm_t *s, float xo, float yo, unsigned char *d);
void resize(ppm_t *p, int nx, int ny);
void rescale(ppm_t *p, double scale);
void resize_fast(ppm_t *p, int nx, int ny);
void ppm_load(const char *fn, ppm_t *p);
void ppm_save(ppm_t *p, const char *fn);
void ppm_copy(ppm_t *s, ppm_t *p);
void fill(ppm_t *p, guchar *c);
void free_rotate(ppm_t *p, double amount);
void ppm_pad(ppm_t *p, int left,int right, int top, int bottom, guchar *);
void edgepad(ppm_t *p, int left,int right, int top, int bottom);
void autocrop(ppm_t *p, int room);
void crop(ppm_t *p, int lx, int ly, int hx, int hy);
void ppm_apply_gamma(ppm_t *p, float e, int r, int g, int b);
void ppm_apply_brightness(ppm_t *p, float e, int r, int g, int b);
void ppm_put_rgb_fast(ppm_t *s, float xo, float yo, guchar *d);
void ppm_put_rgb(ppm_t *s, float xo, float yo, guchar *d);
void ppm_drawline(ppm_t *p, float fx, float fy, float tx, float ty, guchar *col);

void repaint(ppm_t *p, ppm_t *a);

void blur(ppm_t *p, int xrad, int yrad);

void mkgrayplasma(ppm_t *p, float turb);

#define PPM_IS_INITED(ppm_ptr) ((ppm_ptr)->col != NULL)

#endif /* #ifndef __PPM_TOOL_H */