ccdemos/image.c
branchpyrit
changeset 60 a23b5089b9c3
parent 27 e9bb83c2b8b9
--- a/ccdemos/image.c	Fri Apr 04 13:54:47 2008 +0200
+++ b/ccdemos/image.c	Tue Apr 08 01:05:12 2008 +0200
@@ -43,11 +43,11 @@
 	(*img)->pixel_size = pixelsize;
 	(*img)->width = width;
 	(*img)->height = height;
-	(*img)->data = (char *) malloc(width * height * pixelsize);
+	(*img)->data = (unsigned char *) malloc(width * height * pixelsize);
 	return(0);
 }
 
-int destroy_image(struct image **img)
+void destroy_image(struct image **img)
 {
 	free((*img)->data);
 	free(*img);
@@ -61,7 +61,7 @@
 	FILE *f;
 	png_structp png;   /* PNG data */
 	png_infop pnginfo; /* PNG info */
-	char *data;
+	unsigned char *data;
 
 	if ((f = fopen(fname, "wb")) == NULL)
 		return (0);