处理image file is truncated错误, 处理0KB图片导致的OSError