2011-12-15 12:59:21 -05:00
|
|
|
$OpenBSD: patch-cimg_cc,v 1.2 2011/12/15 17:59:21 fgsch Exp $
|
2011-07-08 16:36:09 -04:00
|
|
|
|
|
|
|
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) {
|
2011-07-08 16:36:09 -04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|