From 3976c04edc6d4bdb583875176e06f93fc23d869f Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 15 Jan 2009 21:35:47 +0000 Subject: Release 10.35.58 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@816 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- Makefile.version | 2 +- converter/pbm/mrftopbm.c | 11 +++++++---- converter/pbm/pbmtomrf.c | 10 ++++++---- converter/ppm/ilbmtoppm.c | 2 +- converter/ppm/leaftoppm.c | 4 ++-- converter/ppm/picttoppm.c | 2 -- doc/HISTORY | 14 ++++++++++++++ 7 files changed, 31 insertions(+), 14 deletions(-) diff --git a/Makefile.version b/Makefile.version index b78b698a..490671f4 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 57 +NETPBM_POINT_RELEASE = 58 diff --git a/converter/pbm/mrftopbm.c b/converter/pbm/mrftopbm.c index 696fe839..9534f3a5 100644 --- a/converter/pbm/mrftopbm.c +++ b/converter/pbm/mrftopbm.c @@ -62,10 +62,13 @@ doSquare(FILE * const in, } } else { /* not all one color, so recurse. */ - doSquare(in, image, ox, oy, w, size >> 1); - doSquare(in, image, ox+size, oy, w, size >> 1); - doSquare(in, image, ox, oy+size,w, size >> 1); - doSquare(in, image, ox+size, oy+size,w, size >> 1); + + int halfsize = size >> 1; + + doSquare(in, image, ox, oy, w, halfsize); + doSquare(in, image, ox+halfsize, oy, w, halfsize); + doSquare(in, image, ox, oy+halfsize, w, halfsize); + doSquare(in, image, ox+halfsize, oy+halfsize, w, halfsize); } } diff --git a/converter/pbm/pbmtomrf.c b/converter/pbm/pbmtomrf.c index 186e95f5..c93c88aa 100644 --- a/converter/pbm/pbmtomrf.c +++ b/converter/pbm/pbmtomrf.c @@ -83,11 +83,13 @@ doSquare(unsigned char * const image, /* otherwise, if our square is greater than 1x1, we need to recurse. */ if(size > 1) { + int halfsize = size >> 1; + bit_output(0); /* not all same */ - doSquare(image, ox, oy, w, size>>1); - doSquare(image, ox+size, oy, w, size>>1); - doSquare(image, ox, oy+size, w, size>>1); - doSquare(image, ox+size, oy+size, w, size>>1); + doSquare(image, ox, oy, w, halfsize); + doSquare(image, ox+halfsize, oy, w, halfsize); + doSquare(image, ox, oy+halfsize, w, halfsize); + doSquare(image, ox+halfsize, oy+halfsize, w, halfsize); } } diff --git a/converter/ppm/ilbmtoppm.c b/converter/ppm/ilbmtoppm.c index f9f9bac3..fafbd005 100644 --- a/converter/ppm/ilbmtoppm.c +++ b/converter/ppm/ilbmtoppm.c @@ -2349,7 +2349,7 @@ main(int argc, char *argv[]) { cmap_to_ppm(cmap); } else pm_error("no colormap"); - } else if( bodyChunkProcessed ) { + } else if( !bodyChunkProcessed ) { if( HAS_COLORMAP(cmap) ) { pm_message("input is a colormap file"); check_cmap(bmhdP, cmap); diff --git a/converter/ppm/leaftoppm.c b/converter/ppm/leaftoppm.c index 889400f6..bda44494 100644 --- a/converter/ppm/leaftoppm.c +++ b/converter/ppm/leaftoppm.c @@ -88,9 +88,9 @@ leaf_init(FILE * const fp, for (i=0; i < 256; ++i) PPM_PUTR(colors[i], fgetc(fp)); for (i=0; i < 256; ++i) - PPM_PUTR(colors[i], fgetc(fp)); + PPM_PUTG(colors[i], fgetc(fp)); for (i=0; i < 256; ++i) - PPM_PUTR(colors[i], fgetc(fp)); + PPM_PUTB(colors[i], fgetc(fp)); *ncolorsP = ncolors; } else { /* 24-bit image */ diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c index e31d5169..d52963fc 100644 --- a/converter/ppm/picttoppm.c +++ b/converter/ppm/picttoppm.c @@ -1616,8 +1616,6 @@ do_blits(struct rgbPlanes * const planesP) { double lowxscale, highxscale, lowyscale, highyscale; int xscalecalc = 0, yscalecalc = 0; - if (!blit_list) return; - fullres = 0; for (bi = blit_list; bi; bi = bi->next) { diff --git a/doc/HISTORY b/doc/HISTORY index b44f31ea..9262a0c7 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,20 @@ Netpbm. CHANGE HISTORY -------------- +09.01.15 BJH Release 10.35.58 + + picttoppm: fix crash when image is all text with -fullres. + + ilbmtoppm: fix bug: appends color map PPM to output if input + has color map; fails if input doesn't have color map. Broken + in 10.18. + + leaftoppm: fix bug: uses red channel as all three channels; + (produces grayscale output). + + pbmtomrf, mrftopbm: fix crashes, incorrect output in all + cases. Broken forever. + 08.12.07 BJH Release 10.35.57 Build: Move CFLAGS later in libjasper build so that a -I in -- cgit 1.4.1