diff options
Diffstat (limited to 'converter/other/pamtopng.c')
-rw-r--r-- | converter/other/pamtopng.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/converter/other/pamtopng.c b/converter/other/pamtopng.c index 3164bc29..088db3c8 100644 --- a/converter/other/pamtopng.c +++ b/converter/other/pamtopng.c @@ -16,7 +16,7 @@ had become rather complex. This program is roughly 1/3 the size of pnmtopng.c that it replaces. - - In 1995, bandwith was limited and therefore filesize had to be kept + - In 1995, bandwid was limited and therefore filesize had to be kept small. The original program tried to optimize for that by applying many "clever tricks". Today that isn't an issue anymore, so gone are filters, palettes, etc. Also, image conversions were removed, @@ -251,7 +251,7 @@ colorTypeFromInputType(const struct pam * const pamP) { -----------------------------------------------------------------------------*/ png_byte retval; - if (pamP->depth < 1 && pamP->depth > 4) + if (pamP->depth < 1 || pamP->depth > 4) pm_error ("Number of color planes must be between 1 and 4 inclusive"); if (pamP->maxval != 1 && pamP->maxval != 3 && pamP->maxval != 15 && @@ -278,7 +278,7 @@ colorTypeFromInputType(const struct pam * const pamP) { retval = PNG_COLOR_TYPE_GRAY_ALPHA; else pm_error("Input tuple type is GRAYSCALE_ALPHA, " - "but number of planes is %u instread of 2", + "but number of planes is %u instead of 2", pamP->depth); } else if (strneq(pamP->tuple_type, "GRAYSCALE", 9)) { if (pamP->depth == 1) @@ -932,7 +932,7 @@ pamtopng(FILE * const ifP, if (cmdline.interlace) { /* Libpng will expect us to provide pixels in interlaced sequence - if we write row-by-row, and that is much to difficult, so we + if we write row-by-row, and that is much too difficult, so we do whole-image-at-once and let Libpng do the work. */ writeRasterWholeImg(&pam, pngxP, pnmBitDepth); |