diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pamtopdbimg.c | 4 | ||||
-rw-r--r-- | converter/other/pdbimgtopam.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/converter/other/pamtopdbimg.c b/converter/other/pamtopdbimg.c index 66d737fa..6454292e 100644 --- a/converter/other/pamtopdbimg.c +++ b/converter/other/pamtopdbimg.c @@ -437,7 +437,7 @@ g16pack(tuple * const tupleRow, for (col = 0, off = 0, seg = &outData[0]; col < paddedWidth; ++col) { if (col < pamP->width) - setg16pixel(*seg, 16 - tupleRow[col][0] * 16 / pamP->maxval, off); + setg16pixel(*seg, 15 - tupleRow[col][0] * 15 / pamP->maxval, off); else /* Pad on the right with white */ setgpixel(*seg, 0, off); @@ -468,7 +468,7 @@ gpack(tuple * const tupleRow, for (col = 0, off = 0, seg = &outData[0]; col < paddedWidth; ++col) { if (col < pamP->width) - setgpixel(*seg, 4 - tupleRow[col][0] * 4 / pamP->maxval, off); + setgpixel(*seg, 3 - tupleRow[col][0] * 3 / pamP->maxval, off); else /* Pad on the right with white */ setgpixel(*seg, 0, off); diff --git a/converter/other/pdbimgtopam.c b/converter/other/pdbimgtopam.c index 01fcfb8b..6b7c6008 100644 --- a/converter/other/pdbimgtopam.c +++ b/converter/other/pdbimgtopam.c @@ -618,7 +618,7 @@ munpack(const uint8_t * const p, uint8_t * const b, int const w) { - static const uint8_t pal[] = {0x00, 0x01}; + static const uint8_t pal[] = {PAM_BW_WHITE, PAM_BLACK}; const uint8_t * seg; unsigned int i; |