update img's w and h by yin.liu