diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-09-17 16:06:43 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-09-17 16:06:43 +0000 |
commit | ee51483dbed2e19a6efaaa16a0f3286efa387c6f (patch) | |
tree | 2ebda377ca51f2520c82c35ee32b8f0e8abb4558 /media-gfx/exact-image/files | |
parent | Version bump (diff) | |
download | gentoo-2-ee51483dbed2e19a6efaaa16a0f3286efa387c6f.tar.gz gentoo-2-ee51483dbed2e19a6efaaa16a0f3286efa387c6f.tar.bz2 gentoo-2-ee51483dbed2e19a6efaaa16a0f3286efa387c6f.zip |
Fix building with libpng15 wrt #383203 by Diego Elio Pettenò
(Portage version: 2.2.0_alpha55/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/exact-image/files')
-rw-r--r-- | media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch b/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch new file mode 100644 index 000000000000..44c94726e35c --- /dev/null +++ b/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch @@ -0,0 +1,34 @@ +--- codecs/png.cc ++++ codecs/png.cc +@@ -16,6 +16,7 @@ + */ + + #include <stdlib.h> ++#include <zlib.h> + #include <png.h> + + #include <iostream> +@@ -104,7 +105,7 @@ + image.w = width; + image.h = height; + image.bps = bit_depth; +- image.spp = info_ptr->channels; ++ image.spp = png_get_channels(png_ptr, info_ptr); + + png_uint_32 res_x, res_y; + res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr); +@@ -120,10 +121,13 @@ + // png_set_packswap(png_ptr); + + /* Expand paletted colors into true RGB triplets */ ++ ++ int num_trans; ++ + if (color_type == PNG_COLOR_TYPE_PALETTE) { + png_set_palette_to_rgb(png_ptr); + image.bps = 8; +- if (info_ptr->num_trans) ++ if (num_trans) + image.spp = 4; + else + image.spp = 3; |