Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Image

Typedefs

typedef struct scanbotsdk_buffer_t scanbotsdk_buffer_t
 Represents an instance of the opaque byte buffer.
 
typedef struct scanbotsdk_image_t scanbotsdk_image_t
 Represents an instance of the opaque image.
 
typedef struct scanbotsdk_raw_image_t scanbotsdk_raw_image_t
 Represents an instance of a raw image buffer.
 
typedef struct scanbotsdk_image_ref_profiler_t scanbotsdk_image_ref_profiler_t
 scanbotsdk_image_ref_profiler_t class
 
typedef enum scanbotsdk_color_conversion_t scanbotsdk_color_conversion_t
 scanbotsdk_color_conversion_t enum
 
typedef struct scanbotsdk_image_info_t scanbotsdk_image_info_t
 scanbotsdk_image_info_t class
 
typedef enum scanbotsdk_path_load_mode_t scanbotsdk_path_load_mode_t
 scanbotsdk_path_load_mode_t enum
 
typedef enum scanbotsdk_buffer_load_mode_t scanbotsdk_buffer_load_mode_t
 scanbotsdk_buffer_load_mode_t enum
 
typedef enum scanbotsdk_encoding_format_t scanbotsdk_encoding_format_t
 scanbotsdk_encoding_format_t enum
 
typedef struct scanbotsdk_basic_image_load_options_t scanbotsdk_basic_image_load_options_t
 scanbotsdk_basic_image_load_options_t class
 
typedef struct scanbotsdk_raw_image_load_options_t scanbotsdk_raw_image_load_options_t
 scanbotsdk_raw_image_load_options_t class
 
typedef struct scanbotsdk_path_image_load_options_t scanbotsdk_path_image_load_options_t
 scanbotsdk_path_image_load_options_t class
 
typedef struct scanbotsdk_buffer_image_load_options_t scanbotsdk_buffer_image_load_options_t
 scanbotsdk_buffer_image_load_options_t class
 
typedef struct scanbotsdk_save_image_options_t scanbotsdk_save_image_options_t
 scanbotsdk_save_image_options_t class
 
typedef struct scanbotsdk_encode_image_options_t scanbotsdk_encode_image_options_t
 scanbotsdk_encode_image_options_t class
 
typedef enum scanbotsdk_image_source_type_t scanbotsdk_image_source_type_t
 scanbotsdk_image_source_type_t enum
 
typedef struct scanbotsdk_image_source_t scanbotsdk_image_source_t
 scanbotsdk_image_source_t class
 
typedef struct scanbotsdk_image_profile_t scanbotsdk_image_profile_t
 scanbotsdk_image_profile_t class
 
typedef struct scanbotsdk_image_ref_profile_t scanbotsdk_image_ref_profile_t
 scanbotsdk_image_ref_profile_t class
 
typedef struct scanbotsdk_image_ref_pool_snapshot_t scanbotsdk_image_ref_pool_snapshot_t
 scanbotsdk_image_ref_pool_snapshot_t class
 
typedef struct scanbotsdk_image_ref_pool_snapshots_diff_t scanbotsdk_image_ref_pool_snapshots_diff_t
 scanbotsdk_image_ref_pool_snapshots_diff_t class
 
typedef enum scanbotsdk_image_rotation_t scanbotsdk_image_rotation_t
 scanbotsdk_image_rotation_t enum
 
typedef enum scanbotsdk_image_origin_t scanbotsdk_image_origin_t
 scanbotsdk_image_origin_t enum
 

Enumerations

enum  scanbotsdk_color_conversion_t {
  SCANBOTSDK_COLOR_CONVERSION_GRAY = 0 ,
  SCANBOTSDK_COLOR_CONVERSION_COLOR = 1 ,
  SCANBOTSDK_COLOR_CONVERSION_ANY_COLOR = 2 ,
  SCANBOTSDK_COLOR_CONVERSION_UNCHANGED = 3
}
 scanbotsdk_color_conversion_t enum More...
 
enum  scanbotsdk_path_load_mode_t {
  SCANBOTSDK_PATH_LOAD_MODE_EAGER = 0 ,
  SCANBOTSDK_PATH_LOAD_MODE_LAZY = 1 ,
  SCANBOTSDK_PATH_LOAD_MODE_LAZY_WITH_COPY = 2
}
 scanbotsdk_path_load_mode_t enum More...
 
enum  scanbotsdk_buffer_load_mode_t {
  SCANBOTSDK_BUFFER_LOAD_MODE_EAGER = 0 ,
  SCANBOTSDK_BUFFER_LOAD_MODE_LAZY = 1
}
 scanbotsdk_buffer_load_mode_t enum More...
 
enum  scanbotsdk_encoding_format_t {
  SCANBOTSDK_ENCODING_FORMAT_JPEG = 0 ,
  SCANBOTSDK_ENCODING_FORMAT_PNG = 1
}
 scanbotsdk_encoding_format_t enum More...
 
enum  scanbotsdk_image_source_type_t {
  SCANBOTSDK_IMAGE_SOURCE_TYPE_API = 0 ,
  SCANBOTSDK_IMAGE_SOURCE_TYPE_PLATFORM_IMAGE = 1 ,
  SCANBOTSDK_IMAGE_SOURCE_TYPE_CAMERA = 2 ,
  SCANBOTSDK_IMAGE_SOURCE_TYPE_FILE = 3 ,
  SCANBOTSDK_IMAGE_SOURCE_TYPE_BUFFER = 4 ,
  SCANBOTSDK_IMAGE_SOURCE_TYPE_OTHER = 5
}
 scanbotsdk_image_source_type_t enum More...
 
enum  scanbotsdk_image_rotation_t {
  SCANBOTSDK_IMAGE_ROTATION_NONE = 0 ,
  SCANBOTSDK_IMAGE_ROTATION_CLOCKWISE_90 = 1 ,
  SCANBOTSDK_IMAGE_ROTATION_CLOCKWISE_180 = 2 ,
  SCANBOTSDK_IMAGE_ROTATION_COUNTERCLOCKWISE_90 = 3
}
 scanbotsdk_image_rotation_t enum More...
 
