fix invalid image data offset in texture header

add test to validate texture image data