|
Entropic 2.11.1
Local-first agentic inference engine
|
Image preprocessor — validates, resizes, and normalizes images. More...
#include <entropic/inference/image_preprocessor.h>
Public Member Functions | |
| ImagePreprocessor (const ImagePreprocessConfig &config) | |
| Construct preprocessor with config. | |
| PreprocessedImage | preprocess_file (const std::filesystem::path &path) |
| Preprocess an image from file path. | |
| PreprocessedImage | preprocess_buffer (const uint8_t *data, size_t len, const std::string &source_label) |
| Preprocess an image from memory buffer. | |
Image preprocessor — validates, resizes, and normalizes images.
Concrete class (not a base class — no expected variants). Handles the pipeline: load -> validate -> resize -> output.
Definition at line 59 of file image_preprocessor.h.
|
explicit |
Construct preprocessor with config.
| config | Preprocessing configuration. |
Definition at line 134 of file image_preprocessor.cpp.
| PreprocessedImage entropic::ImagePreprocessor::preprocess_buffer | ( | const uint8_t * | data, |
| size_t | len, | ||
| const std::string & | source_label | ||
| ) |
Preprocess an image from memory buffer.
| data | Raw image data (JPEG, PNG, BMP, GIF). |
| len | Data length in bytes. |
| source_label | Label for logging (e.g., "data_uri"). |
| std::runtime_error | on invalid format or decode error. |
| data | Raw image data (JPEG, PNG, BMP, GIF). |
| len | Data length in bytes. |
| source_label | Label for logging (e.g., "data_uri"). |
Definition at line 204 of file image_preprocessor.cpp.
| PreprocessedImage entropic::ImagePreprocessor::preprocess_file | ( | const std::filesystem::path & | path | ) |
Preprocess an image from file path.
| path | File path to image. |
| std::runtime_error | on invalid format, oversized file, or read error. |
| path | File path to image. |
Definition at line 181 of file image_preprocessor.cpp.