Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: dyoung on January 04, 2020, 05:48:09 PM
-
Hello -- version 1.6 dropped exportOrthomosaic() and now uses exportRaster() with source_data=Metashape.OrthomosaicData. However, exportRaster() does not have a tiff_big parameter like exportOrthomosaic() did. How do I export a BigTIFF using this function? I have tried the following, but it does not work.
Metashape.ImageCompression.tiff_big = True
doc.chunk.exportRaster(path="path/to/file.tif", source_data=Metashape.OrthomosaicData)
I need to use a BigTIFF because with normal TIFF settings, I get: libtiff error: Maximum TIFF file size exceeded
Thank in advance for any help!
Derek
-
Hello Derek,
Please see the example below (for version 1.6.0):
compression = Metashape.ImageCompression()
compression.tiff_big = True
chunk.exportRaster(path = "path/to/file.tif", source_data=Metashape.OrthomosaicData, compression = compression)
-
Ah that makes sense! That worked with a slight modification of the last parameter:
image_compression = compression
Thanks!
-
Yes, it should be image_compression, sorry for the confusion.
-
Thank I had a similar question. Big tiff is now working.
How can I export data with TiffCompressionLZW?
Thanks! :)
-
Hello Sven,
You should use the corresponding parameter of ImageCompression class:
compression = Metashape.ImageCompression()
compression.tiff_compression = Metashape.ImageCompression.TiffCompressionLZW
chunk.exportRaster(path = "path/to/file.tif", source_data=Metashape.OrthomosaicData, image_compression = compression)