Skip to main content

Using the ImageRef API with the .NET MAUI Data Capture Modules

Overview

ImageRef is a lightweight image reference type used throughout the Scanbot SDK to represent image data in a unified and efficient manner. It acts as a universal interface for images that any component of the SDK captures, processes, or returns.

It enables memory-efficient image processing across the SDK and also makes it accessible across the SDKs on supported platforms.

For display, additional processing, or export, the ImageRef can be converted to the specific platform image type.

The following examples cover useful operations when working with ImageRef.

ImageRef creation from different sources

ImageRef from path
loading...
ImageRef from buffer
loading...

ImageRef usage

ImageRef can be used throughout the SDK as an input source for image data. The SDK also uses ImageRef as the output for image crops in scanner results. In general, ImageRef behaves similarly to a bitmap, but it exists in a different memory space and is managed by the SDK.

ImageRef can be used for running scanning operations:

Scan documents from ImageRef
loading...

You can save an image from an ImageRef to a path. If encryption is enabled in the SDK, its parameters will be used to encrypt the file.

Save image
loading...

You can also retrieve image size data.

ImageRef info
loading...

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license