enum  scanbotsdk_image_origin_t {
  SCANBOTSDK_IMAGE_ORIGIN_TOP_LEFT = 0 ,
  SCANBOTSDK_IMAGE_ORIGIN_TOP_RIGHT = 1 ,
  SCANBOTSDK_IMAGE_ORIGIN_BOTTOM_LEFT = 2 ,
  SCANBOTSDK_IMAGE_ORIGIN_BOTTOM_RIGHT = 3
}
 scanbotsdk_image_origin_t enum More...
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_raw_image (void *buffer, int width, int height, int channels, int stride, scanbotsdk_raw_image_load_options_t *options, scanbotsdk_image_t **image)
 Creates a new instance of the image from raw data.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_path (const char *path, scanbotsdk_path_image_load_options_t *options, scanbotsdk_image_t **image)
 Creates a new instance of the image from given path.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_encoded_buffer (void *buffer, size_t size, scanbotsdk_buffer_image_load_options_t *options, scanbotsdk_image_t **image)
 Creates a new instance of the image from given encoded buffer, e.g. from jpeg.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_save (scanbotsdk_image_t *image, const char *path, scanbotsdk_save_image_options_t *options)
 Saves image at the given path.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_encode (scanbotsdk_image_t *image, scanbotsdk_encode_image_options_t *options, scanbotsdk_buffer_t **buffer)
 Encodes image to buffer. The allocated buffer is owned by the caller and must be freed with scanbotsdk_buffer_free when no longer needed.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_data (scanbotsdk_buffer_t *buffer, uint8_t **data)
 Returns view of the buffer data.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_size (scanbotsdk_buffer_t *buffer, size_t *size)
 Returns view of the buffer data.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_free (scanbotsdk_buffer_t *buffer)
 Frees the buffer instance.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info (scanbotsdk_image_t *image, scanbotsdk_image_info_t **result)
 Returns the image info.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_free (scanbotsdk_image_t *object)
 Destroys the image instance. If null is passed does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_get_unique_id (scanbotsdk_image_t *image, const char **unique_id)
 Returns the unique id of the image.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_id (const char *unique_id, scanbotsdk_image_t **image)
 Returns the image from the unique id with acquiring reference.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_acquire_reference (const char *unique_id)
 Acquires reference for the image with the given unique id.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_release_reference (const char *unique_id)
 Releases reference for the image with the given unique id.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_release_all_images ()
 Releases all alive images despite any existing references.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_to_raw_image (scanbotsdk_image_t *image, scanbotsdk_raw_image_t **raw_image)
 Provides the image data as raw image trying to avoid data copy.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_free (scanbotsdk_raw_image_t *raw_image)
 Frees the raw_image instance.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_data (scanbotsdk_raw_image_t *raw_image, void **data)
 Provides pointer to the raw image data.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_width (scanbotsdk_raw_image_t *raw_image, int *width)
 Provides the raw image width.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_height (scanbotsdk_raw_image_t *raw_image, int *height)
 Provides the raw image height.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_channels (scanbotsdk_raw_image_t *raw_image, int *channels)
 Provides number of the raw image channels.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_stride (scanbotsdk_raw_image_t *raw_image, int *stride)
 Provides the raw image stride.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_free (scanbotsdk_image_ref_profiler_t *self)
 Frees the memory allocated for the instance of scanbotsdk_image_ref_profiler_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_make_snapshot (scanbotsdk_image_ref_pool_snapshot_t **result)
 Returns a snapshot of all alive ImageRefs. The snapshot contains a list of ImageRefs with information such as in-memory size. If detailed profiling is enabled (by calling enableDetailedProfiling beforehand), the profile will contain additional information such as the source from which each ImageRef has been created.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_enable_detailed_profiling ()
 After the function is called, ImageRefs will store additional information, such as source from which they were created. This information may be important when trying to understand a profile. This function must be called BEFORE the first ImageRef is created, otherwise details may be lost.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_diff (scanbotsdk_image_ref_pool_snapshot_t *first_snapshot, scanbotsdk_image_ref_pool_snapshot_t *second_snapshot, scanbotsdk_image_ref_pool_snapshots_diff_t **result)
 Computes difference between two snapshots. To confirm that a particular operation doesn't leak, take a snapshot before and after the operation, and check that the diff doesn't contain any unexpected new ImageRefs.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_conversion_t_to_string (scanbotsdk_color_conversion_t value, const char **result)
 Returns the string representation of the given scanbotsdk_color_conversion_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_free (scanbotsdk_image_info_t *object)
 Frees the memory allocated for the instance of scanbotsdk_image_info_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_get_height (scanbotsdk_image_info_t *self, int *height)
 Returns value of height field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_set_height (scanbotsdk_image_info_t *self, int height)
 Sets value of height field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_get_width (scanbotsdk_image_info_t *self, int *width)
 Returns value of width field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_set_width (scanbotsdk_image_info_t *self, int width)
 Sets value of width field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_get_max_byte_size (scanbotsdk_image_info_t *self, int *max_byte_size)
 Returns value of max_byte_size field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_set_max_byte_size (scanbotsdk_image_info_t *self, int max_byte_size)
 Sets value of max_byte_size field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_load_mode_t_to_string (scanbotsdk_path_load_mode_t value, const char **result)
 Returns the string representation of the given scanbotsdk_path_load_mode_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_load_mode_t_to_string (scanbotsdk_buffer_load_mode_t value, const char **result)
 Returns the string representation of the given scanbotsdk_buffer_load_mode_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encoding_format_t_to_string (scanbotsdk_encoding_format_t value, const char **result)
 Returns the string representation of the given scanbotsdk_encoding_format_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_create (scanbotsdk_rect_t crop_rect, bool live_source, scanbotsdk_basic_image_load_options_t **result)
 Creates a new instance of scanbotsdk_basic_image_load_options with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_create_with_defaults (bool live_source, scanbotsdk_basic_image_load_options_t **result)
 Creates a new instance of scanbotsdk_basic_image_load_options_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_free (scanbotsdk_basic_image_load_options_t *object)
 Frees the memory allocated for the instance of scanbotsdk_basic_image_load_options_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_get_crop_rect (scanbotsdk_basic_image_load_options_t *self, scanbotsdk_rect_t *crop_rect)
 Returns value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_set_crop_rect (scanbotsdk_basic_image_load_options_t *self, scanbotsdk_rect_t crop_rect)
 Sets value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_get_live_source (scanbotsdk_basic_image_load_options_t *self, bool *live_source)
 Returns value of live_source field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_set_live_source (scanbotsdk_basic_image_load_options_t *self, bool live_source)
 Sets value of live_source field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_create (scanbotsdk_rect_t crop_rect, bool live_source, scanbotsdk_image_origin_t origin, scanbotsdk_image_rotation_t orientation, scanbotsdk_raw_image_load_options_t **result)
 Creates a new instance of scanbotsdk_raw_image_load_options with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_create_with_defaults (bool live_source, scanbotsdk_raw_image_load_options_t **result)
 Creates a new instance of scanbotsdk_raw_image_load_options_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_free (scanbotsdk_raw_image_load_options_t *object)
 Frees the memory allocated for the instance of scanbotsdk_raw_image_load_options_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_crop_rect (scanbotsdk_raw_image_load_options_t *self, scanbotsdk_rect_t *crop_rect)
 Returns value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_crop_rect (scanbotsdk_raw_image_load_options_t *self, scanbotsdk_rect_t crop_rect)
 Sets value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_live_source (scanbotsdk_raw_image_load_options_t *self, bool *live_source)
 Returns value of live_source field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_live_source (scanbotsdk_raw_image_load_options_t *self, bool live_source)
 Sets value of live_source field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_origin (scanbotsdk_raw_image_load_options_t *self, scanbotsdk_image_origin_t *origin)
 Returns value of origin field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_origin (scanbotsdk_raw_image_load_options_t *self, scanbotsdk_image_origin_t origin)
 Sets value of origin field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_orientation (scanbotsdk_raw_image_load_options_t *self, scanbotsdk_image_rotation_t *orientation)
 Returns value of orientation field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_orientation (scanbotsdk_raw_image_load_options_t *self, scanbotsdk_image_rotation_t orientation)
 Sets value of orientation field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_create (scanbotsdk_rect_t crop_rect, scanbotsdk_color_conversion_t color_conversion, scanbotsdk_path_load_mode_t load_mode, scanbotsdk_path_image_load_options_t **result)
 Creates a new instance of scanbotsdk_path_image_load_options with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_create_with_defaults (scanbotsdk_path_image_load_options_t **result)
 Creates a new instance of scanbotsdk_path_image_load_options_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_free (scanbotsdk_path_image_load_options_t *object)
 Frees the memory allocated for the instance of scanbotsdk_path_image_load_options_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_get_crop_rect (scanbotsdk_path_image_load_options_t *self, scanbotsdk_rect_t *crop_rect)
 Returns value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_set_crop_rect (scanbotsdk_path_image_load_options_t *self, scanbotsdk_rect_t crop_rect)
 Sets value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_get_color_conversion (scanbotsdk_path_image_load_options_t *self, scanbotsdk_color_conversion_t *color_conversion)
 Returns value of color_conversion field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_set_color_conversion (scanbotsdk_path_image_load_options_t *self, scanbotsdk_color_conversion_t color_conversion)
 Sets value of color_conversion field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_get_load_mode (scanbotsdk_path_image_load_options_t *self, scanbotsdk_path_load_mode_t *load_mode)
 Returns value of load_mode field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_set_load_mode (scanbotsdk_path_image_load_options_t *self, scanbotsdk_path_load_mode_t load_mode)
 Sets value of load_mode field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_create (scanbotsdk_rect_t crop_rect, scanbotsdk_color_conversion_t color_conversion, scanbotsdk_buffer_load_mode_t load_mode, scanbotsdk_buffer_image_load_options_t **result)
 Creates a new instance of scanbotsdk_buffer_image_load_options with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_create_with_defaults (scanbotsdk_buffer_image_load_options_t **result)
 Creates a new instance of scanbotsdk_buffer_image_load_options_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_free (scanbotsdk_buffer_image_load_options_t *object)
 Frees the memory allocated for the instance of scanbotsdk_buffer_image_load_options_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_get_crop_rect (scanbotsdk_buffer_image_load_options_t *self, scanbotsdk_rect_t *crop_rect)
 Returns value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_set_crop_rect (scanbotsdk_buffer_image_load_options_t *self, scanbotsdk_rect_t crop_rect)
 Sets value of crop_rect field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_get_color_conversion (scanbotsdk_buffer_image_load_options_t *self, scanbotsdk_color_conversion_t *color_conversion)
 Returns value of color_conversion field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_set_color_conversion (scanbotsdk_buffer_image_load_options_t *self, scanbotsdk_color_conversion_t color_conversion)
 Sets value of color_conversion field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_get_load_mode (scanbotsdk_buffer_image_load_options_t *self, scanbotsdk_buffer_load_mode_t *load_mode)
 Returns value of load_mode field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_set_load_mode (scanbotsdk_buffer_image_load_options_t *self, scanbotsdk_buffer_load_mode_t load_mode)
 Sets value of load_mode field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_create (int quality, scanbotsdk_save_image_options_t **result)
 Creates a new instance of scanbotsdk_save_image_options with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_create_with_defaults (scanbotsdk_save_image_options_t **result)
 Creates a new instance of scanbotsdk_save_image_options_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_free (scanbotsdk_save_image_options_t *object)
 Frees the memory allocated for the instance of scanbotsdk_save_image_options_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_get_quality (scanbotsdk_save_image_options_t *self, int *quality)
 Returns value of quality field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_set_quality (scanbotsdk_save_image_options_t *self, int quality)
 Sets value of quality field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_create (int quality, scanbotsdk_encoding_format_t format, scanbotsdk_encode_image_options_t **result)
 Creates a new instance of scanbotsdk_encode_image_options with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_create_with_defaults (scanbotsdk_encode_image_options_t **result)
 Creates a new instance of scanbotsdk_encode_image_options_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_free (scanbotsdk_encode_image_options_t *object)
 Frees the memory allocated for the instance of scanbotsdk_encode_image_options_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_get_quality (scanbotsdk_encode_image_options_t *self, int *quality)
 Returns value of quality field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_set_quality (scanbotsdk_encode_image_options_t *self, int quality)
 Sets value of quality field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_get_format (scanbotsdk_encode_image_options_t *self, scanbotsdk_encoding_format_t *format)
 Returns value of format field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_set_format (scanbotsdk_encode_image_options_t *self, scanbotsdk_encoding_format_t format)
 Sets value of format field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_type_t_to_string (scanbotsdk_image_source_type_t value, const char **result)
 Returns the string representation of the given scanbotsdk_image_source_type_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_create (scanbotsdk_image_source_type_t type, const char *file_path, scanbotsdk_image_source_t **result)
 Creates a new instance of scanbotsdk_image_source with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_free (scanbotsdk_image_source_t *object)
 Frees the memory allocated for the instance of scanbotsdk_image_source_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_get_type (scanbotsdk_image_source_t *self, scanbotsdk_image_source_type_t *type)
 Returns value of type field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_set_type (scanbotsdk_image_source_t *self, scanbotsdk_image_source_type_t type)
 Sets value of type field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_get_file_path (scanbotsdk_image_source_t *self, const char **file_path)
 Returns value of file_path field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_set_file_path (scanbotsdk_image_source_t *self, const char *file_path)
 Sets value of file_path field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_create (int bitmap_memory_consumption, int hibernation_memory_consumption, scanbotsdk_image_profile_t **result)
 Creates a new instance of scanbotsdk_image_profile with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_create_with_defaults (scanbotsdk_image_profile_t **result)
 Creates a new instance of scanbotsdk_image_profile_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_free (scanbotsdk_image_profile_t *object)
 Frees the memory allocated for the instance of scanbotsdk_image_profile_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_get_bitmap_memory_consumption (scanbotsdk_image_profile_t *self, int *bitmap_memory_consumption)
 Returns value of bitmap_memory_consumption field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_set_bitmap_memory_consumption (scanbotsdk_image_profile_t *self, int bitmap_memory_consumption)
 Sets value of bitmap_memory_consumption field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_get_hibernation_memory_consumption (scanbotsdk_image_profile_t *self, int *hibernation_memory_consumption)
 Returns value of hibernation_memory_consumption field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_set_hibernation_memory_consumption (scanbotsdk_image_profile_t *self, int hibernation_memory_consumption)
 Sets value of hibernation_memory_consumption field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_create (scanbotsdk_ref_counted_object_profile_t *ref_info, scanbotsdk_image_profile_t *image_info, scanbotsdk_image_source_t *image_source, scanbotsdk_image_ref_profile_t **result)
 Creates a new instance of scanbotsdk_image_ref_profile with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_free (scanbotsdk_image_ref_profile_t *object)
 Frees the memory allocated for the instance of scanbotsdk_image_ref_profile_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_get_ref_info (scanbotsdk_image_ref_profile_t *self, scanbotsdk_ref_counted_object_profile_t **ref_info)
 Returns value of ref_info field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_set_ref_info (scanbotsdk_image_ref_profile_t *self, scanbotsdk_ref_counted_object_profile_t *ref_info)
 Sets value of ref_info field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_get_image_info (scanbotsdk_image_ref_profile_t *self, scanbotsdk_image_profile_t **image_info)
 Returns value of image_info field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_set_image_info (scanbotsdk_image_ref_profile_t *self, scanbotsdk_image_profile_t *image_info)
 Sets value of image_info field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_get_image_source (scanbotsdk_image_ref_profile_t *self, scanbotsdk_image_source_t **image_source)
 Returns value of image_source field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_set_image_source (scanbotsdk_image_ref_profile_t *self, scanbotsdk_image_source_t *image_source)
 Sets value of image_source field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_create (scanbotsdk_image_ref_profile_t **image_ref_profiles, size_t image_ref_profiles_size, int64_t total_memory_consumption, scanbotsdk_image_ref_pool_snapshot_t **result)
 Creates a new instance of scanbotsdk_image_ref_pool_snapshot with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_create_with_defaults (scanbotsdk_image_ref_profile_t **image_ref_profiles, size_t image_ref_profiles_size, scanbotsdk_image_ref_pool_snapshot_t **result)
 Creates a new instance of scanbotsdk_image_ref_pool_snapshot_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_free (scanbotsdk_image_ref_pool_snapshot_t *object)
 Frees the memory allocated for the instance of scanbotsdk_image_ref_pool_snapshot_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_get_image_ref_profiles (scanbotsdk_image_ref_pool_snapshot_t *self, scanbotsdk_image_ref_profile_t **image_ref_profiles, size_t size)
 Returns value of image_ref_profiles field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_get_image_ref_profiles_size (scanbotsdk_image_ref_pool_snapshot_t *self, size_t *size)
 Returns size of image_ref_profiles array.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_set_image_ref_profiles (scanbotsdk_image_ref_pool_snapshot_t *self, scanbotsdk_image_ref_profile_t **image_ref_profiles, size_t image_ref_profiles_size)
 Sets value of image_ref_profiles field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_get_total_memory_consumption (scanbotsdk_image_ref_pool_snapshot_t *self, int64_t *total_memory_consumption)
 Returns value of total_memory_consumption field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_set_total_memory_consumption (scanbotsdk_image_ref_pool_snapshot_t *self, int64_t total_memory_consumption)
 Sets value of total_memory_consumption field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_create (int64_t total_memory_consumption_diff, const char **removed, size_t removed_size, const char **added, size_t added_size, const char **modified, size_t modified_size, scanbotsdk_image_ref_pool_snapshots_diff_t **result)
 Creates a new instance of scanbotsdk_image_ref_pool_snapshots_diff with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_create_with_defaults (const char **removed, size_t removed_size, const char **added, size_t added_size, const char **modified, size_t modified_size, scanbotsdk_image_ref_pool_snapshots_diff_t **result)
 Creates a new instance of scanbotsdk_image_ref_pool_snapshots_diff_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_free (scanbotsdk_image_ref_pool_snapshots_diff_t *object)
 Frees the memory allocated for the instance of scanbotsdk_image_ref_pool_snapshots_diff_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_total_memory_consumption_diff (scanbotsdk_image_ref_pool_snapshots_diff_t *self, int64_t *total_memory_consumption_diff)
 Returns value of total_memory_consumption_diff field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_total_memory_consumption_diff (scanbotsdk_image_ref_pool_snapshots_diff_t *self, int64_t total_memory_consumption_diff)
 Sets value of total_memory_consumption_diff field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_removed (scanbotsdk_image_ref_pool_snapshots_diff_t *self, const char **removed, size_t size)
 Returns value of removed field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_removed_size (scanbotsdk_image_ref_pool_snapshots_diff_t *self, size_t *size)
 Returns size of removed array.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_removed (scanbotsdk_image_ref_pool_snapshots_diff_t *self, const char **removed, size_t removed_size)
 Sets value of removed field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_added (scanbotsdk_image_ref_pool_snapshots_diff_t *self, const char **added, size_t size)
 Returns value of added field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_added_size (scanbotsdk_image_ref_pool_snapshots_diff_t *self, size_t *size)
 Returns size of added array.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_added (scanbotsdk_image_ref_pool_snapshots_diff_t *self, const char **added, size_t added_size)
 Sets value of added field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_modified (scanbotsdk_image_ref_pool_snapshots_diff_t *self, const char **modified, size_t size)
 Returns value of modified field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_modified_size (scanbotsdk_image_ref_pool_snapshots_diff_t *self, size_t *size)
 Returns size of modified array.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_modified (scanbotsdk_image_ref_pool_snapshots_diff_t *self, const char **modified, size_t modified_size)
 Sets value of modified field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_rotation_t_to_string (scanbotsdk_image_rotation_t value, const char **result)
 Returns the string representation of the given scanbotsdk_image_rotation_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_origin_t_to_string (scanbotsdk_image_origin_t value, const char **result)
 Returns the string representation of the given scanbotsdk_image_origin_t value.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_basic_image_load_options_t

