diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
commit | cdf6e0151411d887fef61245cb303ef190b29335 (patch) | |
tree | 678c2212e125e66e0a868773e2b4ec460794da4e /converter/ppm/ppmtoicr.c | |
parent | de1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff) | |
download | netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip |
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/ppmtoicr.c')
-rw-r--r-- | converter/ppm/ppmtoicr.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/converter/ppm/ppmtoicr.c b/converter/ppm/ppmtoicr.c index 3c8be421..1720f790 100644 --- a/converter/ppm/ppmtoicr.c +++ b/converter/ppm/ppmtoicr.c @@ -53,35 +53,6 @@ makeIcrColormap(colorhist_vector const chv, static int -bppFromColorCt(unsigned int const colorCt) { - - unsigned int bpp; - - if (colorCt <= 2) - bpp = 1; - else if (colorCt <= 4) - bpp = 2; - else if (colorCt <= 8) - bpp = 3; - else if (colorCt <= 16) - bpp = 4; - else if (colorCt <= 32) - bpp = 5; - else if (colorCt <= 64) - bpp = 6; - else if (colorCt <= 128) - bpp = 7; - else if (colorCt <= 256) - bpp = 8; - else - assert(false); - - return bpp; -} - - - -static int colorIndexAtPosition(unsigned int const x, unsigned int const y, pixel ** const pixels, @@ -166,7 +137,6 @@ main(int argc, const char ** const argv) { int rows, cols; int colorCt; int argn; - unsigned int bitsPerPixel; pixval maxval; colorhist_vector chv; char rgb[CLUTCOLORCT]; @@ -235,8 +205,6 @@ main(int argc, const char ** const argv) { makeIcrColormap(chv, colorCt, maxval, rgb); - bitsPerPixel = bppFromColorCt(colorCt); - /* And make a hash table for fast lookup. */ cht = ppm_colorhisttocolorhash(chv, colorCt); |