/*---------------------------------------------------------------------------*/
-void image_snap(char *filename)
+void image_snap(const char *filename)
{
FILE *filep = NULL;
png_structp writep = NULL;
/* Allocate and initialize the row pointers. */
- if ((bytep = png_malloc(writep, h * sizeof (png_bytep))))
+ if ((bytep = (png_bytep *) png_malloc(writep, h * sizeof (png_bytep))))
{
for (i = 0; i < h; ++i)
bytep[h - i - 1] = (png_bytep) (p + i * w * 3);