Closed jpirnay closed 1 week ago
This PR adds support for 32-bit grayscale images by implementing proper conversion from PIL's "I" mode to "L" mode. The changes also include code cleanup and optimization of image processing operations.
classDiagram
class ImageProcessor {
+operations: list
+invert: bool
+dither: bool
+dither_type: str
+process_image(step_x, step_y, crop)
+_convert_image_to_grayscale(image)
+_process_script(image)
+_apply_keyhole()
}
ImageProcessor : +_convert_image_to_grayscale(image)
ImageProcessor : +_process_script(image)
ImageProcessor : +_apply_keyhole()
note for ImageProcessor "Added support for 32-bit grayscale images by converting 'I' mode to 'L' mode."
Change | Details | Files |
---|---|---|
Added support for 32-bit grayscale images (PIL mode 'I') |
|
meerk40t/core/node/elem_image.py |
Improved error handling and code optimization |
|
meerk40t/core/node/elem_image.py |
Code cleanup and minor improvements |
|
meerk40t/core/node/elem_image.py |
32 bit grayscale images like this one:
were not recognized properly:
That's fixed now:
Summary by Sourcery
Improve handling of 32-bit grayscale images by converting them to 8-bit grayscale, ensuring proper recognition and processing. Simplify exception handling in image processing functions.
Bug Fixes:
Enhancements: