📅  最后修改于: 2022-03-11 14:46:24.592000             🧑  作者: Mango
import rasterio
img=rasterio.open('my_raster.tif')
profile = img.profile
profile.update(dtype=rasterio.uint8,count=1,nodata=42, compress='lzw')