Hi! Is there any way (at least theoretically, using python) to export 16bit float image instead of typical 8bit png raster?
Right now I am using this to export:
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
arcpy.mapping.ExportToPNG (mxd, r"D:\mosaicrasterdata\FinalExport" + str(mxd.dataDrivenPages.pageRow.Name) + ".png", df,10016,10016,1210, 100, True)
del mxd
but none of the exportToPNG or exportToTIFF has options to deal with 16bit or 32 bit files, selection is only limited to:
Maybe I can somehow obtain that layour image bit data manually and save it to file myself?
depends on how bad you need it and you external skills with python numpy and matplotlib
Can I save a numpy array as a 16-bit image using "normal" (Enthought) python? - Stack Overflow
and if you have scikit and pil (aka with Pro install of the SciPy stack), there is
https://blog.philippklaus.de/2011/08/handle-16bit-tiff-images-in-python
Dr Google other options, but most rely on numpy/scipy and builtin or external libraries like pypng
I am good with coding, so actual export will not be a problem for me. But how to get hold on the actual raw frame data? It would be easy for me, if I could see source file of a arcpy.mapping.ExportToPNG function. Its likely it gets access on the frame image data, properly transformed with all coordinates and e.t.c, and then goes on with saving it. But that is what I can not find anywhere.