This task exports a full-resolution raster to a PNG file.

Example


; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
 
; Process a spectral subset
Subset = ENVISubsetRaster(Raster, BANDS=[0])
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('ExportRasterToPNG')
 
; Define inputs
Task.INPUT_RASTER = Subset
 
; Run the task
Task.Execute
 
; Display the result
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


ENVI 5.2. 1

Introduced

API Version


4.2

See Also


ENVITask, ExportRasterToCADRG Task, ExportRasterToCOG Task, ExportRasterToENVI Task, ExportRasterToKMZ Task, ExportRasterToNITF20 Task, ExportRasterToNITF21 Task, ExportRasterToNSIF10 Task, ExportRasterToTIFF Task