feat: Introduce JPEG support check and remove obsolete files

- Added a new script `check_jpeg_support.py` to verify device support for JPEG screenshots, enhancing functionality for image processing.
- Deleted obsolete files including `auto_test_result.txt`, `CODE_QUALITY_REVIEW.md`, and others to streamline the project and improve maintainability.
- Cleaned up unnecessary blank lines in various scripts to enhance readability and organization.
This commit is contained in:
Your Name committed 2025-12-31 17:01:18 +08:00
1 parent 07c387751d
commit 7db9864848
2 files changed
+29 -6

No files matched your search

+15 -3
View File
@@ -125,13 +125,16 @@ def ocr_single_region(image_path, region_name, ocr_processor):
'time': elapsed,
'success': True
}
except (OSError, IOError, ValueError, AttributeError) as e:
except Exception as e:
import traceback
error_msg = f"{type(e).__name__}: {str(e)}"
print(f" [DEBUG] {region_name} OCR错误: {error_msg}")
return {
'region': region_name,
'text': '',
'time': 0,
'success': False,
'error': str(e)
'error': error_msg
}
def test_parallel_ocr_real(region_images, config_name, omp_threads, max_workers):
@@ -193,10 +196,19 @@ def test_parallel_ocr_real(region_images, config_name, omp_threads, max_workers)
for future in futures:
region_name = futures[future]
try:
result = future.result()
result = future.result(timeout=60) # 每个任务最多60秒
results.append(result)
status = "✓" if result['success'] else "✗"
print(f" {status} {region_name}: {result['time']:.0f}ms, 结果: {result['text'][:30] if result['text'] else '(空)'}")
except TimeoutError:
print(f" ✗ {region_name}: 超时(>60秒)")
results.append({
'region': region_name,
'text': '',
'time': 0,
'success': False,
'error': 'Timeout'
})
except (RuntimeError, AttributeError, KeyError) as e:
print(f" ✗ {region_name}: 失败 - {e}")
results.append({