◆ scanbotsdk_buffer_image_load_options_t

◆ scanbotsdk_buffer_load_mode_t

◆ scanbotsdk_buffer_t

Represents an instance of the opaque byte buffer.

Must be destroyed with scanbotsdk_buffer_free after use.

◆ scanbotsdk_color_conversion_t

scanbotsdk_color_conversion_t enum

Color conversion to apply during image loading.

◆ scanbotsdk_encode_image_options_t

◆ scanbotsdk_encoding_format_t

◆ scanbotsdk_image_info_t

◆ scanbotsdk_image_origin_t

scanbotsdk_image_origin_t enum

Location of the image origin in the image coordinate system.

◆ scanbotsdk_image_profile_t

scanbotsdk_image_profile_t class

ImageRef profile part specific to image information.

◆ scanbotsdk_image_ref_pool_snapshot_t

◆ scanbotsdk_image_ref_pool_snapshots_diff_t

◆ scanbotsdk_image_ref_profile_t

scanbotsdk_image_ref_profile_t class

ImageRef profile which provides detailed information about stored object.

◆ scanbotsdk_image_ref_profiler_t

scanbotsdk_image_ref_profiler_t class

ImageRef memory profiler.

ImageRefs are reference-counted. If references aren't correctly released for whatever reason, the image memory will leak. Leaking memory over time may cause out-of-memory crashes and must be avoided. The profiler can return basic and detailed information about all currently alive ImageRefs, that can be useful to track leaking ImageRefs or to confirm that there are no leaks.

