I am making a Python script which will read in a GeoTIFF file, and will do both: convert the GeoTIFF into a static JPEG (that is much smaller in size), and create a separate text file which contains the GeoTIFF headers.
Using the Python GDAL API, I am able to get the script to open a GeoTIFF file, and print details, such as the RasterXSize
, RasterYSize
, RasterCount
, etc.
The problem is with saving a JPEG. I have researched the driver.CreateCopy()
method, however, all it does is create a very large JPEG file that is blank and can't be opened.
Also, which method retrieves all of the GeoTIFF Headers that I can save to a file?
I'm neither an expert on GeoTIFFs nor GDAL, and I greatly appreciate the assistance!