commit before changing drawImageOnCanvas and orientation