|
Scanbot SDK
|
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. | |
scanbotsdk_basic_image_load_options_t class
Basic options for loading image.
scanbotsdk_buffer_image_load_options_t class
Options for loading image from buffer.
scanbotsdk_buffer_load_mode_t enum
Image Ref Buffer Load Mode.
| typedef struct scanbotsdk_buffer_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 enum
Color conversion to apply during image loading.
scanbotsdk_encode_image_options_t class
Options for encoding image.
| typedef enum scanbotsdk_encoding_format_t scanbotsdk_encoding_format_t |
scanbotsdk_encoding_format_t enum
Image Encoding Format.
| typedef struct scanbotsdk_image_info_t scanbotsdk_image_info_t |
scanbotsdk_image_info_t class
Image Info.
| typedef enum scanbotsdk_image_origin_t scanbotsdk_image_origin_t |
scanbotsdk_image_origin_t enum
Location of the image origin in the image coordinate system.
| typedef struct scanbotsdk_image_profile_t scanbotsdk_image_profile_t |
scanbotsdk_image_profile_t class
ImageRef profile part specific to image information.
scanbotsdk_image_ref_pool_snapshot_t class
Snapshot of all alive ImageRefs.
| typedef struct scanbotsdk_image_ref_pool_snapshots_diff_t scanbotsdk_image_ref_pool_snapshots_diff_t |
scanbotsdk_image_ref_pool_snapshots_diff_t class
difference between two snapshots.
| typedef struct scanbotsdk_image_ref_profile_t scanbotsdk_image_ref_profile_t |
scanbotsdk_image_ref_profile_t class
ImageRef profile which provides detailed information about stored object.
| typedef struct scanbotsdk_image_ref_profiler_t 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.
| typedef enum scanbotsdk_image_rotation_t scanbotsdk_image_rotation_t |
scanbotsdk_image_rotation_t enum
Image rotation.
| typedef struct scanbotsdk_image_source_t scanbotsdk_image_source_t |
scanbotsdk_image_source_t class
Description of source from which the ImageRef was created.
scanbotsdk_image_source_type_t enum
The type of source which originated the underlying image.
| typedef struct scanbotsdk_image_t 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 class
Options for loading image from path.
| typedef enum scanbotsdk_path_load_mode_t scanbotsdk_path_load_mode_t |
scanbotsdk_path_load_mode_t enum
Image Ref Path Load Mode.
scanbotsdk_raw_image_load_options_t class
Options for loading images that come from sensor.
| typedef struct scanbotsdk_raw_image_t scanbotsdk_raw_image_t |
Represents an instance of a raw image buffer.
Must be destroyed with scanbotsdk_raw_image_free after use.
| typedef struct scanbotsdk_save_image_options_t scanbotsdk_save_image_options_t |
scanbotsdk_save_image_options_t class
Options for saving image to a path.
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 enum
Color conversion to apply during image loading.
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 enum
Location of the image origin in the image coordinate system.
scanbotsdk_image_rotation_t enum
Image rotation.
scanbotsdk_image_source_type_t enum
The type of source which originated the underlying image.
scanbotsdk_path_load_mode_t enum
Image Ref Path Load Mode.
| 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.
| crop_rect | If the rect is not empty, the image will be cropped to this rect before processing. |
| live_source | 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. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_basic_image_load_options_t |
| 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.
| live_source | 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. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_basic_image_load_options_t |
| 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.
| object | Pointer to the instance of scanbotsdk_basic_image_load_options_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_basic_image_load_options_t |
| crop_rect | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_basic_image_load_options_t |
| live_source | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_basic_image_load_options_t, the field of which will be set |
| crop_rect | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_basic_image_load_options_t, the field of which will be set |
| live_source | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_data | ( | scanbotsdk_buffer_t * | buffer, |
| uint8_t ** | data ) |
Returns view of the buffer data.
| buffer | Pointer to the buffer instance |
| data | Pointer to a variable that will be set to the buffer data. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_free | ( | scanbotsdk_buffer_t * | buffer | ) |
Frees the buffer instance.
| buffer | Pointer to the buffer instance to be freed |
| 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.
| crop_rect | If the rect is not empty, the image will be cropped to this rect before processing. |
| color_conversion | Color conversion to apply during image loading. |
Default is ANY_COLOR
| load_mode | Load mode. |
Default is EAGER
| result | Pointer to a variable that will store the created instance of scanbotsdk_buffer_image_load_options_t |
| 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_buffer_image_load_options_t |
| 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.
| object | Pointer to the instance of scanbotsdk_buffer_image_load_options_t to be freed |
| 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
| self | Pointer to the instance of scanbotsdk_buffer_image_load_options_t |
| color_conversion | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_buffer_image_load_options_t |
| crop_rect | Pointer to a variable that will store the value of the field. |
| 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
| self | Pointer to the instance of scanbotsdk_buffer_image_load_options_t |
| load_mode | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_buffer_image_load_options_t, the field of which will be set |
| color_conversion | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_buffer_image_load_options_t, the field of which will be set |
| crop_rect | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_buffer_image_load_options_t, the field of which will be set |
| load_mode | The value to be set. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_size | ( | scanbotsdk_buffer_t * | buffer, |
| size_t * | size ) |
Returns view of the buffer data.
| buffer | Pointer to the buffer instance |
| size | Pointer to a variable that will be set to the buffer size. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| 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.
| quality | 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
| format | Image format. |
Default is JPEG
| result | Pointer to a variable that will store the created instance of scanbotsdk_encode_image_options_t |
| 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_encode_image_options_t |
| 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.
| object | Pointer to the instance of scanbotsdk_encode_image_options_t to be freed |
| 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
| self | Pointer to the instance of scanbotsdk_encode_image_options_t |
| format | Pointer to a variable that will store the value of the field. |
| 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
| self | Pointer to the instance of scanbotsdk_encode_image_options_t |
| quality | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_encode_image_options_t, the field of which will be set |
| format | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_encode_image_options_t, the field of which will be set |
| quality | The value to be set. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_acquire_reference | ( | const char * | unique_id | ) |
Acquires reference for the image with the given unique id.
| unique_id | The unique id of the image to acquire reference. |
| 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.
| buffer | Pointer to encoded image data |
| size | Size of the encoded image data |
| options | The image load options. |
| image | Pointer to a variable that will be set to the new image instance. |
| 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.
| unique_id | The unique id of the image to get. |
| image | Pointer to a variable that will be set to the new image instance. |
| 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.
| path | Path to the image file |
| options | The image load options. |
| image | Pointer to a variable that will be set to the new image instance. |
| 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.
| buffer | Pointer to raw image data |
| width | Image width |
| height | Image height |
| channels | Number of color channels |
| stride | Number of bytes per row |
| options | The image load options. |
| image | Pointer to a variable that will be set to the new image instance. |
| 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.
| image | Pointer to the image instance |
| options | The image encode options |
| buffer | Pointer to a variable that will be set to the buffer instance |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_free | ( | scanbotsdk_image_t * | object | ) |
Destroys the image instance. If null is passed does nothing.
| object | Pointer to the image instance |
| 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.
| image | Pointer to the image instance |
| unique_id | Pointer to a variable that will be set to the unique id. |
| 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.
| image | Pointer to the image instance |
| result | Pointer to a variable that will be set to the image info. |
| 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.
| object | Pointer to the instance of scanbotsdk_image_info_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_image_info_t |
| height | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_info_t |
| max_byte_size | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_info_t |
| width | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_info_t, the field of which will be set |
| height | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_info_t, the field of which will be set |
| max_byte_size | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_info_t, the field of which will be set |
| width | The value to be set. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| 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.
| bitmap_memory_consumption | Memory consumption of a memory-backed bitmap. Zero, if the image is hibernating. |
Default is 0
| hibernation_memory_consumption | Memory consumption of the hibernation buffer. Zero, if the image is not hibernating, or is hibernated to a file. |
Default is 0
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_profile_t |
| 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_profile_t |
| 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.
| object | Pointer to the instance of scanbotsdk_image_profile_t to be freed |
| 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
| self | Pointer to the instance of scanbotsdk_image_profile_t |
| bitmap_memory_consumption | Pointer to a variable that will store the value of the field. |
| 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
| self | Pointer to the instance of scanbotsdk_image_profile_t |
| hibernation_memory_consumption | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_profile_t, the field of which will be set |
| bitmap_memory_consumption | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_profile_t, the field of which will be set |
| hibernation_memory_consumption | The value to be set. |
| 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.
| image_ref_profiles | Detailed profiles of all alive ImageRefs. Entries of the array must not be null. |
| image_ref_profiles_size | Size of the array image_ref_profiles |
| total_memory_consumption | Estimation of total memory consumption of ImageRefs. |
Default is 0
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshot_t |
| 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.
| image_ref_profiles | Detailed profiles of all alive ImageRefs. Entries of the array must not be null. |
| image_ref_profiles_size | Size of the array image_ref_profiles |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshot_t |
| 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.
| object | Pointer to the instance of scanbotsdk_image_ref_pool_snapshot_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshot_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| image_ref_profiles | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshot_t |
| size | Pointer to a variable that will store the size. |
| 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
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshot_t |
| total_memory_consumption | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshot_t, the field of which will be set |
| image_ref_profiles | The value to be set. |
| image_ref_profiles_size | Size of the array. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshot_t, the field of which will be set |
| total_memory_consumption | The value to be set. |
| 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.
| total_memory_consumption_diff | Difference between total memory consumption in two snapshots. |
Default is 0
| removed | Unique 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_size | Size of the array removed |
| added | Profiles of ImageRefs that are present in the second snapshot, but not in the first snapshot. Entries of the array must not be null. |
| added_size | Size of the array added |
| modified | 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. Entries of the array must not be null. |
| modified_size | Size of the array modified |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| 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.
| removed | Unique 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_size | Size of the array removed |
| added | Profiles of ImageRefs that are present in the second snapshot, but not in the first snapshot. Entries of the array must not be null. |
| added_size | Size of the array added |
| modified | 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. Entries of the array must not be null. |
| modified_size | Size of the array modified |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| 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.
| object | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| added | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| size | Pointer to a variable that will store the size. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| modified | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| size | Pointer to a variable that will store the size. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| removed | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| size | Pointer to a variable that will store the size. |
| 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
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t |
| total_memory_consumption_diff | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set |
| added | The value to be set. |
| added_size | Size of the 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.
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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set |
| modified | The value to be set. |
| modified_size | Size of the 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.
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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set |
| removed | The value to be set. |
| removed_size | Size of the array. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_pool_snapshots_diff_t, the field of which will be set |
| total_memory_consumption_diff | The value to be set. |
| 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.
| ref_info | Information about the strong and serialized references to the image. The value must not be null. |
| image_info | Image-specific information, e.g. memory consumption. The value must not be null. |
| image_source | Description 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. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_profile_t |
| 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.
| object | Pointer to the instance of scanbotsdk_image_ref_profile_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profile_t |
| image_info | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profile_t |
| image_source | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profile_t |
| ref_info | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profile_t, the field of which will be set |
| image_info | The value to be set. Must not be null. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profile_t, the field of which will be set |
| image_source | The value to be set. Can be null. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profile_t, the field of which will be set |
| ref_info | The value to be set. Must not be null. |
| 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.
| first_snapshot | Snapshot that was taken earlier The value must not be null. |
| second_snapshot | Snapshot that was taken later The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_profiler_t |
| 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.
| 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.
| self | Pointer to the instance of scanbotsdk_image_ref_profiler_t to be freed |
| 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_ref_profiler_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_release_reference | ( | const char * | unique_id | ) |
Releases reference for the image with the given unique id.
| unique_id | The unique id of the image to release reference. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| 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.
| image | Pointer to the image instance |
| path | Path to save the image |
| options | The image encode options |
| 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.
| type | Source type from which the ImageRef was created. |
| file_path | File from which the ImageRef was created. Non-null only if the image ref was created from file. The value can be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_source_t |
| 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.
| object | Pointer to the instance of scanbotsdk_image_source_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_image_source_t |
| file_path | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_source_t |
| type | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_source_t, the field of which will be set |
| file_path | The value to be set. Can be null. |
| 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.
| self | Pointer to the instance of scanbotsdk_image_source_t, the field of which will be set |
| type | The value to be set. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| 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.
| image | Pointer to the image instance |
| 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.
| crop_rect | If the rect is not empty, the image will be cropped to this rect before processing. |
| color_conversion | Color conversion to apply during image loading. |
Default is ANY_COLOR
| load_mode | Load mode. |
Default is EAGER
| result | Pointer to a variable that will store the created instance of scanbotsdk_path_image_load_options_t |
| 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_path_image_load_options_t |
| 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.
| object | Pointer to the instance of scanbotsdk_path_image_load_options_t to be freed |
| 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
| self | Pointer to the instance of scanbotsdk_path_image_load_options_t |
| color_conversion | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_path_image_load_options_t |
| crop_rect | Pointer to a variable that will store the value of the field. |
| 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
| self | Pointer to the instance of scanbotsdk_path_image_load_options_t |
| load_mode | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_path_image_load_options_t, the field of which will be set |
| color_conversion | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_path_image_load_options_t, the field of which will be set |
| crop_rect | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_path_image_load_options_t, the field of which will be set |
| load_mode | The value to be set. |
| 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.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_free | ( | scanbotsdk_raw_image_t * | raw_image | ) |
Frees the raw_image instance.
| raw_image | Pointer to the buffer instance to be freed |
| 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.
| raw_image | Pointer to the raw image instance |
| channels | Pointer to a variable that will be set to the number of the raw image channels. |
| 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.
| raw_image | Pointer to the raw image instance |
| data | Pointer to a variable that will be set to the raw image data. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_height | ( | scanbotsdk_raw_image_t * | raw_image, |
| int * | height ) |
Provides the raw image height.
| raw_image | Pointer to the raw image instance |
| height | Pointer to a variable that will be set to the raw image height. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_stride | ( | scanbotsdk_raw_image_t * | raw_image, |
| int * | stride ) |
Provides the raw image stride.
| raw_image | Pointer to the raw image instance |
| stride | Pointer to a variable that will be set to the raw image row stride. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_raw_image_get_width | ( | scanbotsdk_raw_image_t * | raw_image, |
| int * | width ) |
Provides the raw image width.
| raw_image | Pointer to the raw image instance |
| width | Pointer to a variable that will be set to the raw image width. |
| 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.
| crop_rect | If the rect is not empty, the image will be cropped to this rect before processing. |
| live_source | 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. |
| origin | 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
| orientation | Rotation that should be applied to the image to recover correct orientation. Is applied before cropping. |
Default is NONE
| result | Pointer to a variable that will store the created instance of scanbotsdk_raw_image_load_options_t |
| 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.
| live_source | 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. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_raw_image_load_options_t |
| 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.
| object | Pointer to the instance of scanbotsdk_raw_image_load_options_t to be freed |
| 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.
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t |
| crop_rect | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t |
| live_source | Pointer to a variable that will store the value of the field. |
| 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
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t |
| orientation | Pointer to a variable that will store the value of the field. |
| 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
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t |
| origin | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set |
| crop_rect | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set |
| live_source | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set |
| orientation | The value to be set. |
| 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.
| self | Pointer to the instance of scanbotsdk_raw_image_load_options_t, the field of which will be set |
| origin | The value to be set. |
| 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.
| quality | 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
| result | Pointer to a variable that will store the created instance of scanbotsdk_save_image_options_t |
| 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_save_image_options_t |
| 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.
| object | Pointer to the instance of scanbotsdk_save_image_options_t to be freed |
| 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
| self | Pointer to the instance of scanbotsdk_save_image_options_t |
| quality | Pointer to a variable that will store the value of the field. |
| 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.
| self | Pointer to the instance of scanbotsdk_save_image_options_t, the field of which will be set |
| quality | The value to be set. |