◆ scanbotsdk_image_rotation_t

◆ scanbotsdk_image_source_t

scanbotsdk_image_source_t class

Description of source from which the ImageRef was created.

◆ scanbotsdk_image_source_type_t

scanbotsdk_image_source_type_t enum

The type of source which originated the underlying image.

◆ scanbotsdk_image_t

Represents an instance of the opaque image.

Must be destroyed with scanbotsdk_image_free after use.

◆ scanbotsdk_path_image_load_options_t

◆ scanbotsdk_path_load_mode_t

◆ scanbotsdk_raw_image_load_options_t

scanbotsdk_raw_image_load_options_t class

Options for loading images that come from sensor.

◆ scanbotsdk_raw_image_t

Represents an instance of a raw image buffer.

Must be destroyed with scanbotsdk_raw_image_free after use.

◆ scanbotsdk_save_image_options_t

Enumeration Type Documentation

◆ scanbotsdk_buffer_load_mode_t

scanbotsdk_buffer_load_mode_t enum

Image Ref Buffer Load Mode.

Enumerator
SCANBOTSDK_BUFFER_LOAD_MODE_EAGER 

Image is immediately decoded.

SCANBOTSDK_BUFFER_LOAD_MODE_LAZY 

Image is decoded the first time it's requested.

◆ scanbotsdk_color_conversion_t

scanbotsdk_color_conversion_t enum

Color conversion to apply during image loading.

Enumerator
SCANBOTSDK_COLOR_CONVERSION_GRAY 

Load image as grayscale.

SCANBOTSDK_COLOR_CONVERSION_COLOR 

Load image as 3-channel BGR.

SCANBOTSDK_COLOR_CONVERSION_ANY_COLOR 

Load image as 3-channel BGR if the source color space is color, otherwise as single-channel grayscale. Alpha channel is discarded.

SCANBOTSDK_COLOR_CONVERSION_UNCHANGED 

Load image as-is, preserving the alpha channel if it exists.

◆ scanbotsdk_encoding_format_t

scanbotsdk_encoding_format_t enum

Image Encoding Format.

Enumerator
SCANBOTSDK_ENCODING_FORMAT_JPEG 

JPEG encoding.

SCANBOTSDK_ENCODING_FORMAT_PNG 

PNG encoding.

◆ scanbotsdk_image_origin_t

scanbotsdk_image_origin_t enum

Location of the image origin in the image coordinate system.

Enumerator
SCANBOTSDK_IMAGE_ORIGIN_TOP_LEFT 

Origin is at the top left corner of the image.

SCANBOTSDK_IMAGE_ORIGIN_TOP_RIGHT 

Origin is at the top right corner of the image.

SCANBOTSDK_IMAGE_ORIGIN_BOTTOM_LEFT 

Origin is at the bottom left corner of the image.

SCANBOTSDK_IMAGE_ORIGIN_BOTTOM_RIGHT 

Origin is at the bottom right corner of the image.

◆ scanbotsdk_image_rotation_t

scanbotsdk_image_rotation_t enum

Image rotation.

Enumerator
SCANBOTSDK_IMAGE_ROTATION_NONE 

No rotation.

SCANBOTSDK_IMAGE_ROTATION_CLOCKWISE_90 

90 degrees clockwise rotation.

SCANBOTSDK_IMAGE_ROTATION_CLOCKWISE_180 

180 degrees rotation.

SCANBOTSDK_IMAGE_ROTATION_COUNTERCLOCKWISE_90 

90 degrees counterclockwise rotation.

◆ scanbotsdk_image_source_type_t

scanbotsdk_image_source_type_t enum

The type of source which originated the underlying image.

Enumerator
SCANBOTSDK_IMAGE_SOURCE_TYPE_API 

ImageRef was created by a call to an SDK feature, such as a scanner, image processor, etc.

SCANBOTSDK_IMAGE_SOURCE_TYPE_PLATFORM_IMAGE 

ImageRef was created from a platform image, e.g. Bitmap on Android, UIImage on iOS.

SCANBOTSDK_IMAGE_SOURCE_TYPE_CAMERA 

ImageRef was created from data from the camera.

SCANBOTSDK_IMAGE_SOURCE_TYPE_FILE 

ImageRef was created from a file.

SCANBOTSDK_IMAGE_SOURCE_TYPE_BUFFER 

ImageRef was created from an encoded buffer.

SCANBOTSDK_IMAGE_SOURCE_TYPE_OTHER 

ImageRef was created from another type, e.g. from custom loader.

◆ scanbotsdk_path_load_mode_t

scanbotsdk_path_load_mode_t enum

Image Ref Path Load Mode.

Enumerator
SCANBOTSDK_PATH_LOAD_MODE_EAGER 

Image is immediately loaded into memory.

SCANBOTSDK_PATH_LOAD_MODE_LAZY 

Image is loaded into memory the first time it's requested. Specified path must exist at the time of loading.

SCANBOTSDK_PATH_LOAD_MODE_LAZY_WITH_COPY 

Image is loaded into memory the first time it's requested. Specified path is copied into internal directory and so isn't required to exist at the time of loading.

Function Documentation

◆ scanbotsdk_basic_image_load_options_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_create ( scanbotsdk_rect_t crop_rect,
bool live_source,
scanbotsdk_basic_image_load_options_t ** result )

Creates a new instance of scanbotsdk_basic_image_load_options with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
crop_rectIf the rect is not empty, the image will be cropped to this rect before processing.
live_sourceTrue if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.
resultPointer to a variable that will store the created instance of scanbotsdk_basic_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_basic_image_load_options_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_create_with_defaults ( bool live_source,
scanbotsdk_basic_image_load_options_t ** result )

Creates a new instance of scanbotsdk_basic_image_load_options_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
live_sourceTrue if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.
resultPointer to a variable that will store the created instance of scanbotsdk_basic_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_basic_image_load_options_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_free ( scanbotsdk_basic_image_load_options_t * object)

Frees the memory allocated for the instance of scanbotsdk_basic_image_load_options_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_basic_image_load_options_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_basic_image_load_options_get_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_get_crop_rect ( scanbotsdk_basic_image_load_options_t * self,
scanbotsdk_rect_t * crop_rect )

Returns value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

Parameters
selfPointer to the instance of scanbotsdk_basic_image_load_options_t
crop_rectPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_basic_image_load_options_get_live_source()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_get_live_source ( scanbotsdk_basic_image_load_options_t * self,
bool * live_source )

Returns value of live_source field of the given object.

True if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.

Parameters
selfPointer to the instance of scanbotsdk_basic_image_load_options_t
live_sourcePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_basic_image_load_options_set_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_set_crop_rect ( scanbotsdk_basic_image_load_options_t * self,
scanbotsdk_rect_t crop_rect )

Sets value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_basic_image_load_options_t, the field of which will be set
crop_rectThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_basic_image_load_options_set_live_source()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_basic_image_load_options_set_live_source ( scanbotsdk_basic_image_load_options_t * self,
bool live_source )

Sets value of live_source field of the given object.

True if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_basic_image_load_options_t, the field of which will be set
live_sourceThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_data()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_data ( scanbotsdk_buffer_t * buffer,
uint8_t ** data )

Returns view of the buffer data.

Parameters
bufferPointer to the buffer instance
dataPointer to a variable that will be set to the buffer data.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_buffer_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_free ( scanbotsdk_buffer_t * buffer)

Frees the buffer instance.

Parameters
bufferPointer to the buffer instance to be freed
Returns
: Error code, SCANBOTSDK_OK if the free was successful

◆ scanbotsdk_buffer_image_load_options_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_create ( scanbotsdk_rect_t crop_rect,
scanbotsdk_color_conversion_t color_conversion,
scanbotsdk_buffer_load_mode_t load_mode,
scanbotsdk_buffer_image_load_options_t ** result )

