This task exports a full-resolution raster to a PNG file.
Example
e = ENVI()
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Subset = ENVISubsetRaster(Raster, BANDS=[0])
Task = ENVITask('ExportRasterToPNG')
Task.INPUT_RASTER = Subset
Task.Execute
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_RASTER)
Syntax
Result = ENVITask('ExportRasterToPNG')
Input properties (Set, Get): INPUT_RASTER, OUTPUT_URI
Output properties (Get only): OUTPUT_RASTER
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
AddParameter
Execute
Parameter
ParameterNames
RemoveParameter
Properties
This task inherits the following properties from ENVITask:
COMMUTE_ON_DOWNSAMPLE
COMMUTE_ON_SUBSET
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
This task also contains the following properties:
INPUT_RASTER (required)
Specify a raster to export to PNG. Since a PNG file can only have one or three bands, you must define a spectral subset of one or three bands from the input raster before running the task. See the code example above.
OUTPUT_RASTER
This is an object reference to the output raster, of filetype PNG.
OUTPUT_URI (required)
Specify a string with the fully qualified path and filename for the exported PNG file.
Version History
API Version
4.3
See Also
ENVITask, ExportRasterToCADRG Task, ExportRasterToCOG Task, ExportRasterToENVI Task, ExportRasterToJPEG2000 Task, ExportRasterToKMZ Task, ExportRasterToNITF20 Task, ExportRasterToNITF21 Task, ExportRasterToNSIF10 Task, ExportRasterToTIFF Task