improved render performance by moving image creation and loading away from draw event