diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/cameratopam/camera.c | 8 | ||||
-rw-r--r-- | converter/other/giftopnm.c | 2 | ||||
-rw-r--r-- | converter/other/pamtosvg/pxl-outline.c | 2 | ||||
-rw-r--r-- | converter/ppm/ppmtompeg/bsearch.c | 1 |
4 files changed, 7 insertions, 6 deletions
diff --git a/converter/other/cameratopam/camera.c b/converter/other/cameratopam/camera.c index 14d208e3..d318e379 100644 --- a/converter/other/cameratopam/camera.c +++ b/converter/other/cameratopam/camera.c @@ -15,6 +15,7 @@ #include "pm_config.h" #include "pm.h" #include "mallocvar.h" +#include "pm_c_util.h" #include "global_variables.h" #include "cameratopam.h" @@ -699,11 +700,12 @@ kodak_radc_load_raw(Image const image) { init_decoder(); getbits(ifp, -1); - for (i = 0; i < 3; ++i) { + for (i = 0; i < ARRAY_SIZE(buf); ++i) { unsigned int j; - for (j = 0; j < 3; ++j) { + for (j = 0; j < ARRAY_SIZE(buf[0]); ++j) { unsigned int k; - buf[i][j][k] = 2048; + for (k = 0; k < ARRAY_SIZE(buf[0][0]); ++k) + buf[i][j][k] = 2048; } } for (row=0; row < height; row+=4) { diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c index 9f4bc8a1..96a6fc4c 100644 --- a/converter/other/giftopnm.c +++ b/converter/other/giftopnm.c @@ -365,7 +365,7 @@ getDataBlock(FILE * const ifP, pm_message("EOF or error in reading DataBlock size from file. %s", error); pm_strfree(error); - *errorP = FALSE; + *errorP = NULL; *eofP = TRUE; *lengthP = 0; } else { diff --git a/converter/other/pamtosvg/pxl-outline.c b/converter/other/pamtosvg/pxl-outline.c index 0dda3cc3..a1fa5299 100644 --- a/converter/other/pamtosvg/pxl-outline.c +++ b/converter/other/pamtosvg/pxl-outline.c @@ -269,7 +269,7 @@ findOneCenterline(bitmap_type const bitmap, */ { pm_pixelcoord pos; - pos.col = col; pos.row = bitmap.height - row - 1; + pos.col = originalCol; pos.row = bitmap.height - originalRow - 1; LOG2(" (%d,%d)", pos.col, pos.row); append_outline_pixel(&outline, pos); } diff --git a/converter/ppm/ppmtompeg/bsearch.c b/converter/ppm/ppmtompeg/bsearch.c index db34d95b..c618bbd4 100644 --- a/converter/ppm/ppmtompeg/bsearch.c +++ b/converter/ppm/ppmtompeg/bsearch.c @@ -834,7 +834,6 @@ BMotionSearchCross2(const LumBlock * const currentBlockP, interpErrF = FindBestMatch(&forwardBlock, currentBlockP, next, by, bx, &newMotion.bwd, bestErr, searchRangeB); - bestErr = min(bestErr, interpErr); interpErrB = FindBestMatch(&backBlock, currentBlockP, prev, by, bx, &newMotion.fwd, bestErr, searchRangeB); |