diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2010-03-28 10:29:44 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2010-03-28 10:29:44 +0000 |
commit | 198e864f7ef717b258fa26f4a5397b54230e9b8b (patch) | |
tree | 730cea0a06e4a506b17b462bab2c6f894f3a33ff /graphics/netpbm | |
parent | fc7ba69e91c22407bdb99a3cb8a44075b512a4cc (diff) | |
download | ports-198e864f7ef717b258fa26f4a5397b54230e9b8b.tar.gz ports-198e864f7ef717b258fa26f4a5397b54230e9b8b.zip |
Notes
Diffstat (limited to 'graphics/netpbm')
-rw-r--r-- | graphics/netpbm/Makefile | 1 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-pngtopnm.c | 53 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-pnmtopng.c | 35 |
3 files changed, 89 insertions, 0 deletions
diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile index bffbd4882f44..a0f425c0cbf0 100644 --- a/graphics/netpbm/Makefile +++ b/graphics/netpbm/Makefile @@ -31,6 +31,7 @@ CONFLICTS= mgetty-1.* USE_PERL5= yes USE_GMAKE= yes +CFLAGS+= -DPNG_DEPSTRUCT= MAKE_ENV= LN="${LN}" RANLIB="${RANLIB}" MAKEFILE= GNUmakefile INSTALL_TARGET= install.bin install.lib install.data install-dev diff --git a/graphics/netpbm/files/patch-pngtopnm.c b/graphics/netpbm/files/patch-pngtopnm.c new file mode 100644 index 000000000000..c28f194e61fd --- /dev/null +++ b/graphics/netpbm/files/patch-pngtopnm.c @@ -0,0 +1,53 @@ +--- converter/other/pngtopnm.c.orig 2004-04-04 02:18:34.000000000 +0200 ++++ converter/other/pngtopnm.c 2010-03-28 12:29:26.000000000 +0200 +@@ -494,7 +494,7 @@ + case PNG_COLOR_TYPE_GRAY: + setXel(&xelrow[col], c, c, c, + ((info_ptr->valid & PNG_INFO_tRNS) && +- (c == gamma_correct(info_ptr->trans_values.gray, ++ (c == gamma_correct(info_ptr->trans_color.gray, + totalgamma))) ? + 0 : maxval); + break; +@@ -511,7 +511,7 @@ + info_ptr->palette[c].blue, + (info_ptr->valid & PNG_INFO_tRNS) && + c < info_ptr->num_trans ? +- info_ptr->trans[c] : maxval); ++ info_ptr->trans_alpha[c] : maxval); + break; + + case PNG_COLOR_TYPE_RGB: { +@@ -519,11 +519,11 @@ + png_uint_16 const c3 = get_png_val(png_pixelP); + setXel(&xelrow[col], c, c2, c3, + ((info_ptr->valid & PNG_INFO_tRNS) && +- (c == gamma_correct(info_ptr->trans_values.red, ++ (c == gamma_correct(info_ptr->trans_color.red, + totalgamma)) && +- (c2 == gamma_correct(info_ptr->trans_values.green, ++ (c2 == gamma_correct(info_ptr->trans_color.green, + totalgamma)) && +- (c3 == gamma_correct(info_ptr->trans_values.blue, ++ (c3 == gamma_correct(info_ptr->trans_color.blue, + totalgamma))) ? + 0 : maxval); + } +@@ -688,7 +688,7 @@ + (info_ptr->valid & PNG_INFO_tRNS)) { + trans_mix = TRUE; + for (i = 0 ; i < info_ptr->num_trans ; i++) +- if (info_ptr->trans[i] != 0 && info_ptr->trans[i] != 255) { ++ if (info_ptr->trans_alpha[i] != 0 && info_ptr->trans_alpha[i] != 255) { + trans_mix = FALSE; + break; + } +@@ -841,7 +841,7 @@ + pnm_type = PBM_TYPE; + if (info_ptr->valid & PNG_INFO_tRNS) { + for (i = 0 ; i < info_ptr->num_trans ; i++) { +- if (info_ptr->trans[i] != 0 && info_ptr->trans[i] != maxval) { ++ if (info_ptr->trans_alpha[i] != 0 && info_ptr->trans_alpha[i] != maxval) { + pnm_type = PGM_TYPE; + break; + } diff --git a/graphics/netpbm/files/patch-pnmtopng.c b/graphics/netpbm/files/patch-pnmtopng.c new file mode 100644 index 000000000000..949c12d83dec --- /dev/null +++ b/graphics/netpbm/files/patch-pnmtopng.c @@ -0,0 +1,35 @@ +--- converter/other/pnmtopng.c.orig 2007-07-04 05:26:21.000000000 +0200 ++++ converter/other/pnmtopng.c 2010-03-28 12:17:40.000000000 +0200 +@@ -1863,7 +1863,7 @@ + info_ptr->num_palette = palette_size; + if (trans_size > 0) { + info_ptr->valid |= PNG_INFO_tRNS; +- info_ptr->trans = trans; ++ info_ptr->trans_alpha = trans; + info_ptr->num_trans = trans_size; /* omit opaque values */ + } + /* creating hIST chunk */ +@@ -1900,7 +1900,7 @@ + info_ptr->color_type == PNG_COLOR_TYPE_RGB) { + if (transparent > 0) { + info_ptr->valid |= PNG_INFO_tRNS; +- info_ptr->trans_values = ++ info_ptr->trans_color = + xelToPngColor_16(transcolor, maxval, png_maxval); + } + } else { +@@ -1912,10 +1912,10 @@ + if (info_ptr->valid && PNG_INFO_tRNS) + pm_message("Transparent color {gray, red, green, blue} = " + "{%d, %d, %d, %d}", +- info_ptr->trans_values.gray, +- info_ptr->trans_values.red, +- info_ptr->trans_values.green, +- info_ptr->trans_values.blue); ++ info_ptr->trans_color.gray, ++ info_ptr->trans_color.red, ++ info_ptr->trans_color.green, ++ info_ptr->trans_color.blue); + else + pm_message("No transparent color"); + } |