diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-11-27 06:53:13 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-11-27 06:53:13 +0000 |
commit | 1dab1a5dca83e051708729802e0814d29097b44b (patch) | |
tree | 06aa90309175e183d250330ae28840c3a51b79a5 /other/pamx | |
parent | 2615c17222252beef4eaee4a3a6fadb44c049feb (diff) | |
download | netpbm-mirror-1dab1a5dca83e051708729802e0814d29097b44b.tar.gz netpbm-mirror-1dab1a5dca83e051708729802e0814d29097b44b.tar.xz netpbm-mirror-1dab1a5dca83e051708729802e0814d29097b44b.zip |
remove dead code
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@147 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other/pamx')
-rw-r--r-- | other/pamx/image.c | 92 | ||||
-rw-r--r-- | other/pamx/image.h | 5 |
2 files changed, 0 insertions, 97 deletions
diff --git a/other/pamx/image.c b/other/pamx/image.c index 3aaa8478..d74795cb 100644 --- a/other/pamx/image.c +++ b/other/pamx/image.c @@ -237,95 +237,3 @@ freeImage(Image * const imageP) { free(imageP); } - - - - -static void -fillRow1(struct pam * const pamP, - tuple * const tuplerow, - unsigned char ** const pP) { - - unsigned int col; - - for (col = 0; col < pamP->width; ++col) { - unsigned int plane; - for (plane = 0; plane < pamP->depth; ++plane) - *(*pP)++ = - pnm_scalesample(tuplerow[col][0], pamP->maxval, 255); - } -} - - - -static void -fillRow3(struct pam * const pamP, - tuple * const tuplerow, - unsigned char ** const pP) { - - unsigned int col; - - for (col = 0; col < pamP->width; ++col) { - unsigned int plane; - for (plane = 0; plane < pamP->depth; ++plane) - *(*pP)++ = - pnm_scalesample(tuplerow[col][plane], pamP->maxval, 255); - } -} - - - -Image * -pbmLoad(const char * const fullname, - const char * const name, - bool const verbose) { - - FILE * ifP; - struct pam pam; - Image * imageP; - unsigned int row; - const char * filename; - tuple * tuplerow; - unsigned char * p; - enum {DEPTH_1, DEPTH_3} depth; - - if (STREQ(fullname, "stdin")) - filename = "-"; - else - filename = fullname; - - ifP = pm_openr(filename); - - pnm_readpaminit(ifP, &pam, PAM_STRUCT_SIZE(tuple_type)); - - if (strncmp(pam.tuple_type, "RGB", 3) == 0) { - depth = DEPTH_3; - if (pam.depth < 3) - pm_error("Invalid depth %u for RGB tuple type.", pam.depth); - } else - depth = DEPTH_1; - - imageP = newTrueImage(pam.width, pam.height); - - p = &imageP->data[0]; /* initial value */ - - tuplerow = pnm_allocpamrow(&pam); - - for (row = 0; row < pam.height; ++row) { - pnm_readpamrow(&pam, tuplerow); - - switch (depth) { - case DEPTH_3: - fillRow3(&pam, tuplerow, &p); - break; - case DEPTH_1: - fillRow1(&pam, tuplerow, &p); - break; - } - } - pnm_freepamrow(tuplerow); - - pm_close(ifP); - - return imageP; -} diff --git a/other/pamx/image.h b/other/pamx/image.h index 9c9689ac..32a48c5a 100644 --- a/other/pamx/image.h +++ b/other/pamx/image.h @@ -82,9 +82,4 @@ colorIntensity(unsigned int const red, BlueIntensity[blu / 256]); } -Image * -pbmLoad(const char * const fullname, - const char * const name, - bool const verbose); - #endif |