1. Modify DCIImage node scale parameter from INT to FLOAT type 2. Support decimal scale range from 0.1 to 10.0 with 0.1 step increment 3. Update DCIIconBuilder.add_icon_image method to handle float scale values 4. Improve DCI reader to correctly parse and display decimal scale factors 5. Update create_dci_icon function default scales to include decimal examples 6. Add comprehensive documentation for decimal scaling functionality 7. Include test cases to verify decimal scale calculation accuracy This enhancement enables fine-grained scaling control for modern high-DPI displays, supporting scales like 1.25x, 1.5x which are commonly used in 125% and 150% display scaling scenarios. The implementation maintains backward compatibility with integer scales while providing smoother scaling transitions for better visual quality. feat: 为DCI图像添加小数缩放因子支持 1. 修改DCIImage节点的scale参数从INT类型改为FLOAT类型 2. 支持0.1到10.0范围的小数缩放,步长为0.1 3. 更新DCIIconBuilder.add_icon_image方法以处理浮点缩放值 4. 改进DCI读取器以正确解析和显示小数缩放因子 5. 更新create_dci_icon函数默认缩放值包含小数示例 6. 添加小数缩放功能的全面文档说明 7. 包含测试用例以验证小数缩放计算的准确性 此增强功能为现代高DPI显示器提供精细的缩放控制,支持1.25x、1.5x等 常用于125%和150%显示缩放场景的缩放比例。实现保持与整数缩放的向后 兼容性,同时提供更平滑的缩放过渡以获得更好的视觉质量.
Tests Directory
This directory contains all test files for the ComfyUI DCI Extension.
Test Files
Core Functionality Tests
- test_dci.py: Basic DCI format functionality tests
- test_dci_preview.py: DCI preview functionality tests
- test_binary_nodes.py: Binary file handling node tests
- test_new_dci_nodes.py: New DCI node architecture tests
- test_node_loading.py: Node loading and registration tests
Simple Tests
- simple_test.py: Simple functionality verification
- simple_binary_test.py: Basic binary operations test
Running Tests
Individual Tests
# Run specific test file
python tests/test_dci.py
python tests/test_dci_preview.py
All Tests
# Run all tests (if using pytest)
pytest tests/
# Or run all Python test files
python -m unittest discover tests/
Test Structure
Each test file follows the pattern:
- Setup test environment
- Create test data
- Execute functionality
- Verify results
- Cleanup
Test Data
Test files may create temporary DCI files and other test artifacts. These are typically cleaned up automatically after tests complete.
Coverage
Tests cover:
- DCI file creation and reading
- Node functionality and integration
- Binary data handling
- Preview generation
- Metadata extraction
- Error handling and edge cases