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
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
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
FromNative(ImageRef)
Creates native representation of the ImageRef. No new reference is acquired.
public static ImageRef FromNative(ImageRef platformImageRef)
Parameters
platformImageRef
ImageRef
Returns
FromNative(SBSDKImageRef)
public static ImageRef FromNative(SBSDKImageRef platformImageRef)
Parameters
platformImageRef
SBSDKImageRef
Returns
FromPath(string, PathImageLoadOptions)
Creates ImageRef from the path to an image.
public ImageRef FromPath(string path, PathImageLoadOptions options = null)
Parameters
path
stringoptions
PathImageLoadOptions
Returns
FromPlatformImage(PlatformImage, BasicImageLoadOptions)
Creates ImageRef from a platform image.
public static ImageRef FromPlatformImage(PlatformImage image, BasicImageLoadOptions options = null)
Parameters
image
PlatformImageoptions
BasicImageLoadOptions
Returns
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
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
stringoptions
SaveImageOptions
Returns
ToNative()
Wraps native representation of the ImageRef. No new reference is acquired.
public ImageRef ToNative()
Returns
ToPlatformImage()
Returns stored image as a platform image.
public PlatformImage ToPlatformImage()