Table of Contents

Class ImageRef

Namespace
ScanbotSDK.MAUI
Assembly
ScanbotSDK.Shared.dll
public class ImageRef
Inheritance
ImageRef
Inherited Members

Constructors

ImageRef()

public ImageRef()

Properties

UniqueId

Unique id of the native resource the object points to.

public Guid UniqueId { get; }

Property Value

Guid

Methods

Clear()

Releases native resources stored by the ref. If two different ImageRef objects have the same uniqueId both of them become cleared.

public void Clear()

Clone()

Creates a deep copy of given ImageRef.

public ImageRef Clone()

Returns

ImageRef

Dispose()

public void Dispose()

Dispose(bool)

protected void Dispose(bool disposing)

Parameters

disposing bool

EncodeImage(EncodeImageOptions)

Returns the stored image encoded with the given options.

public byte[] EncodeImage(EncodeImageOptions options = null)

Parameters

options EncodeImageOptions

Returns

byte[]

FromEncodedBuffer(byte[], BufferImageLoadOptions)

Creates ImageRef from encoded buffer, e.g. from jpeg.

public ImageRef FromEncodedBuffer(byte[] encodedBuffer, BufferImageLoadOptions options = null)

Parameters

encodedBuffer byte[]
options BufferImageLoadOptions

Returns

ImageRef

FromNative(ImageRef)

Creates native representation of the ImageRef. No new reference is acquired.

public static ImageRef FromNative(ImageRef platformImageRef)

Parameters

platformImageRef ImageRef

Returns

ImageRef

FromNative(SBSDKImageRef)

public static ImageRef FromNative(SBSDKImageRef platformImageRef)

Parameters

platformImageRef SBSDKImageRef

Returns

ImageRef

FromPath(string, PathImageLoadOptions)

Creates ImageRef from the path to an image.

public ImageRef FromPath(string path, PathImageLoadOptions options = null)

Parameters

path string
options PathImageLoadOptions

Returns

ImageRef

FromPlatformImage(PlatformImage, BasicImageLoadOptions)

Creates ImageRef from a platform image.

public static ImageRef FromPlatformImage(PlatformImage image, BasicImageLoadOptions options = null)

Parameters

image PlatformImage
options BasicImageLoadOptions

Returns

ImageRef

Hibernate()

Compresses ImageRef and stores it either on disk or in memory according to global settings.

public void Hibernate()

Info()

Information about stored image.

public ImageInfo Info()

Returns

ImageInfo

ReleaseAllImages()

Releases all alive images despite any existing references.

public static void ReleaseAllImages()

SaveImage(string, SaveImageOptions)

Saves the stored image with the given options.

public bool SaveImage(string path, SaveImageOptions options = null)

Parameters

path string
options SaveImageOptions

Returns

bool

ToNative()

Wraps native representation of the ImageRef. No new reference is acquired.

public ImageRef ToNative()

Returns

ImageRef

ToPlatformImage()

Returns stored image as a platform image.

public PlatformImage ToPlatformImage()

Returns

PlatformImage