fix get image width and height