Creates a new instance of scanbotsdk_buffer_image_load_options with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
crop_rectIf the rect is not empty, the image will be cropped to this rect before processing.
color_conversionColor conversion to apply during image loading.

Default is ANY_COLOR

Parameters
load_modeLoad mode.

Default is EAGER

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_buffer_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_image_load_options_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_create_with_defaults ( scanbotsdk_buffer_image_load_options_t ** result)

Creates a new instance of scanbotsdk_buffer_image_load_options_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_buffer_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_image_load_options_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_free ( scanbotsdk_buffer_image_load_options_t * object)

Frees the memory allocated for the instance of scanbotsdk_buffer_image_load_options_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_buffer_image_load_options_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_image_load_options_get_color_conversion()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_get_color_conversion ( scanbotsdk_buffer_image_load_options_t * self,
scanbotsdk_color_conversion_t * color_conversion )

Returns value of color_conversion field of the given object.

Color conversion to apply during image loading.

Default is ANY_COLOR

Parameters
selfPointer to the instance of scanbotsdk_buffer_image_load_options_t
color_conversionPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_buffer_image_load_options_get_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_get_crop_rect ( scanbotsdk_buffer_image_load_options_t * self,
scanbotsdk_rect_t * crop_rect )

Returns value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

Parameters
selfPointer to the instance of scanbotsdk_buffer_image_load_options_t
crop_rectPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_buffer_image_load_options_get_load_mode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_get_load_mode ( scanbotsdk_buffer_image_load_options_t * self,
scanbotsdk_buffer_load_mode_t * load_mode )

Returns value of load_mode field of the given object.

Load mode.

Default is EAGER

Parameters
selfPointer to the instance of scanbotsdk_buffer_image_load_options_t
load_modePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_buffer_image_load_options_set_color_conversion()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_set_color_conversion ( scanbotsdk_buffer_image_load_options_t * self,
scanbotsdk_color_conversion_t color_conversion )

Sets value of color_conversion field of the given object.

Color conversion to apply during image loading.

Default is ANY_COLOR

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_buffer_image_load_options_t, the field of which will be set
color_conversionThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_image_load_options_set_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_set_crop_rect ( scanbotsdk_buffer_image_load_options_t * self,
scanbotsdk_rect_t crop_rect )

Sets value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_buffer_image_load_options_t, the field of which will be set
crop_rectThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_image_load_options_set_load_mode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_image_load_options_set_load_mode ( scanbotsdk_buffer_image_load_options_t * self,
scanbotsdk_buffer_load_mode_t load_mode )

Sets value of load_mode field of the given object.

Load mode.

