mzapo_canvas.c
int SavePNGFromCanvas(const char *filename, Canvas *img_canvas){
	/*Encode the image*/
	unsigned error = lodepng_encode24_file(filename, img_canvas->img, img_canvas->w, img_canvas->h);

	if (error) { // If there's an error, display it
		printf("error %u: %s\n", error, lodepng_error_text(error));
		return -1; // Error
	} else {
		return 1; // Success
	}
}
/////////////// PNG operations //////////////////
/* 
	Save PNG from struct canvas to path 'filename' 
*/
PNG operations
Save PNG from struct canvas to path 'filename'
PNG operations Save PNG from struct canvas to path ' filename '
int SavePNGFromCanvas(const char *filename, Canvas *img_canvas){
	unsigned error = lodepng_encode24_file(filename, img_canvas->img, img_canvas->w, img_canvas->h);
	if (error) { 
		printf("error %u: %s\n", error, lodepng_error_text(error));
		return -1; 
	} else {
		return 1; 
	}
}
int SavePNGFromCanvas ( const char * filename , Canvas * img_canvas ) { unsigned error = lodepng_encode24_file ( filename , img_canvas -> img , img_canvas -> w , img_canvas -> h ) ; if ( error ) { printf ( " \n " , error , lodepng_error_text ( error ) ) ; return -1 ; } else { return 1 ; } }
PNG operations
Save PNG from struct canvas to path 'filename'
PNG operations Save PNG from struct canvas to path ' filename '
/*Encode the image*/ // If there's an error, display it // Error // Success