Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.


  >  Docs Center  >  ENVI API  >  Processing  >  ExportRasterToPNG

ExportRasterToPNG

ENVIExportRasterToPNGTask

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, Service Pack 1

Introduced

API Version


3.3

See Also


ENVITask, ENVITask::Parameter, ENVISubsetRaster



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us