Default is EAGER

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_buffer_image_load_options_t, the field of which will be set
load_modeThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_buffer_load_mode_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_load_mode_t_to_string ( scanbotsdk_buffer_load_mode_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_buffer_load_mode_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_buffer_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_size ( scanbotsdk_buffer_t * buffer,
size_t * size )

Returns view of the buffer data.

Parameters
bufferPointer to the buffer instance
sizePointer to a variable that will be set to the buffer size.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_color_conversion_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_conversion_t_to_string ( scanbotsdk_color_conversion_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_color_conversion_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_encode_image_options_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_create ( int quality,
scanbotsdk_encoding_format_t format,
scanbotsdk_encode_image_options_t ** result )

Creates a new instance of scanbotsdk_encode_image_options with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
qualityQuality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.

Default is -1

Parameters
formatImage format.

Default is JPEG

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_encode_image_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_encode_image_options_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_create_with_defaults ( scanbotsdk_encode_image_options_t ** result)

Creates a new instance of scanbotsdk_encode_image_options_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_encode_image_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_encode_image_options_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_free ( scanbotsdk_encode_image_options_t * object)

Frees the memory allocated for the instance of scanbotsdk_encode_image_options_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_encode_image_options_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_encode_image_options_get_format()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_get_format ( scanbotsdk_encode_image_options_t * self,
scanbotsdk_encoding_format_t * format )

Returns value of format field of the given object.

Image format.

Default is JPEG

Parameters
selfPointer to the instance of scanbotsdk_encode_image_options_t
formatPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_encode_image_options_get_quality()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_get_quality ( scanbotsdk_encode_image_options_t * self,
int * quality )

Returns value of quality field of the given object.

Quality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.

Default is -1

Parameters
selfPointer to the instance of scanbotsdk_encode_image_options_t
qualityPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_encode_image_options_set_format()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_set_format ( scanbotsdk_encode_image_options_t * self,
scanbotsdk_encoding_format_t format )

Sets value of format field of the given object.

Image format.

Default is JPEG

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_encode_image_options_t, the field of which will be set
formatThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_encode_image_options_set_quality()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encode_image_options_set_quality ( scanbotsdk_encode_image_options_t * self,
int quality )

Sets value of quality field of the given object.

Quality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.

Default is -1

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_encode_image_options_t, the field of which will be set
qualityThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_encoding_format_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_encoding_format_t_to_string ( scanbotsdk_encoding_format_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_encoding_format_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_acquire_reference()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_acquire_reference ( const char * unique_id)

Acquires reference for the image with the given unique id.

Parameters
unique_idThe unique id of the image to acquire reference.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_create_from_encoded_buffer()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_encoded_buffer ( void * buffer,
size_t size,
scanbotsdk_buffer_image_load_options_t * options,
scanbotsdk_image_t ** image )

Creates a new instance of the image from given encoded buffer, e.g. from jpeg.

Parameters
bufferPointer to encoded image data
sizeSize of the encoded image data
optionsThe image load options.
imagePointer to a variable that will be set to the new image instance.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_create_from_id()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_id ( const char * unique_id,
scanbotsdk_image_t ** image )

Returns the image from the unique id with acquiring reference.

Parameters
unique_idThe unique id of the image to get.
imagePointer to a variable that will be set to the new image instance.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_create_from_path()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_path ( const char * path,
scanbotsdk_path_image_load_options_t * options,
scanbotsdk_image_t ** image )

Creates a new instance of the image from given path.

Parameters
pathPath to the image file
optionsThe image load options.
imagePointer to a variable that will be set to the new image instance.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_create_from_raw_image()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_create_from_raw_image ( void * buffer,
int width,
int height,
int channels,
int stride,
scanbotsdk_raw_image_load_options_t * options,
scanbotsdk_image_t ** image )

Creates a new instance of the image from raw data.

Parameters
bufferPointer to raw image data
widthImage width
heightImage height
channelsNumber of color channels
strideNumber of bytes per row
optionsThe image load options.
imagePointer to a variable that will be set to the new image instance.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_encode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_encode ( scanbotsdk_image_t * image,
scanbotsdk_encode_image_options_t * options,
scanbotsdk_buffer_t ** buffer )

Encodes image to buffer. The allocated buffer is owned by the caller and must be freed with scanbotsdk_buffer_free when no longer needed.

Parameters
imagePointer to the image instance
optionsThe image encode options
bufferPointer to a variable that will be set to the buffer instance
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_free ( scanbotsdk_image_t * object)

Destroys the image instance. If null is passed does nothing.

Parameters
objectPointer to the image instance
Returns
: Error code, SCANBOTSDK_OK if the free was successful

◆ scanbotsdk_image_get_unique_id()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_get_unique_id ( scanbotsdk_image_t * image,
const char ** unique_id )

Returns the unique id of the image.

The returned id is owned by the image and must not be freed.

Parameters
imagePointer to the image instance
unique_idPointer to a variable that will be set to the unique id.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_info()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info ( scanbotsdk_image_t * image,
scanbotsdk_image_info_t ** result )

Returns the image info.

The returned info must be freed with scanbotsdk_image_info_free when no longer needed.

Parameters
imagePointer to the image instance
resultPointer to a variable that will be set to the image info.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_info_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_free ( scanbotsdk_image_info_t * object)

Frees the memory allocated for the instance of scanbotsdk_image_info_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_image_info_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_info_get_height()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_get_height ( scanbotsdk_image_info_t * self,
int * height )

Returns value of height field of the given object.

Image height in pixels.

Parameters
selfPointer to the instance of scanbotsdk_image_info_t
heightPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_info_get_max_byte_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_get_max_byte_size ( scanbotsdk_image_info_t * self,
int * max_byte_size )

Returns value of max_byte_size field of the given object.

Byte size of the non-hibernating image.

Parameters
selfPointer to the instance of scanbotsdk_image_info_t
max_byte_sizePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_info_get_width()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_get_width ( scanbotsdk_image_info_t * self,
int * width )

Returns value of width field of the given object.

Image width in pixels.

Parameters
selfPointer to the instance of scanbotsdk_image_info_t
widthPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_info_set_height()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_set_height ( scanbotsdk_image_info_t * self,
int height )

Sets value of height field of the given object.

Image height in pixels.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_info_t, the field of which will be set
heightThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_info_set_max_byte_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_set_max_byte_size ( scanbotsdk_image_info_t * self,
int max_byte_size )

Sets value of max_byte_size field of the given object.

Byte size of the non-hibernating image.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_info_t, the field of which will be set
max_byte_sizeThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_info_set_width()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_info_set_width ( scanbotsdk_image_info_t * self,
int width )

Sets value of width field of the given object.

Image width in pixels.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_info_t, the field of which will be set
widthThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_origin_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_origin_t_to_string ( scanbotsdk_image_origin_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_image_origin_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_profile_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_create ( int bitmap_memory_consumption,
int hibernation_memory_consumption,
scanbotsdk_image_profile_t ** result )

Creates a new instance of scanbotsdk_image_profile with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
bitmap_memory_consumptionMemory consumption of a memory-backed bitmap. Zero, if the image is hibernating.

Default is 0

Parameters
hibernation_memory_consumptionMemory consumption of the hibernation buffer. Zero, if the image is not hibernating, or is hibernated to a file.

Default is 0

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_image_profile_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_profile_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_create_with_defaults ( scanbotsdk_image_profile_t ** result)

Creates a new instance of scanbotsdk_image_profile_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_image_profile_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_profile_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_free ( scanbotsdk_image_profile_t * object)

Frees the memory allocated for the instance of scanbotsdk_image_profile_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_image_profile_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_profile_get_bitmap_memory_consumption()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_get_bitmap_memory_consumption ( scanbotsdk_image_profile_t * self,
int * bitmap_memory_consumption )

Returns value of bitmap_memory_consumption field of the given object.

Memory consumption of a memory-backed bitmap. Zero, if the image is hibernating.

Default is 0

Parameters
selfPointer to the instance of scanbotsdk_image_profile_t
bitmap_memory_consumptionPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_profile_get_hibernation_memory_consumption()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_get_hibernation_memory_consumption ( scanbotsdk_image_profile_t * self,
int * hibernation_memory_consumption )

Returns value of hibernation_memory_consumption field of the given object.

Memory consumption of the hibernation buffer. Zero, if the image is not hibernating, or is hibernated to a file.

Default is 0

Parameters
selfPointer to the instance of scanbotsdk_image_profile_t
hibernation_memory_consumptionPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_profile_set_bitmap_memory_consumption()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_set_bitmap_memory_consumption ( scanbotsdk_image_profile_t * self,
int bitmap_memory_consumption )

Sets value of bitmap_memory_consumption field of the given object.

Memory consumption of a memory-backed bitmap. Zero, if the image is hibernating.

Default is 0

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_profile_t, the field of which will be set
bitmap_memory_consumptionThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_profile_set_hibernation_memory_consumption()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_profile_set_hibernation_memory_consumption ( scanbotsdk_image_profile_t * self,
int hibernation_memory_consumption )

Sets value of hibernation_memory_consumption field of the given object.

Memory consumption of the hibernation buffer. Zero, if the image is not hibernating, or is hibernated to a file.

Default is 0

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_profile_t, the field of which will be set
hibernation_memory_consumptionThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshot_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_create ( scanbotsdk_image_ref_profile_t ** image_ref_profiles,
size_t image_ref_profiles_size,
int64_t total_memory_consumption,
scanbotsdk_image_ref_pool_snapshot_t ** result )

Creates a new instance of scanbotsdk_image_ref_pool_snapshot with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
image_ref_profilesDetailed profiles of all alive ImageRefs. Entries of the array must not be null.
image_ref_profiles_sizeSize of the array image_ref_profiles
total_memory_consumptionEstimation of total memory consumption of ImageRefs.

Default is 0

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshot_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshot_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_create_with_defaults ( scanbotsdk_image_ref_profile_t ** image_ref_profiles,
size_t image_ref_profiles_size,
scanbotsdk_image_ref_pool_snapshot_t ** result )

Creates a new instance of scanbotsdk_image_ref_pool_snapshot_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
image_ref_profilesDetailed profiles of all alive ImageRefs. Entries of the array must not be null.
image_ref_profiles_sizeSize of the array image_ref_profiles
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshot_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshot_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_free ( scanbotsdk_image_ref_pool_snapshot_t * object)

Frees the memory allocated for the instance of scanbotsdk_image_ref_pool_snapshot_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_image_ref_pool_snapshot_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshot_get_image_ref_profiles()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_get_image_ref_profiles ( scanbotsdk_image_ref_pool_snapshot_t * self,
scanbotsdk_image_ref_profile_t ** image_ref_profiles,
size_t size )

Returns value of image_ref_profiles field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Detailed profiles of all alive ImageRefs.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshot_t
sizeSize of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function.
image_ref_profilesPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshot_get_image_ref_profiles_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_get_image_ref_profiles_size ( scanbotsdk_image_ref_pool_snapshot_t * self,
size_t * size )

Returns size of image_ref_profiles array.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshot_t
sizePointer to a variable that will store the size.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshot_get_total_memory_consumption()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_get_total_memory_consumption ( scanbotsdk_image_ref_pool_snapshot_t * self,
int64_t * total_memory_consumption )

Returns value of total_memory_consumption field of the given object.

Estimation of total memory consumption of ImageRefs.

Default is 0

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshot_t
total_memory_consumptionPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshot_set_image_ref_profiles()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_set_image_ref_profiles ( scanbotsdk_image_ref_pool_snapshot_t * self,
scanbotsdk_image_ref_profile_t ** image_ref_profiles,
size_t image_ref_profiles_size )

Sets value of image_ref_profiles field of the given object.

Detailed profiles of all alive ImageRefs.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshot_t, the field of which will be set
image_ref_profilesThe value to be set.
image_ref_profiles_sizeSize of the array.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshot_set_total_memory_consumption()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshot_set_total_memory_consumption ( scanbotsdk_image_ref_pool_snapshot_t * self,
int64_t total_memory_consumption )

Sets value of total_memory_consumption field of the given object.

Estimation of total memory consumption of ImageRefs.

Default is 0

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshot_t, the field of which will be set
total_memory_consumptionThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_create ( int64_t total_memory_consumption_diff,
const char ** removed,
size_t removed_size,
const char ** added,
size_t added_size,
const char ** modified,
size_t modified_size,
scanbotsdk_image_ref_pool_snapshots_diff_t ** result )

Creates a new instance of scanbotsdk_image_ref_pool_snapshots_diff with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
total_memory_consumption_diffDifference between total memory consumption in two snapshots.

Default is 0

Parameters
removedUnique ids of ImageRefs that are not present in the second snapshot and present in the first snapshot. Entries of the array must not be null.
removed_sizeSize of the array removed
addedProfiles of ImageRefs that are present in the second snapshot, but not in the first snapshot. Entries of the array must not be null.
added_sizeSize of the array added
modifiedProfiles of ImageRefs that are present in both snapshots but are different. Profile is considered modified if number of references or memory consumption is different. Entries of the array must not be null.
modified_sizeSize of the array modified
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshots_diff_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_create_with_defaults ( const char ** removed,
size_t removed_size,
const char ** added,
size_t added_size,
const char ** modified,
size_t modified_size,
scanbotsdk_image_ref_pool_snapshots_diff_t ** result )

Creates a new instance of scanbotsdk_image_ref_pool_snapshots_diff_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
removedUnique ids of ImageRefs that are not present in the second snapshot and present in the first snapshot. Entries of the array must not be null.
removed_sizeSize of the array removed
addedProfiles of ImageRefs that are present in the second snapshot, but not in the first snapshot. Entries of the array must not be null.
added_sizeSize of the array added
modifiedProfiles of ImageRefs that are present in both snapshots but are different. Profile is considered modified if number of references or memory consumption is different. Entries of the array must not be null.
modified_sizeSize of the array modified
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshots_diff_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_free ( scanbotsdk_image_ref_pool_snapshots_diff_t * object)

Frees the memory allocated for the instance of scanbotsdk_image_ref_pool_snapshots_diff_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_added()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_added ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
const char ** added,
size_t size )

Returns value of added field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Profiles of ImageRefs that are present in the second snapshot, but not in the first snapshot.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
sizeSize of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function.
addedPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_added_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_added_size ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
size_t * size )

Returns size of added array.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
sizePointer to a variable that will store the size.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_modified()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_modified ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
const char ** modified,
size_t size )

Returns value of modified field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Profiles of ImageRefs that are present in both snapshots but are different. Profile is considered modified if number of references or memory consumption is different.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
sizeSize of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function.
modifiedPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_modified_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_modified_size ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
size_t * size )

Returns size of modified array.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
sizePointer to a variable that will store the size.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_removed()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_removed ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
const char ** removed,
size_t size )

Returns value of removed field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Unique ids of ImageRefs that are not present in the second snapshot and present in the first snapshot.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
sizeSize of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function.
removedPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_removed_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_removed_size ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
size_t * size )

