ccdemos/image.h
branchpyrit
changeset 60 a23b5089b9c3
parent 15 a0a3e334744f
equal deleted inserted replaced
59:64e456ab823d 60:a23b5089b9c3
     7 /* raw image */
     7 /* raw image */
     8 struct image {
     8 struct image {
     9 	int pixel_size;  /* should be 1 for grayscale and 3 for RGB*/
     9 	int pixel_size;  /* should be 1 for grayscale and 3 for RGB*/
    10 	int width;
    10 	int width;
    11 	int height;
    11 	int height;
    12 	char *data;
    12 	unsigned char *data;
    13 };
    13 };
    14 
    14 
    15 int new_image(struct image **img, int width, int height, int pixelsize);
    15 int new_image(struct image **img, int width, int height, int pixelsize);
    16 int destroy_image(struct image **img);
    16 void destroy_image(struct image **img);
    17 
    17 
    18 int save_png(const char *fname, struct image *img);
    18 int save_png(const char *fname, struct image *img);
    19 
    19 
    20 #endif
    20 #endif