diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-11-01 15:38:08 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-11-01 15:38:08 +0000 |
commit | 94bab14df8ae2747c646a10f5b48cb389dde0e4c (patch) | |
tree | e6c81576ea6fc3bcdc5ffeae39b84ad5937b36e9 | |
parent | b97366a082a03cecb5004335d76c3bec9f21010a (diff) | |
download | netpbm-mirror-94bab14df8ae2747c646a10f5b48cb389dde0e4c.tar.gz netpbm-mirror-94bab14df8ae2747c646a10f5b48cb389dde0e4c.tar.xz netpbm-mirror-94bab14df8ae2747c646a10f5b48cb389dde0e4c.zip |
Release 10.47.22
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@1357 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/other/bmepsoe.c | 2 | ||||
-rw-r--r-- | converter/ppm/ilbmtoppm.c | 17 | ||||
-rw-r--r-- | doc/HISTORY | 8 |
3 files changed, 19 insertions, 8 deletions
diff --git a/converter/other/bmepsoe.c b/converter/other/bmepsoe.c index 1df687f9..02bf39aa 100644 --- a/converter/other/bmepsoe.c +++ b/converter/other/bmepsoe.c @@ -227,7 +227,7 @@ do_flate_flush(Output_Encoder * const oP, if (iptr && optr && is && os) { is = oP->fl_i_used; - if (is) { + if (is || final) { oP->flate_stream.next_in = iptr; oP->flate_stream.avail_in = is; if (final) { diff --git a/converter/ppm/ilbmtoppm.c b/converter/ppm/ilbmtoppm.c index 0c365834..5ceb70b6 100644 --- a/converter/ppm/ilbmtoppm.c +++ b/converter/ppm/ilbmtoppm.c @@ -93,7 +93,6 @@ static short wrotemask = 0; static IFF_ID typeid; /* ID_ILBM, ID_RGBN, ID_RGB8 */ static pixel *transpColor = NULL; /* transparent color */ -static short transpIndex = -1; static char *transpName = NULL; static bool debug = FALSE; @@ -780,15 +779,19 @@ prepareCmap(const BitMapHeader * const bmhd, if( bmhd ) { if( bmhd->masking == mskHasTransparentColor || bmhd->masking == mskLasso ) { - transpIndex = bmhd->transparentColor; + unsigned short const transpIdx = bmhd->transparentColor; if( !transpName ) { MALLOCVAR_NOFAIL(transpColor); - if( transpIndex >= cmap->ncolors ) { - pm_message("using default transparent color (black)"); - PPM_ASSIGN(*transpColor, 0, 0, 0); + if (HAS_COLORMAP(cmap)) { + if( transpIdx >= cmap->ncolors ) { + pm_message("using default transparent color (black)"); + PPM_ASSIGN(*transpColor, 0, 0, 0); + } else + *transpColor = cmap->color[transpIdx]; + } else { + /* The color index is just a direct gray level */ + PPM_ASSIGN(*transpColor, transpIdx, transpIdx, transpIdx); } - else - *transpColor = cmap->color[transpIndex]; } } diff --git a/doc/HISTORY b/doc/HISTORY index 03b774d2..e59b18f6 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,14 @@ Netpbm. CHANGE HISTORY -------------- +10.11.01 BJH Release 10.47.22 + + pnmtops: Fix incorrect output with -flate. Thanks Prophet of + the Way <afu@wta.att.ne.jp>. + + ilbmtoppm: Don't crash on image that has a transparent color + index, but no color map. + 10.10.16 BJH Release 10.47.21 configure: fix crash when libpng test compile fails. |