Fixed bug that could sometimes cause image to appear blank.
Merge pull request #4 from zhangao0086/1.0.1

Fixed bug that could sometimes cause image to appear blank.