moved more utility methods to ImgUtil