What's the proper syntax for setting the image compression for the exportRaster method? I'm trying to export an RGB orthomosaic to a Geotiff with JPG compression, quality=90, using the code below:
import Metashape
chunk = Metashape.app.document.chunk
compression = Metashape.ImageCompression
compression.tiff_compression = Metashape.ImageCompression.TiffCompressionJPEG
compression.jpeg_quality = 90
out_projection = Metashape.OrthoProjection()
out_projection.type = Metashape.OrthoProjection.Type.Planar
out_projection.crs = Metashape.CoordinateSystem("EPSG::32610")
chunk.exportRaster(path = 'D:\my\output\path\geotiff.tif',
source_data = Metashape.DataSource.OrthomosaicData,
format = Metashape.RasterFormatTiles,
image_format = Metashape.ImageFormatTIFF,
image_compression = compression,
save_alpha = True,
white_background = True,
resolution_x = 0.10,
resolution_y = 0.10,
projection = out_projection
)
But I keep getting this error.
TypeError: invalid value type
I'm guessing I must have the ImageCompression syntax wrong, but I haven't been able to find an example of the correct way of doing this in the forums.