Returns size of removed array.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
sizePointer to a variable that will store the size.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_get_total_memory_consumption_diff()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_get_total_memory_consumption_diff ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
int64_t * total_memory_consumption_diff )

Returns value of total_memory_consumption_diff field of the given object.

Difference between total memory consumption in two snapshots.

Default is 0

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t
total_memory_consumption_diffPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_pool_snapshots_diff_set_added()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_added ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
const char ** added,
size_t added_size )

Sets value of added field of the given object.

Profiles of ImageRefs that are present in the second snapshot, but not in the first snapshot.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set
addedThe value to be set.
added_sizeSize of the array.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_set_modified()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_modified ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
const char ** modified,
size_t modified_size )

Sets value of modified field of the given object.

Profiles of ImageRefs that are present in both snapshots but are different. Profile is considered modified if number of references or memory consumption is different.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set
modifiedThe value to be set.
modified_sizeSize of the array.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_set_removed()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_removed ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
const char ** removed,
size_t removed_size )

Sets value of removed field of the given object.

Unique ids of ImageRefs that are not present in the second snapshot and present in the first snapshot.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set
removedThe value to be set.
removed_sizeSize of the array.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_pool_snapshots_diff_set_total_memory_consumption_diff()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_pool_snapshots_diff_set_total_memory_consumption_diff ( scanbotsdk_image_ref_pool_snapshots_diff_t * self,
int64_t total_memory_consumption_diff )

Sets value of total_memory_consumption_diff field of the given object.

Difference between total memory consumption in two snapshots.

Default is 0

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set
total_memory_consumption_diffThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profile_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_create ( scanbotsdk_ref_counted_object_profile_t * ref_info,
scanbotsdk_image_profile_t * image_info,
scanbotsdk_image_source_t * image_source,
scanbotsdk_image_ref_profile_t ** result )

Creates a new instance of scanbotsdk_image_ref_profile with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
ref_infoInformation about the strong and serialized references to the image. The value must not be null.
image_infoImage-specific information, e.g. memory consumption. The value must not be null.
image_sourceDescription of source from which the ImageRef was created. Non-null only if detailed profiling has been previously enabled by a call to enableDetailedProfiling. The value can be null.
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_profile_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profile_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_free ( scanbotsdk_image_ref_profile_t * object)

Frees the memory allocated for the instance of scanbotsdk_image_ref_profile_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_image_ref_profile_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profile_get_image_info()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_get_image_info ( scanbotsdk_image_ref_profile_t * self,
scanbotsdk_image_profile_t ** image_info )

Returns value of image_info field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Image-specific information, e.g. memory consumption.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profile_t
image_infoPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_profile_get_image_source()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_get_image_source ( scanbotsdk_image_ref_profile_t * self,
scanbotsdk_image_source_t ** image_source )

Returns value of image_source field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Description of source from which the ImageRef was created. Non-null only if detailed profiling has been previously enabled by a call to enableDetailedProfiling.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profile_t
image_sourcePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_profile_get_ref_info()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_get_ref_info ( scanbotsdk_image_ref_profile_t * self,
scanbotsdk_ref_counted_object_profile_t ** ref_info )

Returns value of ref_info field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Information about the strong and serialized references to the image.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profile_t
ref_infoPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_ref_profile_set_image_info()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_set_image_info ( scanbotsdk_image_ref_profile_t * self,
scanbotsdk_image_profile_t * image_info )

Sets value of image_info field of the given object.

Image-specific information, e.g. memory consumption.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profile_t, the field of which will be set
image_infoThe value to be set. Must not be null.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profile_set_image_source()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_set_image_source ( scanbotsdk_image_ref_profile_t * self,
scanbotsdk_image_source_t * image_source )

Sets value of image_source field of the given object.

Description of source from which the ImageRef was created. Non-null only if detailed profiling has been previously enabled by a call to enableDetailedProfiling.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profile_t, the field of which will be set
image_sourceThe value to be set. Can be null.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profile_set_ref_info()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profile_set_ref_info ( scanbotsdk_image_ref_profile_t * self,
scanbotsdk_ref_counted_object_profile_t * ref_info )

Sets value of ref_info field of the given object.

Information about the strong and serialized references to the image.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profile_t, the field of which will be set
ref_infoThe value to be set. Must not be null.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profiler_diff()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_diff ( scanbotsdk_image_ref_pool_snapshot_t * first_snapshot,
scanbotsdk_image_ref_pool_snapshot_t * second_snapshot,
scanbotsdk_image_ref_pool_snapshots_diff_t ** result )

Computes difference between two snapshots. To confirm that a particular operation doesn't leak, take a snapshot before and after the operation, and check that the diff doesn't contain any unexpected new ImageRefs.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
first_snapshotSnapshot that was taken earlier The value must not be null.
second_snapshotSnapshot that was taken later The value must not be null.
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_profiler_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profiler_enable_detailed_profiling()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_enable_detailed_profiling ( )

After the function is called, ImageRefs will store additional information, such as source from which they were created. This information may be important when trying to understand a profile. This function must be called BEFORE the first ImageRef is created, otherwise details may be lost.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profiler_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_free ( scanbotsdk_image_ref_profiler_t * self)

Frees the memory allocated for the instance of scanbotsdk_image_ref_profiler_t. If null is passed, the function does nothing.

Parameters
selfPointer to the instance of scanbotsdk_image_ref_profiler_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_ref_profiler_make_snapshot()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_make_snapshot ( scanbotsdk_image_ref_pool_snapshot_t ** result)

Returns a snapshot of all alive ImageRefs. The snapshot contains a list of ImageRefs with information such as in-memory size. If detailed profiling is enabled (by calling enableDetailedProfiling beforehand), the profile will contain additional information such as the source from which each ImageRef has been created.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_image_ref_profiler_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_release_reference()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_release_reference ( const char * unique_id)

Releases reference for the image with the given unique id.

