Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::ImagePreprocessor Class Reference

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.
 

Detailed Description

Image preprocessor — validates, resizes, and normalizes images.

Concrete class (not a base class — no expected variants). Handles the pipeline: load -> validate -> resize -> output.

Version
1.9.11

Definition at line 59 of file image_preprocessor.h.

Constructor & Destructor Documentation

◆ ImagePreprocessor()

entropic::ImagePreprocessor::ImagePreprocessor ( const ImagePreprocessConfig config)
explicit

Construct preprocessor with config.

Parameters
configPreprocessing configuration.
Version
1.9.11

Definition at line 134 of file image_preprocessor.cpp.

Member Function Documentation

◆ preprocess_buffer()

PreprocessedImage entropic::ImagePreprocessor::preprocess_buffer ( const uint8_t *  data,
size_t  len,
const std::string &  source_label 
)

Preprocess an image from memory buffer.

Parameters
dataRaw image data (JPEG, PNG, BMP, GIF).
lenData length in bytes.
source_labelLabel for logging (e.g., "data_uri").
Returns
Preprocessed image.
Exceptions
std::runtime_erroron invalid format or decode error.
Version
1.9.11
Parameters
dataRaw image data (JPEG, PNG, BMP, GIF).
lenData length in bytes.
source_labelLabel for logging (e.g., "data_uri").
Returns
Preprocessed image.
Exceptions
std::runtime_erroron invalid format or decode error.

Definition at line 202 of file image_preprocessor.cpp.

◆ preprocess_file()

PreprocessedImage entropic::ImagePreprocessor::preprocess_file ( const std::filesystem::path &  path)

Preprocess an image from file path.

Parameters
pathFile path to image.
Returns
Preprocessed image ready for vision encoder.
Exceptions
std::runtime_erroron invalid format, oversized file, or read error.
Version
1.9.11
Parameters
pathFile path to image.
Returns
Preprocessed image ready for vision encoder.
Exceptions
std::runtime_erroron invalid format, oversized, or read error.

Definition at line 179 of file image_preprocessor.cpp.


The documentation for this class was generated from the following files: