diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2010-01-28 10:11:31 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2010-01-28 10:11:31 +0000 |
commit | b3ba443c643946af8a69ccd31c7245b9fa19b53a (patch) | |
tree | dab5fdd0c028998d4ce5a12ec196044588113343 /image | |
parent | 8e1b4a0061bb059fec1238d1c3a23ed6610459e0 (diff) | |
download | netsurf-b3ba443c643946af8a69ccd31c7245b9fa19b53a.tar.gz netsurf-b3ba443c643946af8a69ccd31c7245b9fa19b53a.tar.bz2 |
update png handler to not use deprecated/removed call.
improve type usage to avoid incompatible pointer type warnings on newer libpng versions.
svn path=/trunk/netsurf/; revision=9921
Diffstat (limited to 'image')
-rw-r--r-- | image/png.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/image/png.c b/image/png.c index c51b89125..4fe7c982a 100644 --- a/image/png.c +++ b/image/png.c @@ -133,7 +133,7 @@ void info_callback(png_structp png, png_infop info) { int bit_depth, color_type, interlace, intent; double gamma; - unsigned long width, height; + png_uint_32 width, height; struct content *c = png_get_progressive_ptr(png); /* Read the PNG details */ @@ -154,7 +154,7 @@ void info_callback(png_structp png, png_infop info) if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png); if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_gray_1_2_4_to_8(png); + png_set_expand_gray_1_2_4_to_8(png); if (png_get_valid(png, info, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png); if (bit_depth == 16) @@ -185,8 +185,8 @@ void info_callback(png_structp png, png_infop info) c->width = width; c->height = height; - LOG(("size %li * %li, bpp %i, rowbytes %zu", width, - height, bit_depth, c->data.png.rowbytes)); + LOG(("size %li * %li, bpp %i, rowbytes %zu", (unsigned long)width, + (unsigned long)height, bit_depth, c->data.png.rowbytes)); } |