openbsd-ports/games/eboard/patches/patch-cimg_cc

21 lines
611 B
Plaintext
Raw Normal View History

2011-12-15 12:59:21 -05:00
$OpenBSD: patch-cimg_cc,v 1.2 2011/12/15 17:59:21 fgsch Exp $
Fix build with png-1.5.
2011-12-15 12:59:21 -05:00
--- cimg.cc.orig Wed Dec 14 23:31:38 2011
+++ cimg.cc Wed Dec 14 23:32:22 2011
@@ -94,11 +94,11 @@ CImg::CImg(const char *filename) {
ct == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb(pngp);
- alloc(pngp->width,pngp->height);
+ alloc(png_get_image_width(pngp, infp),png_get_image_height(pngp, infp));
if (!ok) { fclose(f); return; }
ok = 0;
- for(i=0;i<pngp->height;i++) {
+ for(i=0;i<png_get_image_height(pngp, infp);i++) {
png_read_row(pngp, (png_bytep) (&data[i*rowlen]), NULL);
}