
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.
| None __init__ | ( | self | ) |
Initializes a MonoConversionModule with default settings.
Reimplemented from ModuleBase.
| None __del__ | ( | self | ) |
|
staticprotected |
Converts the input image to the configured output pixel format.
| input_image | The input image to convert. |
| 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.
| None reset_to_default | ( | self | ) |
Calling this method has no effect.
| str type | ( | self | ) |
|
protected |
| enabled |