Fixed a bug in which an image drawn from a DOM element could not be resized