packages: netpbm/netpbm-build.patch, netpbm/netpbm.spec - updated to 10.35....
qboosh
qboosh at pld-linux.org
Sun Jan 29 14:19:59 CET 2012
Author: qboosh Date: Sun Jan 29 13:19:59 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- updated to 10.35.83
- updated build patch to fix build with libpng 1.5.x
---- Files affected:
packages/netpbm:
netpbm-build.patch (1.3 -> 1.4) , netpbm.spec (1.108 -> 1.109)
---- Diffs:
================================================================
Index: packages/netpbm/netpbm-build.patch
diff -u packages/netpbm/netpbm-build.patch:1.3 packages/netpbm/netpbm-build.patch:1.4
--- packages/netpbm/netpbm-build.patch:1.3 Sun Mar 27 14:40:07 2011
+++ packages/netpbm/netpbm-build.patch Sun Jan 29 14:19:54 2012
@@ -9,9 +9,19 @@
#endif
for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;
---- netpbm-10.35.80/converter/other/pnmtopng.c.orig 2010-12-10 19:19:40.000000000 +0100
-+++ netpbm-10.35.80/converter/other/pnmtopng.c 2011-03-27 14:02:53.641739787 +0200
-@@ -69,11 +69,6 @@
+--- netpbm-10.35.83/converter/other/pnmtopng.c.orig 2011-09-25 20:51:44.000000000 +0200
++++ netpbm-10.35.83/converter/other/pnmtopng.c 2012-01-29 08:48:17.363289175 +0100
+@@ -61,7 +61,8 @@
+ #include <assert.h>
+ #include <string.h> /* strcat() */
+ #include <limits.h>
+-#include <png.h> /* includes zlib.h and setjmp.h */
++#include <png.h> /* includes setjmp.h */
++#include <zlib.h>
+ #include "pnm.h"
+ #include "pngtxt.h"
+ #include "shhopt.h"
+@@ -69,11 +70,6 @@
#include "nstring.h"
#include "version.h"
@@ -23,41 +33,369 @@
struct zlibCompression {
-@@ -2611,7 +2606,7 @@
- info_ptr->num_palette = palette_size;
+@@ -2098,6 +2094,7 @@
+ gray * const alpha_mask,
+ colorhash_table const cht,
+ coloralphahash_table const caht,
++ png_struct * const png_ptr,
+ png_info * const info_ptr,
+ xelval const png_maxval,
+ unsigned int const depth) {
+@@ -2109,21 +2106,22 @@
+ for (col = 0; col < cols; ++col) {
+ xel p_png;
+ xel const p = xelrow[col];
++ png_byte color_type = png_get_color_type(png_ptr, info_ptr);
+ PPM_DEPTH(p_png, p, maxval, png_maxval);
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
++ if (color_type == PNG_COLOR_TYPE_GRAY ||
++ color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+ if (depth == 16)
+ *pp++ = PNM_GET1(p_png) >> 8;
+ *pp++ = PNM_GET1(p_png) & 0xff;
+- } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
++ } else if (color_type == PNG_COLOR_TYPE_PALETTE) {
+ unsigned int paletteIndex;
+ if (alpha)
+ paletteIndex = lookupColorAlpha(caht, &p, &alpha_mask[col]);
+ else
+ paletteIndex = ppm_lookupcolor(cht, &p);
+ *pp++ = paletteIndex;
+- } else if (info_ptr->color_type == PNG_COLOR_TYPE_RGB ||
+- info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
++ } else if (color_type == PNG_COLOR_TYPE_RGB ||
++ color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
+ if (depth == 16)
+ *pp++ = PPM_GETR(p_png) >> 8;
+ *pp++ = PPM_GETR(p_png) & 0xff;
+@@ -2136,7 +2134,7 @@
+ } else
+ pm_error("INTERNAL ERROR: undefined color_type");
+
+- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) {
++ if (color_type & PNG_COLOR_MASK_ALPHA) {
+ int const png_alphaval = (int)
+ alpha_mask[col] * (float) png_maxval / maxval + 0.5;
+ if (depth == 16)
+@@ -2193,7 +2191,7 @@
+
+ makePngLine(line, xelrow, cols, maxval,
+ alpha, alpha ? alpha_mask[row] : NULL,
+- cht, caht, info_ptr, png_maxval, depth);
++ cht, caht, png_ptr, info_ptr, png_maxval, depth);
+
+ png_write_row(png_ptr, line);
+ }
+@@ -2205,12 +2203,12 @@
+
+ static void
+ doGamaChunk(struct cmdlineInfo const cmdline,
++ png_struct * const png_ptr,
+ png_info * const info_ptr) {
+
+ if (cmdline.gammaSpec) {
+ /* gAMA chunk */
+- info_ptr->valid |= PNG_INFO_gAMA;
+- info_ptr->gamma = cmdline.gamma;
++ png_set_gAMA(png_ptr, info_ptr, cmdline.gamma);
+ }
+ }
+
+@@ -2218,20 +2216,16 @@
+
+ static void
+ doChrmChunk(struct cmdlineInfo const cmdline,
++ png_struct * const png_ptr,
+ png_info * const info_ptr) {
+
+ if (cmdline.rgbSpec) {
+ /* cHRM chunk */
+- info_ptr->valid |= PNG_INFO_cHRM;
+-
+- info_ptr->x_white = cmdline.rgb.wx;
+- info_ptr->y_white = cmdline.rgb.wy;
+- info_ptr->x_red = cmdline.rgb.rx;
+- info_ptr->y_red = cmdline.rgb.ry;
+- info_ptr->x_green = cmdline.rgb.gx;
+- info_ptr->y_green = cmdline.rgb.gy;
+- info_ptr->x_blue = cmdline.rgb.bx;
+- info_ptr->y_blue = cmdline.rgb.by;
++ png_set_cHRM(png_ptr, info_ptr,
++ cmdline.rgb.wx, cmdline.rgb.wy,
++ cmdline.rgb.rx, cmdline.rgb.ry,
++ cmdline.rgb.gx, cmdline.rgb.gy,
++ cmdline.rgb.bx, cmdline.rgb.by);
+ }
+ }
+
+@@ -2239,15 +2233,13 @@
+
+ static void
+ doPhysChunk(struct cmdlineInfo const cmdline,
++ png_struct * const png_ptr,
+ png_info * const info_ptr) {
+
+ if (cmdline.sizeSpec) {
+ /* pHYS chunk */
+- info_ptr->valid |= PNG_INFO_pHYs;
+-
+- info_ptr->x_pixels_per_unit = cmdline.size.x;
+- info_ptr->y_pixels_per_unit = cmdline.size.y;
+- info_ptr->phys_unit_type = cmdline.size.unit;
++ png_set_pHYs(png_ptr, info_ptr,
++ cmdline.size.x, cmdline.size.y, cmdline.size.unit);
+ }
+ }
+
+@@ -2256,26 +2248,29 @@
+
+ static void
+ doTimeChunk(struct cmdlineInfo const cmdline,
++ png_struct * const png_ptr,
+ png_info * const info_ptr) {
+
+ if (cmdline.modtimeSpec) {
+ /* tIME chunk */
+- info_ptr->valid |= PNG_INFO_tIME;
+-
+- png_convert_from_time_t(&info_ptr->mod_time, cmdline.modtime);
++ png_time ptime;
++ png_convert_from_time_t(&ptime, cmdline.modtime);
++ png_set_tIME(png_ptr, info_ptr, &ptime);
+ }
+ }
+
+
+
+ static void
+-doSbitChunk(png_info * const pngInfoP,
++doSbitChunk(png_struct * const png_ptr,
++ png_info * const pngInfoP,
+ xelval const pngMaxval,
+ xelval const maxval,
+ bool const alpha,
+ xelval const alphaMaxval) {
+
+- if (pngInfoP->color_type != PNG_COLOR_TYPE_PALETTE &&
++ png_byte color_type = png_get_color_type(png_ptr, pngInfoP);
++ if (color_type != PNG_COLOR_TYPE_PALETTE &&
+ (pngMaxval > maxval || (alpha && pngMaxval > alphaMaxval))) {
+
+ /* We're writing in a bit depth that doesn't match the maxval
+@@ -2294,27 +2289,27 @@
+ sBIT chunk.
+ */
+
+- pngInfoP->valid |= PNG_INFO_sBIT;
+-
++ png_color_8 sbit;
+ {
+ int const sbitval = pm_maxvaltobits(MIN(maxval, pngMaxval));
+
+- if (pngInfoP->color_type & PNG_COLOR_MASK_COLOR) {
+- pngInfoP->sig_bit.red = sbitval;
+- pngInfoP->sig_bit.green = sbitval;
+- pngInfoP->sig_bit.blue = sbitval;
++ if (color_type & PNG_COLOR_MASK_COLOR) {
++ sbit.red = sbitval;
++ sbit.green = sbitval;
++ sbit.blue = sbitval;
+ } else
+- pngInfoP->sig_bit.gray = sbitval;
++ sbit.gray = sbitval;
+
+ if (verbose)
+ pm_message("Writing sBIT chunk with bits = %d", sbitval);
+ }
+- if (pngInfoP->color_type & PNG_COLOR_MASK_ALPHA) {
+- pngInfoP->sig_bit.alpha =
++ if (color_type & PNG_COLOR_MASK_ALPHA) {
++ sbit.alpha =
+ pm_maxvaltobits(MIN(alphaMaxval, pngMaxval));
+ if (verbose)
+- pm_message(" alpha bits = %d", pngInfoP->sig_bit.alpha);
++ pm_message(" alpha bits = %d", sbit.alpha);
+ }
++ png_set_sBIT(png_ptr, pngInfoP, &sbit);
+ }
+ }
+
+@@ -2595,43 +2590,41 @@
+ pm_error ("setjmp returns error condition (2)");
+ }
+
+- png_init_io (png_ptr, stdout);
+- info_ptr->width = cols;
+- info_ptr->height = rows;
+- info_ptr->bit_depth = depth;
+-
++ {
++ int color_type;
+ if (colorMapped)
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
++ color_type = PNG_COLOR_TYPE_PALETTE;
+ else if (pnm_type == PPM_TYPE)
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
++ color_type = PNG_COLOR_TYPE_RGB;
+ else
+- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
++ color_type = PNG_COLOR_TYPE_GRAY;
+
+- if (alpha && info_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
+- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
++ if (alpha && (color_type != PNG_COLOR_TYPE_PALETTE))
++ color_type |= PNG_COLOR_MASK_ALPHA;
+
+- info_ptr->interlace_type = cmdline.interlace;
++ png_set_IHDR(png_ptr, info_ptr,
++ cols, rows, depth, color_type, 0, 0, 0);
++ }
+
+- doGamaChunk(cmdline, info_ptr);
++ if(cmdline.interlace)
++ png_set_interlace_handling(png_ptr);
+
+- doChrmChunk(cmdline, info_ptr);
++ doGamaChunk(cmdline, png_ptr, info_ptr);
+
+- doPhysChunk(cmdline, info_ptr);
++ doChrmChunk(cmdline, png_ptr, info_ptr);
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
++ doPhysChunk(cmdline, png_ptr, info_ptr);
++
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) {
+
+ /* creating PNG palette (PLTE and tRNS chunks) */
+
+ createPngPalette(palette_pnm, palette_size, maxval,
+ trans_pnm, trans_size, alpha_maxval,
+ palette, trans);
+- info_ptr->valid |= PNG_INFO_PLTE;
+- info_ptr->palette = palette;
+- info_ptr->num_palette = palette_size;
++ png_set_PLTE(png_ptr, info_ptr, palette, palette_size);
if (trans_size > 0) {
- info_ptr->valid |= PNG_INFO_tRNS;
+- info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->trans = trans;
-+ info_ptr->trans_alpha = trans;
- info_ptr->num_trans = trans_size; /* omit opaque values */
+- info_ptr->num_trans = trans_size; /* omit opaque values */
++ png_set_tRNS(png_ptr, info_ptr, trans, trans_size, NULL);
}
/* creating hIST chunk */
-@@ -2648,7 +2643,7 @@
- info_ptr->color_type == PNG_COLOR_TYPE_RGB) {
+ if (cmdline.hist) {
+@@ -2657,18 +2650,17 @@
+
+ ppm_freecolorhash(cht);
+
+- info_ptr->valid |= PNG_INFO_hIST;
+- info_ptr->hist = histogram;
++ png_set_hIST(png_ptr, info_ptr, histogram);
+ if (verbose)
+ pm_message("histogram created");
+ }
+ } else { /* color_type != PNG_COLOR_TYPE_PALETTE */
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_RGB) {
++ png_byte color_type = png_get_color_type(png_ptr, info_ptr);
++ if (color_type == PNG_COLOR_TYPE_GRAY ||
++ color_type == PNG_COLOR_TYPE_RGB) {
if (transparent > 0) {
- info_ptr->valid |= PNG_INFO_tRNS;
+- info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->trans_values =
-+ info_ptr->trans_color =
- xelToPngColor_16(transcolor, maxval, png_maxval);
+- xelToPngColor_16(transcolor, maxval, png_maxval);
++ png_color_16 c = xelToPngColor_16(transcolor, maxval, png_maxval);
++ png_set_tRNS(png_ptr, info_ptr, NULL, 0, &c);
}
} else {
-@@ -2660,10 +2655,10 @@
- if (info_ptr->valid && PNG_INFO_tRNS)
+ /* This is PNG_COLOR_MASK_ALPHA. Transparency will be handled
+@@ -2676,60 +2668,58 @@
+ */
+ }
+ if (verbose) {
+- if (info_ptr->valid && PNG_INFO_tRNS)
++ png_color_16p trans_colorp = NULL;
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
++ png_get_tRNS(png_ptr, info_ptr, NULL, NULL, &trans_colorp);
++ }
++ if(trans_colorp != NULL)
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
+- else
++ trans_colorp->gray,
++ trans_colorp->red,
++ trans_colorp->green,
++ trans_colorp->blue);
++ else
pm_message("No transparent color");
}
---- netpbm-10.35.80/converter/other/pngtopnm.c.orig 2011-01-15 21:18:40.000000000 +0100
-+++ netpbm-10.35.80/converter/other/pngtopnm.c 2011-03-27 14:04:03.089736435 +0200
+ }
+
+ /* bKGD chunk */
+ if (cmdline.background) {
+- info_ptr->valid |= PNG_INFO_bKGD;
+- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
+- info_ptr->background.index = background_index;
++ png_color_16 bkgd;
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) {
++ bkgd.index = background_index;
+ } else {
+- info_ptr->background =
+- xelToPngColor_16(backcolor, maxval, png_maxval);
++ bkgd = xelToPngColor_16(backcolor, maxval, png_maxval);
+ if (verbose)
+ pm_message("Writing bKGD chunk with background color "
+ " {gray, red, green, blue} = {%d, %d, %d, %d}",
+- info_ptr->background.gray,
+- info_ptr->background.red,
+- info_ptr->background.green,
+- info_ptr->background.blue );
++ bkgd.gray,
++ bkgd.red,
++ bkgd.green,
++ bkgd.blue );
+ }
++ png_set_bKGD(png_ptr, info_ptr, &bkgd);
+ }
+
+- doSbitChunk(info_ptr, png_maxval, maxval, alpha, alpha_maxval);
++ doSbitChunk(png_ptr, info_ptr, png_maxval, maxval, alpha, alpha_maxval);
+
+ /* tEXT and zTXT chunks */
+ if (cmdline.text || cmdline.ztxt)
+- pnmpng_read_text(info_ptr, tfp, !!cmdline.ztxt, cmdline.verbose);
++ pnmpng_read_text(png_ptr, info_ptr, tfp, !!cmdline.ztxt, cmdline.verbose);
+
+- doTimeChunk(cmdline, info_ptr);
++ doTimeChunk(cmdline, png_ptr, info_ptr);
+
+ if (cmdline.filterSet != 0)
+ png_set_filter(png_ptr, 0, cmdline.filterSet);
+
+ setZlibCompression(png_ptr, cmdline.zlibCompression);
+
++ png_init_io (png_ptr, stdout);
++
+ /* write the png-info struct */
+ png_write_info(png_ptr, info_ptr);
+
+- if (cmdline.text || cmdline.ztxt)
+- /* prevent from being written twice with png_write_end */
+- info_ptr->num_text = 0;
+-
+- if (cmdline.modtime)
+- /* prevent from being written twice with png_write_end */
+- info_ptr->valid &= ~PNG_INFO_tIME;
+-
+ /* let libpng take care of, e.g., bit-depth conversions */
+ png_set_packing (png_ptr);
+
+--- netpbm-10.35.83/converter/other/pngtopnm.c.orig 2011-11-25 01:15:46.000000000 +0100
++++ netpbm-10.35.83/converter/other/pngtopnm.c 2012-01-29 13:39:20.230540563 +0100
@@ -44,11 +44,6 @@
#include "nstring.h"
#include "shhopt.h"
@@ -70,50 +408,934 @@
typedef struct _jmpbuf_wrapper {
jmp_buf jmpbuf;
-@@ -482,7 +477,7 @@
+@@ -187,7 +182,7 @@
+
+
+
+-#define get_png_val(p) _get_png_val (&(p), info_ptr->bit_depth)
++#define get_png_val(p) _get_png_val (&(p), bit_depth)
+
+ static png_uint_16
+ _get_png_val (png_byte ** const pp,
+@@ -266,33 +261,37 @@
+ }
+
+ #ifdef __STDC__
+-static void save_text (png_info *info_ptr, FILE *tfp)
++static void save_text (png_struct *png_ptr, png_info *info_ptr, FILE *tfp)
+ #else
+-static void save_text (info_ptr, tfp)
++static void save_text (png_ptr, info_ptr, tfp)
++png_struct *png_ptr;
+ png_info *info_ptr;
+ FILE *tfp;
+ #endif
+ {
+ int i, j, k;
++ png_text *text;
++ int num_text;
++ png_get_text(png_ptr, info_ptr, &text, &num_text);
+
+- for (i = 0 ; i < info_ptr->num_text ; i++) {
++ for (i = 0 ; i < num_text ; i++) {
+ j = 0;
+- while (info_ptr->text[i].key[j] != '\0' && info_ptr->text[i].key[j] != ' ')
++ while (text[i].key[j] != '\0' && text[i].key[j] != ' ')
+ j++;
+- if (info_ptr->text[i].key[j] != ' ') {
+- fprintf (tfp, "%s", info_ptr->text[i].key);
+- for (j = strlen (info_ptr->text[i].key) ; j < 15 ; j++)
++ if (text[i].key[j] != ' ') {
++ fprintf (tfp, "%s", text[i].key);
++ for (j = strlen (text[i].key) ; j < 15 ; j++)
+ putc (' ', tfp);
+ } else {
+- fprintf (tfp, "\"%s\"", info_ptr->text[i].key);
+- for (j = strlen (info_ptr->text[i].key) ; j < 13 ; j++)
++ fprintf (tfp, "\"%s\"", text[i].key);
++ for (j = strlen (text[i].key) ; j < 13 ; j++)
+ putc (' ', tfp);
+ }
+ putc (' ', tfp); /* at least one space between key and text */
+
+- for (j = 0 ; j < info_ptr->text[i].text_length ; j++) {
+- putc (info_ptr->text[i].text[j], tfp);
+- if (info_ptr->text[i].text[j] == '\n')
++ for (j = 0 ; j < text[i].text_length ; j++) {
++ putc (text[i].text[j], tfp);
++ if (text[i].text[j] == '\n')
+ for (k = 0 ; k < 16 ; k++)
+ putc ((int)' ', tfp);
+ }
+@@ -301,9 +300,10 @@
+ }
+
+ #ifdef __STDC__
+-static void show_time (png_info *info_ptr)
++static void show_time (png_struct *png_ptr, png_info *info_ptr)
+ #else
+-static void show_time (info_ptr)
++static void show_time (ptr_ptr, info_ptr)
++png_struct *png_ptr;
+ png_info *info_ptr;
+ #endif
+ {
+@@ -312,18 +312,20 @@
+ "July", "August", "September", "October", "November", "December"
+ };
+
+- if (info_ptr->valid & PNG_INFO_tIME) {
+- if (info_ptr->mod_time.month < 1 ||
+- info_ptr->mod_time.month >= ARRAY_SIZE(month)) {
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tIME)) {
++ png_timep mod_timep;
++ png_get_tIME(png_ptr, info_ptr, &mod_timep);
++ if (mod_timep->month < 1 ||
++ mod_timep->month >= ARRAY_SIZE(month)) {
+ pm_message("tIME chunk in PNG input is invalid; "
+ "modification time of image is unknown. "
+ "The month value, which should be in the range "
+- "1-12, is %u", info_ptr->mod_time.month);
++ "1-12, is %u", mod_timep->month);
+ } else
+ pm_message ("modification time: %02d %s %d %02d:%02d:%02d",
+- info_ptr->mod_time.day, month[info_ptr->mod_time.month],
+- info_ptr->mod_time.year, info_ptr->mod_time.hour,
+- info_ptr->mod_time.minute, info_ptr->mod_time.second);
++ mod_timep->day, month[mod_timep->month],
++ mod_timep->year, mod_timep->hour,
++ mod_timep->minute, mod_timep->second);
+ }
+ }
+
+@@ -360,12 +362,12 @@
+
+
+ static void
+-dump_png_info(png_info *info_ptr) {
++dump_png_info(png_struct *png_ptr, png_info *info_ptr) {
+
+ const char *type_string;
+ const char *filter_string;
+
+- switch (info_ptr->color_type) {
++ switch (png_get_color_type(png_ptr, info_ptr)) {
+ case PNG_COLOR_TYPE_GRAY:
+ type_string = "gray";
+ break;
+@@ -387,90 +389,106 @@
+ break;
+ }
+
+- switch (info_ptr->filter_type) {
++ switch (png_get_filter_type(png_ptr, info_ptr)) {
+ case PNG_FILTER_TYPE_BASE:
+ asprintfN(&filter_string, "base filter");
+ break;
+ default:
+ asprintfN(&filter_string, "unknown filter type %d",
+- info_ptr->filter_type);
++ png_get_filter_type(png_ptr, info_ptr));
+ }
+
++ {
++ png_uint_32 width, height;
++ int bit_depth, color_type;
++ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
+ pm_message("reading a %ldw x %ldh image, %d bit%s",
+- info_ptr->width, info_ptr->height,
+- info_ptr->bit_depth, info_ptr->bit_depth > 1 ? "s" : "");
++ width, height,
++ bit_depth, bit_depth > 1 ? "s" : "");
++ }
+ pm_message("%s, %s, %s",
+ type_string,
+- info_ptr->interlace_type ?
++ png_get_interlace_type(png_ptr, info_ptr) ?
+ "Adam7 interlaced" : "not interlaced",
+ filter_string);
++ {
++ png_color_16p bkgp;
++ if(png_get_bKGD(png_ptr, info_ptr, &bkgp) && (bkgp != NULL))
+ pm_message("background {index, gray, red, green, blue} = "
+ "{%d, %d, %d, %d, %d}",
+- info_ptr->background.index,
+- info_ptr->background.gray,
+- info_ptr->background.red,
+- info_ptr->background.green,
+- info_ptr->background.blue);
++ bkgp->index,
++ bkgp->gray,
++ bkgp->red,
++ bkgp->green,
++ bkgp->blue);
++ }
+
+ strfree(filter_string);
+
+- if (info_ptr->valid & PNG_INFO_tRNS)
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
++ int num_trans;
++ png_get_tRNS(png_ptr, info_ptr, NULL, &num_trans, NULL);
+ pm_message("tRNS chunk (transparency): %u entries",
+- info_ptr->num_trans);
+- else
++ num_trans);
++ } else
+ pm_message("tRNS chunk (transparency): not present");
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/netpbm/netpbm-build.patch?r1=1.3&r2=1.4&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/netpbm/netpbm.spec?r1=1.108&r2=1.109&f=u
More information about the pld-cvs-commit
mailing list