add image data validation when loading image data
Merge pull request #237 from koreader/chrox-master

add image data validation when loading image data