Parameters
unique_idThe unique id of the image to release reference.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_rotation_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_rotation_t_to_string ( scanbotsdk_image_rotation_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_image_rotation_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_save()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_save ( scanbotsdk_image_t * image,
const char * path,
scanbotsdk_save_image_options_t * options )

Saves image at the given path.

Parameters
imagePointer to the image instance
pathPath to save the image
optionsThe image encode options
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_image_source_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_create ( scanbotsdk_image_source_type_t type,
const char * file_path,
scanbotsdk_image_source_t ** result )

Creates a new instance of scanbotsdk_image_source with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
typeSource type from which the ImageRef was created.
file_pathFile from which the ImageRef was created. Non-null only if the image ref was created from file. The value can be null.
resultPointer to a variable that will store the created instance of scanbotsdk_image_source_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_source_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_free ( scanbotsdk_image_source_t * object)

Frees the memory allocated for the instance of scanbotsdk_image_source_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_image_source_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_source_get_file_path()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_get_file_path ( scanbotsdk_image_source_t * self,
const char ** file_path )

Returns value of file_path field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

File from which the ImageRef was created. Non-null only if the image ref was created from file.

Parameters
selfPointer to the instance of scanbotsdk_image_source_t
file_pathPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_source_get_type()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_get_type ( scanbotsdk_image_source_t * self,
scanbotsdk_image_source_type_t * type )

Returns value of type field of the given object.

Source type from which the ImageRef was created.

Parameters
selfPointer to the instance of scanbotsdk_image_source_t
typePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_source_set_file_path()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_set_file_path ( scanbotsdk_image_source_t * self,
const char * file_path )

Sets value of file_path field of the given object.

File from which the ImageRef was created. Non-null only if the image ref was created from file.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_source_t, the field of which will be set
file_pathThe value to be set. Can be null.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_source_set_type()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_set_type ( scanbotsdk_image_source_t * self,
scanbotsdk_image_source_type_t type )

Sets value of type field of the given object.

Source type from which the ImageRef was created.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_source_t, the field of which will be set
typeThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_source_type_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_source_type_t_to_string ( scanbotsdk_image_source_type_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_image_source_type_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_image_to_raw_image()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_to_raw_image ( scanbotsdk_image_t * image,
scanbotsdk_raw_image_t ** raw_image )

Provides the image data as raw image trying to avoid data copy.

The returned raw image must be freed with scanbotsdk_raw_image_free when no longer needed.

Parameters
imagePointer to the image instance
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_path_image_load_options_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_create ( scanbotsdk_rect_t crop_rect,
scanbotsdk_color_conversion_t color_conversion,
scanbotsdk_path_load_mode_t load_mode,
scanbotsdk_path_image_load_options_t ** result )

Creates a new instance of scanbotsdk_path_image_load_options with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
crop_rectIf the rect is not empty, the image will be cropped to this rect before processing.
color_conversionColor conversion to apply during image loading.

Default is ANY_COLOR

Parameters
load_modeLoad mode.

Default is EAGER

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_path_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_path_image_load_options_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_create_with_defaults ( scanbotsdk_path_image_load_options_t ** result)

Creates a new instance of scanbotsdk_path_image_load_options_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_path_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_path_image_load_options_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_free ( scanbotsdk_path_image_load_options_t * object)

Frees the memory allocated for the instance of scanbotsdk_path_image_load_options_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_path_image_load_options_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_path_image_load_options_get_color_conversion()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_get_color_conversion ( scanbotsdk_path_image_load_options_t * self,
scanbotsdk_color_conversion_t * color_conversion )

Returns value of color_conversion field of the given object.

Color conversion to apply during image loading.

Default is ANY_COLOR

Parameters
selfPointer to the instance of scanbotsdk_path_image_load_options_t
color_conversionPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_path_image_load_options_get_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_get_crop_rect ( scanbotsdk_path_image_load_options_t * self,
scanbotsdk_rect_t * crop_rect )

Returns value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

Parameters
selfPointer to the instance of scanbotsdk_path_image_load_options_t
crop_rectPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_path_image_load_options_get_load_mode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_get_load_mode ( scanbotsdk_path_image_load_options_t * self,
scanbotsdk_path_load_mode_t * load_mode )

Returns value of load_mode field of the given object.

Load mode.

Default is EAGER

Parameters
selfPointer to the instance of scanbotsdk_path_image_load_options_t
load_modePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_path_image_load_options_set_color_conversion()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_set_color_conversion ( scanbotsdk_path_image_load_options_t * self,
scanbotsdk_color_conversion_t color_conversion )

Sets value of color_conversion field of the given object.

Color conversion to apply during image loading.

Default is ANY_COLOR

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_path_image_load_options_t, the field of which will be set
color_conversionThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_path_image_load_options_set_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_set_crop_rect ( scanbotsdk_path_image_load_options_t * self,
scanbotsdk_rect_t crop_rect )

Sets value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_path_image_load_options_t, the field of which will be set
crop_rectThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_path_image_load_options_set_load_mode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_image_load_options_set_load_mode ( scanbotsdk_path_image_load_options_t * self,
scanbotsdk_path_load_mode_t load_mode )

Sets value of load_mode field of the given object.

Load mode.

Default is EAGER

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_path_image_load_options_t, the field of which will be set
load_modeThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_path_load_mode_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_path_load_mode_t_to_string ( scanbotsdk_path_load_mode_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_path_load_mode_t value.

The returned string doesn't need to be freed.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_raw_image_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_free ( scanbotsdk_raw_image_t * raw_image)

Frees the raw_image instance.

Parameters
raw_imagePointer to the buffer instance to be freed
Returns
: Error code, SCANBOTSDK_OK if free was successful

◆ scanbotsdk_raw_image_get_channels()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_channels ( scanbotsdk_raw_image_t * raw_image,
int * channels )

Provides number of the raw image channels.

Parameters
raw_imagePointer to the raw image instance
channelsPointer to a variable that will be set to the number of the raw image channels.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_get_data()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_data ( scanbotsdk_raw_image_t * raw_image,
void ** data )

Provides pointer to the raw image data.

Parameters
raw_imagePointer to the raw image instance
dataPointer to a variable that will be set to the raw image data.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_get_height()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_height ( scanbotsdk_raw_image_t * raw_image,
int * height )

Provides the raw image height.

Parameters
raw_imagePointer to the raw image instance
heightPointer to a variable that will be set to the raw image height.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_get_stride()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_stride ( scanbotsdk_raw_image_t * raw_image,
int * stride )

Provides the raw image stride.

Parameters
raw_imagePointer to the raw image instance
stridePointer to a variable that will be set to the raw image row stride.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_get_width()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_width ( scanbotsdk_raw_image_t * raw_image,
int * width )

Provides the raw image width.

Parameters
raw_imagePointer to the raw image instance
widthPointer to a variable that will be set to the raw image width.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_create ( scanbotsdk_rect_t crop_rect,
bool live_source,
scanbotsdk_image_origin_t origin,
scanbotsdk_image_rotation_t orientation,
scanbotsdk_raw_image_load_options_t ** result )

Creates a new instance of scanbotsdk_raw_image_load_options with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
crop_rectIf the rect is not empty, the image will be cropped to this rect before processing.
live_sourceTrue if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.
originLocation of the image origin in the image coordinate system. During loading images are flipped such that after the flip their new origin is in their top-left corner. For example, an image coming from the front camera might have its origin set to the top-right, which will flip it along its vertical axis to create a mirror effect.

The origin is interpreted net of the image orientation. The origin rotates together with the image. The origin value is interpreted and the resulting flip executed AFTER the image matrix has been reoriented to have a neutral orientation.

Default is TOP_LEFT

Parameters
orientationRotation that should be applied to the image to recover correct orientation. Is applied before cropping.

Default is NONE

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_raw_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_create_with_defaults ( bool live_source,
scanbotsdk_raw_image_load_options_t ** result )

Creates a new instance of scanbotsdk_raw_image_load_options_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
live_sourceTrue if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.
resultPointer to a variable that will store the created instance of scanbotsdk_raw_image_load_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_free ( scanbotsdk_raw_image_load_options_t * object)

Frees the memory allocated for the instance of scanbotsdk_raw_image_load_options_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_raw_image_load_options_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_get_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_crop_rect ( scanbotsdk_raw_image_load_options_t * self,
scanbotsdk_rect_t * crop_rect )

Returns value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t
crop_rectPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_raw_image_load_options_get_live_source()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_live_source ( scanbotsdk_raw_image_load_options_t * self,
bool * live_source )

Returns value of live_source field of the given object.

True if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t
live_sourcePointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_raw_image_load_options_get_orientation()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_orientation ( scanbotsdk_raw_image_load_options_t * self,
scanbotsdk_image_rotation_t * orientation )

Returns value of orientation field of the given object.

Rotation that should be applied to the image to recover correct orientation. Is applied before cropping.

Default is NONE

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t
orientationPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_raw_image_load_options_get_origin()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_get_origin ( scanbotsdk_raw_image_load_options_t * self,
scanbotsdk_image_origin_t * origin )

Returns value of origin field of the given object.

Location of the image origin in the image coordinate system. During loading images are flipped such that after the flip their new origin is in their top-left corner. For example, an image coming from the front camera might have its origin set to the top-right, which will flip it along its vertical axis to create a mirror effect.

The origin is interpreted net of the image orientation. The origin rotates together with the image. The origin value is interpreted and the resulting flip executed AFTER the image matrix has been reoriented to have a neutral orientation.

Default is TOP_LEFT

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t
originPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_raw_image_load_options_set_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_crop_rect ( scanbotsdk_raw_image_load_options_t * self,
scanbotsdk_rect_t crop_rect )

Sets value of crop_rect field of the given object.

If the rect is not empty, the image will be cropped to this rect before processing.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set
crop_rectThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_set_live_source()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_live_source ( scanbotsdk_raw_image_load_options_t * self,
bool live_source )

Sets value of live_source field of the given object.

True if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set
live_sourceThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_set_orientation()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_orientation ( scanbotsdk_raw_image_load_options_t * self,
scanbotsdk_image_rotation_t orientation )

Sets value of orientation field of the given object.

Rotation that should be applied to the image to recover correct orientation. Is applied before cropping.

Default is NONE

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set
orientationThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_raw_image_load_options_set_origin()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_load_options_set_origin ( scanbotsdk_raw_image_load_options_t * self,
scanbotsdk_image_origin_t origin )

Sets value of origin field of the given object.

Location of the image origin in the image coordinate system. During loading images are flipped such that after the flip their new origin is in their top-left corner. For example, an image coming from the front camera might have its origin set to the top-right, which will flip it along its vertical axis to create a mirror effect.

The origin is interpreted net of the image orientation. The origin rotates together with the image. The origin value is interpreted and the resulting flip executed AFTER the image matrix has been reoriented to have a neutral orientation.

Default is TOP_LEFT

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set
originThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_save_image_options_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_create ( int quality,
scanbotsdk_save_image_options_t ** result )

Creates a new instance of scanbotsdk_save_image_options with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
qualityQuality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.

Default is -1

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_save_image_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_save_image_options_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_create_with_defaults ( scanbotsdk_save_image_options_t ** result)

Creates a new instance of scanbotsdk_save_image_options_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_save_image_options_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_save_image_options_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_free ( scanbotsdk_save_image_options_t * object)

Frees the memory allocated for the instance of scanbotsdk_save_image_options_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_save_image_options_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_save_image_options_get_quality()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_get_quality ( scanbotsdk_save_image_options_t * self,
int * quality )

Returns value of quality field of the given object.

Quality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.

Default is -1

Parameters
selfPointer to the instance of scanbotsdk_save_image_options_t
qualityPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_save_image_options_set_quality()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_save_image_options_set_quality ( scanbotsdk_save_image_options_t * self,
int quality )

Sets value of quality field of the given object.

Quality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.

Default is -1

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_save_image_options_t, the field of which will be set
qualityThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered