Update util drawImage function