Scanbot SDK
Loading...
Searching...
No Matches
ScanbotSDKImage.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#ifndef SCANBOTSDK_IMAGE_H
9#define SCANBOTSDK_IMAGE_H
10
11#include <ScanbotSDKDefs.h>
12#include <ScanbotSDKErrorCode.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
25
32
39
53 void* buffer,
54 int width,
55 int height,
56 int channels,
57 int stride,
59 scanbotsdk_image_t** image);
60
70 const char* path,
72 scanbotsdk_image_t** image);
73
84 void* buffer,
85 size_t size,
87 scanbotsdk_image_t** image);
88
98 scanbotsdk_image_t* image,
99 const char* path,
101
112 scanbotsdk_image_t* image,
114 scanbotsdk_buffer_t** buffer);
115
125
134
142
153
161
172
182
190
198
204
215
223
233
243
253
263
273
274#ifdef __cplusplus
275}
276#endif
277#endif
ScanbotSDK Error Code C API.
scanbotsdk_error_code_t
The error codes returned by most of the Scanbot SDK functions.
Definition ScanbotSDKErrorCode.h:25
struct scanbotsdk_buffer_t scanbotsdk_buffer_t
Represents an instance of the opaque byte buffer.
Definition ScanbotSDKImage.h:24
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_stride(scanbotsdk_raw_image_t *raw_image, int *stride)
Provides the raw image stride.
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_info(scanbotsdk_image_t *image, scanbotsdk_image_info_t **result)
Returns the image info.
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_raw_image_free(scanbotsdk_raw_image_t *raw_image)
Frees the raw_image instance.
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.
struct scanbotsdk_raw_image_load_options_t scanbotsdk_raw_image_load_options_t
scanbotsdk_raw_image_load_options_t class
Definition ScanbotSDKImageRefTypes.h:307
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_raw_image_get_width(scanbotsdk_raw_image_t *raw_image, int *width)
Provides the raw image width.
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.
struct scanbotsdk_image_info_t scanbotsdk_image_info_t
scanbotsdk_image_info_t class
Definition ScanbotSDKImageRefTypes.h:63
struct scanbotsdk_save_image_options_t scanbotsdk_save_image_options_t
scanbotsdk_save_image_options_t class
Definition ScanbotSDKImageRefTypes.h:704
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_data(scanbotsdk_buffer_t *buffer, uint8_t **data)
Returns view of the buffer data.
struct scanbotsdk_encode_image_options_t scanbotsdk_encode_image_options_t
scanbotsdk_encode_image_options_t class
Definition ScanbotSDKImageRefTypes.h:781
struct scanbotsdk_buffer_image_load_options_t scanbotsdk_buffer_image_load_options_t
scanbotsdk_buffer_image_load_options_t class
Definition ScanbotSDKImageRefTypes.h:584
SBSDK_API scanbotsdk_error_code_t scanbotsdk_buffer_free(scanbotsdk_buffer_t *buffer)
Frees the buffer instance.
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_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 scanbotsd...
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_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_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.
struct scanbotsdk_path_image_load_options_t scanbotsdk_path_image_load_options_t
scanbotsdk_path_image_load_options_t class
Definition ScanbotSDKImageRefTypes.h:464
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_image_acquire_reference(const char *unique_id)
Acquires reference for the image with the given unique id.
struct scanbotsdk_raw_image_t scanbotsdk_raw_image_t
Represents an instance of a raw image buffer.
Definition ScanbotSDKImage.h:38
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_free(scanbotsdk_image_t *object)
Destroys the image instance. If null is passed does nothing.
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.
struct scanbotsdk_image_t scanbotsdk_image_t
Represents an instance of the opaque image.
Definition ScanbotSDKImage.h:31