Scanbot SDK
Loading...
Searching...
No Matches
ScanbotSDKImage.h File Reference

ScanbotSDK Image Ref C API. More...

Go to the source code of this file.

Typedefs

typedef struct scanbotsdk_buffer_t scanbotsdk_buffer_t
 Represents an instance of the opaque byte buffer.
 
typedef struct scanbotsdk_image_t scanbotsdk_image_t
 Represents an instance of the opaque image.
 
typedef struct scanbotsdk_raw_image_t scanbotsdk_raw_image_t
 Represents an instance of a raw image buffer.
 

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.
 

Detailed Description

ScanbotSDK Image Ref C API.