fix computeImageSize error