ExportRasterToPNG Task

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 parameters (Set, Get): INPUT_RASTER, OUTPUT_URI

Output parameters (Get only): OUTPUT_RASTER

Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.

Input Parameters

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_URI (optional)

Specify a string with the fully qualified path and filename for the exported PNG file.

Output Parameters

OUTPUT_RASTER

This is an object reference to the output raster, of filetype PNG.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.2.1

Introduced

See Also

ENVITask, ExportRasterToCADRG Task, ExportRasterToCOG Task, ExportRasterToENVI Task, ExportRasterToJPEG2000 Task, ExportRasterToKMZ Task, ExportRasterToNITF20 Task, ExportRasterToNITF21 Task, ExportRasterToNSIF10 Task, ExportRasterToTIFF Task, Masking Support in ENVITasks