
Public Member Functions | |
| None | __init__ (self) |
| Initializes a MonoConversionModule with default settings. | |
| None | __del__ (self) |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| None | reset_to_default (self) |
| Calling this method has no effect. | |
| Image | process (self, Image input_image) |
| Converts the input image to the configured output pixel format. | |
| None | release_buffers (self) |
| Frees unused internal buffers. | |
Data Fields | |
| enabled | |
Static Protected Member Functions | |
| PixelFormat | _get_output_format (PixelFormat input_pixel_format) |
Protected Attributes | |
| _handle = image_converter_handle | |
Mono conversion is an image pipeline module that converts images to a monochrome format.
The mono conversion module performs a mono (grayscale) conversion on input images. When enabled, it converts the input image to a mono format while preserving the input bit depth. If disabled, the input image is passed through unchanged.
Definition at line 11 of file mono_conversion_module.py.
| None __init__ | ( | self | ) |
Initializes a MonoConversionModule with default settings.
Reimplemented from ModuleBase.
Definition at line 23 of file mono_conversion_module.py.
| None __del__ | ( | self | ) |
Definition at line 38 of file mono_conversion_module.py.
|
staticprotected |
Definition at line 116 of file mono_conversion_module.py.
Converts the input image to the configured output pixel format.
| input_image | The input image to convert. |
Definition at line 63 of file mono_conversion_module.py.
| None release_buffers | ( | self | ) |
Frees unused internal buffers.
This module uses pre-allocated internal buffers to accelerate conversions. When the image size or pixel format changes, new buffers are allocated, which may cause the internal buffer pool to grow over time. This function can be used to release unused buffers and reduce memory usage.
Definition at line 94 of file mono_conversion_module.py.
| None reset_to_default | ( | self | ) |
Calling this method has no effect.
Definition at line 54 of file mono_conversion_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Definition at line 43 of file mono_conversion_module.py.
|
protected |
Definition at line 36 of file mono_conversion_module.py.
| enabled |
Definition at line 78 of file mono_conversion_module.py.