Fix the problem that get the true size for image