Hi, I want to export a quite large orthomosaic with the jpeg compression to reduce the size.
I used the following script, but it reported an error "cant write image".
import Metashape
chunk = Metashape.app.document.chunk
d_projection = Metashape.OrthoProjection()
d_projection.crs = Metashape.CoordinateSystem("EPSG::4326")
compression = Metashape.ImageCompression()
compression.tiff_compression = Metashape.ImageCompression.TiffCompressionJPEG
compression.jpeg_quality = 20
compression.tiff_big = True
compression.tiff_compression = True
chunk.exportRaster("C:/data/test.tif",
format = Metashape.RasterFormatTiles,
image_format = Metashape.ImageFormat.ImageFormatJPEG,
image_compression = compression,
save_alpha = False,
white_background = False,
save_kml = False,
description = " ",
projection = d_projection)