Fix leptess set_image - use Path directly instead of string
This commit is contained in:
parent
1af163bd39
commit
4f9085f728
|
|
@ -39,7 +39,7 @@ impl OCREngine {
|
|||
.map_err(|e| format!("Failed to save temp image: {}", e))?;
|
||||
|
||||
// Perform OCR
|
||||
self.leptess.set_image(&temp_path.to_string_lossy());
|
||||
self.leptess.set_image(&temp_path);
|
||||
let text = self.leptess.get_utf8_text()
|
||||
.map_err(|e| format!("OCR failed: {:?}", e))?;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue