1 --- a/cimg.cc 2014-05-25 02:41:58.000000000 -0500
2 +++ b/cimg.cc 2014-05-25 02:42:31.000000000 -0500
4 ct == PNG_COLOR_TYPE_GRAY_ALPHA)
5 png_set_gray_to_rgb(pngp);
7 - alloc(pngp->width,pngp->height);
8 + alloc(png_get_image_width(pngp, infp),png_get_image_height(pngp, infp));
9 if (!ok) { fclose(f); return; }
12 - for(i=0;i<pngp->height;i++) {
13 + for(i=0;i<png_get_image_height(pngp, infp);i++) {
14 png_read_row(pngp, (png_bytep) (&data[i*rowlen]), NULL);