Improve raster writing.