mirror of
https://github.com/PR0M3TH3AN/unredact.git
synced 2026-11-06 05:30:41 +00:00
fix: pass page image to detect_font_for_line in analysis
Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
1 parent
c0b4cc2d61
commit
5590c3c0d3
1 file changed
+1
-1
+1
-1
@@ -160,7 +160,7 @@ def _run_analysis(page_img: Image.Image, rx: int, ry: int, rw: int, rh: int) ->
|
||||
redaction_cy = (ry - crop_y1) + rh / 2
|
||||
best_line = min(lines, key=lambda l: abs((l.y + l.h / 2) - redaction_cy))
|
||||
|
||||
font_match = detect_font_for_line(best_line)
|
||||
font_match = detect_font_for_line(best_line, line_crop)
|
||||
|
||||
segments = []
|
||||
gap = {"x": rx, "w": rw}
|
||||
|
||||
Reference in new issue
Block a user