[trunk] Fixed a crash on 0xh or wx0 image size decoding 

Update  issue 427
[trunk] Fixed a crash on illegal tile offset when decoding 

Update  issue 427