Fix leptess set_image - use Path directly instead of string

This commit is contained in:
Aether 2026-02-23 21:12:03 +00:00
parent 1af163bd39
commit 4f9085f728
No known key found for this signature in database
GPG Key ID: 95AFEE837E39AFD2
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ impl OCREngine {
.map_err(|e| format!("Failed to save temp image: {}", e))?; .map_err(|e| format!("Failed to save temp image: {}", e))?;
// Perform OCR // Perform OCR
self.leptess.set_image(&temp_path.to_string_lossy()); self.leptess.set_image(&temp_path);
let text = self.leptess.get_utf8_text() let text = self.leptess.get_utf8_text()
.map_err(|e| format!("OCR failed: {:?}", e))?; .map_err(|e| format!("OCR failed: {:?}", e))?;