diff options
Diffstat (limited to 'converter/other/giftopnm.c')
-rw-r--r-- | converter/other/giftopnm.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c index 470c85b7..c1c79e26 100644 --- a/converter/other/giftopnm.c +++ b/converter/other/giftopnm.c @@ -291,6 +291,7 @@ initGif89(struct Gif89 * const gif89P) { } + static bool verbose; static bool showComment; @@ -1237,7 +1238,6 @@ lzwReadByteFresh(struct GetCodeState * const getCodeStateP, - static void lzwReadByte(Decompressor * const decompP, unsigned char * const dataReadP, @@ -1357,6 +1357,7 @@ bumpRowInterlace(unsigned int const rows, } + static void renderRow(unsigned char * const cmapIndexRow, unsigned int const cols, @@ -1448,20 +1449,14 @@ pnmFormat(bool const hasGray, by 'hasGray' and 'hasColor'. -----------------------------------------------------------------------------*/ int format; - const char * formatName; if (hasColor) { format = PPM_FORMAT; - formatName = "PPM"; } else if (hasGray) { format = PGM_FORMAT; - formatName = "PGM"; } else { format = PBM_FORMAT; - formatName = "PBM"; } - if (verbose) - pm_message("writing a %s file", formatName); return format; } @@ -1554,6 +1549,9 @@ convertRaster(Decompressor * const decompP, MALLOCARRAY2(cmapIndexArray, interlace ? rows : 1 , cols); + if (verbose) + pm_message("writing a %s file", pnm_formattypenm(format)); + if (imageOutFileP) pnm_writepnminit(imageOutFileP, cols, rows, GIFMAXVAL, format, false); if (alphaFileP) @@ -2198,3 +2196,4 @@ main(int argc, const char **argv) { } + |