How to save window display as jpg format in rasterio Python?

Viewed 48

I reading and visualizing GeoTiff with Rastrio in Python and I do not know how to export visualized window.

The example code for reading geotiff.

import rasterio 
from matplotlib import pyplot
from rasterio.plot import show
#src = rasterio.open(r'D:\Phenology\00RemoteSensing\clip_ndvi\TIFF\2015.01.01.tif')
src2 = rasterio.open(r'D:\Phenology\00RemoteSensing\Tif_Diem\float64\NDVIMOD09Q1TLcrop2001.01.01_001.tif')
#pyplot.imshow(src.read(1), cmap="Spectral")
#pyplot.show()

#show(src)
pyplot.figure(figsize=(10,10))
#show(src, cmap= "Spectral")
show(src2)
print(src2.height, src2.width)

ethe result display window which I want to export.

0 Answers
Related