diff options
-rw-r--r-- | src/imagedisplay.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/imagedisplay.c b/src/imagedisplay.c index 26277a2..c2f2fbe 100644 --- a/src/imagedisplay.c +++ b/src/imagedisplay.c @@ -69,6 +69,7 @@ void imagedisplay_put_data(ImageDisplay *imagedisplay, ImageRecord imagerecord) unsigned int w, h; int min, max; double c, scale; + int b; h = imagerecord.height; w = imagerecord.width; @@ -78,8 +79,9 @@ void imagedisplay_put_data(ImageDisplay *imagedisplay, ImageRecord imagerecord) } min = 2<<15; max = 0; - for ( y=0; y<h; y++ ) { - for ( x=0; x<w; x++ ) { + b = (h+w)/20; /* Number of pixels of ignored border */ + for ( y=b; y<h-b; y++ ) { + for ( x=b; x<w-b; x++ ) { uint16_t val; val = imagerecord.image[x+w*y]; if ( val > max ) max = val; |