Creating this repository was a necessary step due to the absence of a node in ComfyUI capable of calculating area size and ratios. The tool integrates seamlessly with the 'Majic product' workflow, allowing for automated processing of images.
- Provides a custom node for area size and ratio calculations, filling a gap in ComfyUI's functionality.
- Features an interactive canvas interface for real-time image manipulation, including zooming and rotating.
- Enables users to save processed images easily, streamlining the workflow.
Context
This tool serves as a custom node in ComfyUI designed for image preprocessing, specifically focusing on calculating area sizes and color proportions. It addresses the limitations of existing nodes by offering automated execution capabilities that integrate with users' workflows.
Key Features & Benefits
The primary functionality includes the ability to calculate total area and the percentage of a selected color within an image. Additionally, the SnapCanvas interface allows users to dynamically adjust canvas size and manipulate images through intuitive controls such as zooming and rotating.
Advanced Functionalities
The tool features a PyQt5 interface that activates when the workflow reaches the SnapCanvas node, pausing the process to allow for user interaction. Users can precisely set canvas dimensions and manipulate images with mouse controls, enhancing the overall control and flexibility during image processing.
Practical Benefits
This tool significantly improves workflow efficiency by automating area calculations and providing an interactive environment for image adjustments. Users can easily save their work and resume processing without disrupting their workflow, leading to a more streamlined creative process.
Credits/Acknowledgments
The tool was developed by the original author who identified a need for specific functionalities within ComfyUI, and it is available for use under an open-source license.