make the image widget size adaptive to images. Find that for some certain bmp images, open image will lead to a wrong result.