ccdemos/image.h
author Radek Brich <radek.brich@devl.cz>
Wed, 05 Dec 2007 18:54:23 +0100
branchpyrit
changeset 24 d0d76e8a5203
parent 15 a0a3e334744f
child 60 a23b5089b9c3
permissions -rw-r--r--
new C++ demo: realtime_dragon.cc class Container moved to its own source file (from kdtree.*) new directory for models and Makefile which downloads and prepares them fixed python module path in some forgotten demos ShapeList moved to scene.h

#ifndef IMAGE_H
#define IMAGE_H

#define IMG_GRAYSCALE	1
#define IMG_RGB		3

/* raw image */
struct image {
	int pixel_size;  /* should be 1 for grayscale and 3 for RGB*/
	int width;
	int height;
	char *data;
};

int new_image(struct image **img, int width, int height, int pixelsize);
int destroy_image(struct image **img);

int save_png(const char *fname, struct image *img);

#endif