diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-22 13:02:27 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-22 13:02:27 +0000 |
commit | 2d333142924f4e7396de449189e2fa383f29248f (patch) | |
tree | 2e5c1f6f344901ffae26c0459c34ce38a1a48d0b /apps/examples/nximage | |
parent | f501b8d7c5e02da4ad56b85aa06403e078814b94 (diff) | |
download | nuttx-2d333142924f4e7396de449189e2fa383f29248f.tar.gz nuttx-2d333142924f4e7396de449189e2fa383f29248f.tar.bz2 nuttx-2d333142924f4e7396de449189e2fa383f29248f.zip |
Documentation update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3811 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nximage')
-rwxr-xr-x | apps/examples/nximage/nximage_bkgd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/examples/nximage/nximage_bkgd.c b/apps/examples/nximage/nximage_bkgd.c index 4774fe74e..1aa74f58f 100755 --- a/apps/examples/nximage/nximage_bkgd.c +++ b/apps/examples/nximage/nximage_bkgd.c @@ -339,7 +339,14 @@ void nximage_image(NXWINDOW hwnd) for (i = 0; i < SCALED_WIDTH; i++) { - g_runs[0].run[i] = nximage_avgcolor(g_runs[0].run[i], g_runs[1].run[i]); + /* Only average if the corresponding pixels in each row differ */ + + nxgl_mxpixel_t pix0 = g_runs[0].run[i]; + nxgl_mxpixel_t pix1 = g_runs[1].run[i]; + if (pix0 != pix1) + { + g_runs[0].run[i] = nximage_avgcolor(pix0, pix1); + } } #endif |