small change to draw-image to make printing a side effect