author | Radek Brich <radek.brich@devl.cz> |
Sat, 19 Apr 2008 18:00:27 +0200 | |
branch | pyrit |
changeset 71 | 4fedf7290929 |
parent 60 | a23b5089b9c3 |
permissions | -rw-r--r-- |
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
1 |
#ifndef IMAGE_H |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
2 |
#define IMAGE_H |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
3 |
|
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
4 |
#define IMG_GRAYSCALE 1 |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
5 |
#define IMG_RGB 3 |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
6 |
|
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
7 |
/* raw image */ |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
8 |
struct image { |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
9 |
int pixel_size; /* should be 1 for grayscale and 3 for RGB*/ |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
10 |
int width; |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
11 |
int height; |
60
a23b5089b9c3
moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
12 |
unsigned char *data; |
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
13 |
}; |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
14 |
|
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
15 |
int new_image(struct image **img, int width, int height, int pixelsize); |
60
a23b5089b9c3
moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
15
diff
changeset
|
16 |
void destroy_image(struct image **img); |
15
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
17 |
|
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
18 |
int save_png(const char *fname, struct image *img); |
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
19 |
|
a0a3e334744f
C++ demos: prepare infrastructure, add spheres_shadow.cc
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
20 |
#endif |