Show / Hide Table of Contents

Class RuntimeImage

An image data container used with several image input and outputs in the API. Supports opening PNG and JPEG images.

Inheritance
System.Object
RuntimeImage
Implements
ILoadable
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.UI
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class RuntimeImage : ILoadable

Constructors

Name Description
RuntimeImage(Byte[])

Initializes a new instance of the RuntimeImage class from image data encoded in PNG or JPEG format.

RuntimeImage(ReadOnlySpan<Byte>)

Initializes a new instance of the RuntimeImage class from an image buffer encoded in PNG or JPEG format.

RuntimeImage(Uri)

Initializes a new instance of the RuntimeImage class from a URI of a PNG or JPEG file.

Properties

Name Description
Height

Gets the height of the image in physical pixels

LoadError

Gets the System.Exception associated with the last load error.

LoadStatus

Gets the load status.

Source

Gets the URI endpoint for this image, or null if it's a local in-memory image.

Width

Gets the width of the image in physical pixels

Methods

Name Description
CancelLoad()

Cancel loading metadata for the object.

FromStreamAsync(Stream)

Creates a RuntimeImage from a data stream with a PNG or JPEG format.

GetEncodedBufferAsync()

Returns the image data in the same format that it was created, either PNG or JPEG.

GetEncodedBufferAsync(CancellationToken)

Returns the image data in the same format that it was created, either PNG or JPEG.

GetRawBufferAsync()

Gets the decoded 32-bit image buffer in RGBA order.

LoadAsync()

Load the metadata for the object asynchronously.

RetryLoadAsync()

Loads or retries loading metadata for the object asynchronously.

Events

Name Description
Loaded

Event that is raised when the object is done loading.

LoadStatusChanged

Event that is raised when the LoadStatus property changes.

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

Relevant samples

Mobile map (search and route): Display maps and use locators to enable search and routing offline using a Mobile Map Package.
Read shapefile metadata: Read a shapefile and display its metadata.
Take screenshot: Take a screenshot of the map.
In This Article
Back to top Copyright © 2022 Esri.