|
Scanbot SDK
|
Typedefs | |
| typedef struct scanbotsdk_multi_page_image_extractor_t | scanbotsdk_multi_page_image_extractor_t |
| scanbotsdk_multi_page_image_extractor_t class | |
| typedef struct scanbotsdk_extracted_image_metadata_t | scanbotsdk_extracted_image_metadata_t |
| scanbotsdk_extracted_image_metadata_t class | |
| typedef struct scanbotsdk_extracted_image_t | scanbotsdk_extracted_image_t |
| scanbotsdk_extracted_image_t class | |
| typedef struct scanbotsdk_extracted_page_t | scanbotsdk_extracted_page_t |
| scanbotsdk_extracted_page_t class | |
| typedef struct scanbotsdk_page_extraction_result_t | scanbotsdk_page_extraction_result_t |
| scanbotsdk_page_extraction_result_t class | |
Functions | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_multi_page_image_extractor_create (scanbotsdk_multi_page_image_extractor_t **result) |
| Creates a new instance of scanbotsdk_multi_page_image_extractor with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_multi_page_image_extractor_free (scanbotsdk_multi_page_image_extractor_t *self) |
| Frees the memory allocated for the instance of scanbotsdk_multi_page_image_extractor_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_multi_page_image_extractor_run (scanbotsdk_multi_page_image_extractor_t *self, scanbotsdk_random_access_source_t *source, scanbotsdk_page_extraction_result_t **result) |
| Extracts images from the given source. If possible, images that are originally stored in a compressed way, are not decompressed automatically but are initialized in a lazy way. This means that the image data is only decompressed when it is accessed for the first time. That's why when the images are used after extraction, it is recommended to close (dispose) (if platform uses Garbage Collector) images as soon as they are not needed anymore to prevent storing a lot of images in decompressed state in memory. After the method is executed, the source doesn't have to exist anymore. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_image_metadata_create (int height, int width, scanbotsdk_extracted_image_metadata_t **result) |
| Creates a new instance of scanbotsdk_extracted_image_metadata with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_image_metadata_free (scanbotsdk_extracted_image_metadata_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_extracted_image_metadata_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_image_metadata_get_height (scanbotsdk_extracted_image_metadata_t *self, int *height) |
| Returns value of height field of the given object. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_image_metadata_get_width (scanbotsdk_extracted_image_metadata_t *self, int *width) |
| Returns value of width field of the given object. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_image_free (scanbotsdk_extracted_image_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_extracted_image_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_image_get_image (scanbotsdk_extracted_image_t *self, scanbotsdk_image_t **image) |
| Returns value of image 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_extracted_image_get_metadata (scanbotsdk_extracted_image_t *self, scanbotsdk_extracted_image_metadata_t **metadata) |
| Returns value of metadata 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_extracted_page_free (scanbotsdk_extracted_page_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_extracted_page_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_extracted_page_get_images (scanbotsdk_extracted_page_t *self, scanbotsdk_extracted_image_t **images, size_t size) |
| Returns value of images 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_extracted_page_get_images_size (scanbotsdk_extracted_page_t *self, size_t *size) |
| Returns size of images array. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_extraction_result_free (scanbotsdk_page_extraction_result_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_page_extraction_result_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_extraction_result_get_pages (scanbotsdk_page_extraction_result_t *self, scanbotsdk_extracted_page_t **pages, size_t size) |
| Returns value of pages 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_page_extraction_result_get_pages_size (scanbotsdk_page_extraction_result_t *self, size_t *size) |
| Returns size of pages array. | |
scanbotsdk_extracted_image_metadata_t class
The metadata is taken from the PDF stream's dictionary, not from the image header inside the stream. In a well-formed PDF file, the image metadata encoded in the stream dictionary should be the same as the one encoded in the image header. This, however, is neither required nor checked and may not be true for an ill-formed PDF.
| typedef struct scanbotsdk_extracted_image_t scanbotsdk_extracted_image_t |
scanbotsdk_extracted_image_t class
An image extracted from a multipage image.
| typedef struct scanbotsdk_extracted_page_t scanbotsdk_extracted_page_t |
scanbotsdk_extracted_page_t class
A single page extracted from a multipage image.
scanbotsdk_multi_page_image_extractor_t class
API for extracting images from multi-page images (PDF, TIFF) and single-page images (JPEG, PNG).
Required licence feature(s): ImageProcessing.
scanbotsdk_page_extraction_result_t class
Result of the extraction of pages from a multipage image.
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_free | ( | scanbotsdk_extracted_image_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_extracted_image_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_extracted_image_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_get_image | ( | scanbotsdk_extracted_image_t * | self, |
| scanbotsdk_image_t ** | image ) |
Returns value of image field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
The extracted image.
| self | Pointer to the instance of scanbotsdk_extracted_image_t |
| image | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_get_metadata | ( | scanbotsdk_extracted_image_t * | self, |
| scanbotsdk_extracted_image_metadata_t ** | metadata ) |
Returns value of metadata field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Metadata of the extracted image.
| self | Pointer to the instance of scanbotsdk_extracted_image_t |
| metadata | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_metadata_create | ( | int | height, |
| int | width, | ||
| scanbotsdk_extracted_image_metadata_t ** | result ) |
Creates a new instance of scanbotsdk_extracted_image_metadata 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.
| height | Height of the image in pixels. |
| width | Width of the image in pixels. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_extracted_image_metadata_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_metadata_free | ( | scanbotsdk_extracted_image_metadata_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_extracted_image_metadata_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_extracted_image_metadata_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_metadata_get_height | ( | scanbotsdk_extracted_image_metadata_t * | self, |
| int * | height ) |
Returns value of height field of the given object.
Height of the image in pixels.
| self | Pointer to the instance of scanbotsdk_extracted_image_metadata_t |
| height | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_image_metadata_get_width | ( | scanbotsdk_extracted_image_metadata_t * | self, |
| int * | width ) |
Returns value of width field of the given object.
Width of the image in pixels.
| self | Pointer to the instance of scanbotsdk_extracted_image_metadata_t |
| width | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_page_free | ( | scanbotsdk_extracted_page_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_extracted_page_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_extracted_page_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_page_get_images | ( | scanbotsdk_extracted_page_t * | self, |
| scanbotsdk_extracted_image_t ** | images, | ||
| size_t | size ) |
Returns value of images field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of images extracted from the page.
| self | Pointer to the instance of scanbotsdk_extracted_page_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| images | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_extracted_page_get_images_size | ( | scanbotsdk_extracted_page_t * | self, |
| size_t * | size ) |
Returns size of images array.
| self | Pointer to the instance of scanbotsdk_extracted_page_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_multi_page_image_extractor_create | ( | scanbotsdk_multi_page_image_extractor_t ** | result | ) |
Creates a new instance of scanbotsdk_multi_page_image_extractor 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_multi_page_image_extractor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_multi_page_image_extractor_free | ( | scanbotsdk_multi_page_image_extractor_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_multi_page_image_extractor_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_multi_page_image_extractor_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_multi_page_image_extractor_run | ( | scanbotsdk_multi_page_image_extractor_t * | self, |
| scanbotsdk_random_access_source_t * | source, | ||
| scanbotsdk_page_extraction_result_t ** | result ) |
Extracts images from the given source. If possible, images that are originally stored in a compressed way, are not decompressed automatically but are initialized in a lazy way. This means that the image data is only decompressed when it is accessed for the first time. That's why when the images are used after extraction, it is recommended to close (dispose) (if platform uses Garbage Collector) images as soon as they are not needed anymore to prevent storing a lot of images in decompressed state in memory. After the method is executed, the source doesn't have to exist anymore.
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_multi_page_image_extractor_t method to be called on |
| source | The source to extract images from. Supported multi-page image formats are TIFF and PDF. Supported single page image formats are JPEG and PNG. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_multi_page_image_extractor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_extraction_result_free | ( | scanbotsdk_page_extraction_result_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_page_extraction_result_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_page_extraction_result_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_extraction_result_get_pages | ( | scanbotsdk_page_extraction_result_t * | self, |
| scanbotsdk_extracted_page_t ** | pages, | ||
| size_t | size ) |
Returns value of pages field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of extracted pages.
| self | Pointer to the instance of scanbotsdk_page_extraction_result_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| pages | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_extraction_result_get_pages_size | ( | scanbotsdk_page_extraction_result_t * | self, |
| size_t * | size ) |
Returns size of pages array.
| self | Pointer to the instance of scanbotsdk_page_extraction_result_t |
| size | Pointer to a variable that will store the size. |