@@ -5,13 +5,17 @@ serializable page settings. No page content enters local storage. Each source is
|
||||
decoded with `createImageBitmap`; its dimensions and byte size are checked before
|
||||
it joins the workspace.
|
||||
|
||||
The renderer downscales exceptionally large source rasters to a 24-megapixel
|
||||
working ceiling. A projective map sends every destination pixel through the four
|
||||
selected source corners and samples it bilinearly. A bounded pixel pass applies
|
||||
brightness, contrast, perceptual grayscale and optional Otsu/manual threshold.
|
||||
Canvas rotation handles quarter turns and the final ±5 degree deskew. Preview,
|
||||
OCR and export call the same renderer with different disclosed pixel budgets, so
|
||||
the preview semantics match the downloaded result.
|
||||
The renderer uses a disposable module worker and `OffscreenCanvas` when the
|
||||
browser supports them. It downscales exceptionally large source rasters to a
|
||||
24-megapixel working ceiling, then a projective map sends every destination
|
||||
pixel through the four selected source corners and samples it bilinearly. A
|
||||
bounded pixel pass applies brightness, contrast, perceptual grayscale and
|
||||
optional Otsu/manual threshold. Canvas rotation handles quarter turns and the
|
||||
final ±5 degree deskew. Worker jobs report stages, are terminated by abort and
|
||||
cannot replace a newer preview. A bounded HTML-canvas fallback preserves the
|
||||
same result where Worker/OffscreenCanvas are unavailable. Preview, OCR and
|
||||
export call this renderer with different disclosed pixel budgets, so the preview
|
||||
semantics match the downloaded result.
|
||||
|
||||
Deskew estimation downsamples to at most 420 pixels on the long edge, tests
|
||||
half-degree candidates from −5 to +5, and scores the horizontal projection of
|
||||
@@ -24,3 +28,10 @@ runtime variants and English integer trained data are copied from pinned npm
|
||||
packages to same-origin release assets. Tesseract's persistent model cache is
|
||||
disabled, one in-memory worker is reused and can be terminated, and no fallback
|
||||
CDN path is used.
|
||||
|
||||
OCR requests bounded block geometry, hOCR and TSV alongside plain text. Word
|
||||
boxes are normalized to the corrected OCR raster for an inert SVG overlay and
|
||||
are capped at 100,000 entries. hOCR is never injected into the application DOM;
|
||||
it and TSV are download-only evidence. Any subsequent page adjustment clears
|
||||
positioned OCR artifacts while retaining the user's editable plain text. PDFs
|
||||
remain image-only rather than silently embedding a potentially misaligned layer.
|
||||
|
||||
Reference in New Issue
Block a user