add SaveToWriter for save image to io.Writer