ccdemos/image.h
author Radek Brich <radek.brich@devl.cz>
Mon, 14 Apr 2008 12:51:50 +0200
branchpyrit
changeset 69 303583d2fb97
parent 60 a23b5089b9c3
permissions -rw-r--r--
move "smooth" attribute from Triangle to Material lwo reader enhancements - implement more chunk types, support for smoothing flag and SMAN (smoothing max. angle)

#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;
	unsigned char *data;
};

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

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

#endif