fix off-by-one in writePNG() method
fix RGB16 to 8bit grayscale conversion
Merge pull request #266 from hwhw/master

Fixes for blitbuffer implementation