Release Scan Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 10:57:17 +02:00
parent 75cd6a6195
commit 8f34d05b75
29 changed files with 1000 additions and 136 deletions
+9
View File
@@ -1,5 +1,14 @@
# Changelog
## 0.2.0 - 2026-09-02
- Moved pixel and perspective processing into cancellable worker jobs with
progress, stale-result suppression and a bounded main-thread fallback.
- Added precise manual corner fields, OCR word geometry overlays, hOCR/TSV
export and combined multipage text export.
- Declared image/PDF/OCR input, export and optional worker/camera capability
profiles for Toolbox handoff.
## 0.1.0 - 2026-09-01
- Add bounded multi-image and camera-picker ingestion with real decoded-pixel checks
+3 -3
View File
@@ -1,5 +1,5 @@
==============================================================================
@add-ideas/toolbox-contract@0.2.3
@add-ideas/toolbox-contract@0.3.0
Declared licence: Apache-2.0
==============================================================================
--- LICENSE ---
@@ -198,7 +198,7 @@ Declared licence: Apache-2.0
==============================================================================
@add-ideas/toolbox-helpers@0.1.0
@add-ideas/toolbox-helpers@0.2.0
Declared licence: GPL-3.0-or-later
==============================================================================
--- LICENSE ---
@@ -879,7 +879,7 @@ Public License instead of this License. But first, please read
==============================================================================
@add-ideas/toolbox-shell-react@0.2.3
@add-ideas/toolbox-shell-react@0.3.0
Declared licence: Apache-2.0
==============================================================================
--- LICENSE ---
+9 -4
View File
@@ -4,23 +4,27 @@ Correct photographed document pages, assemble them, optionally recognize
English text, and export images or PDFs without sending content away. Scan
Tools is a local-first module in the add·ideas Toolbox.
## v0.1.0 capabilities
## v0.2.0 capabilities
- Add up to 24 browser-decodable PNG, JPEG or WebP images through a file or
camera-enabled picker
- Drag four document corners to apply an actual projective correction; handles
also support keyboard movement
support keyboard movement and precise percentage-coordinate entry
- Rotate in quarter turns, adjust deskew manually, or estimate a text-line
correction within ±5 degrees
- Tune brightness and contrast, retain colour, convert to grayscale, or create
black-and-white pages using Otsu or a manual threshold
- Preserve the previous preview until its debounced replacement is ready
- Run perspective correction, pixel adjustment, rotation and deskew analysis in
cancellable OffscreenCanvas workers with progress; fall back to bounded main-
thread canvases only where those browser APIs are unavailable
- Reorder pages with drag and drop, remove them without touching source files,
and export the selected page as PNG or JPEG
- Assemble every corrected page into A4, US Letter, or source-sized image-only
PDFs with a configurable margin
- Run optional English OCR using a bundled integer model and same-origin
Tesseract.js WebAssembly runtime; edit and download recognized text
Tesseract.js WebAssembly runtime; inspect word geometry and export editable
text, hOCR, TSV, or combined multipage text
- Work at nested paths, install as an offline PWA, use the shared system/light/
dark themes, and perform no remote content request
@@ -28,7 +32,8 @@ Tools is a local-first module in the add·ideas Toolbox.
This first release does not automatically detect page corners, remove fingers
or shadows, process input PDFs, recognize handwriting reliably, or create a
searchable invisible PDF text layer. OCR confidence is engine evidence, not an
searchable invisible PDF text layer. Geometry is exported separately so an
unverified alignment is never embedded into the PDF. OCR confidence is engine evidence, not an
accuracy guarantee. Perspective correction is high-quality bilinear resampling;
each new render is lossy unless exported as PNG.
+2 -2
View File
@@ -1,7 +1,7 @@
# Corresponding source
The corresponding source for Scan Tools 0.1.0 is available at:
The corresponding source for Scan Tools 0.2.0 is available at:
https://git.add-ideas.de/lotobo/scan-tools/src/tag/v0.1.0
https://git.add-ideas.de/lotobo/scan-tools/src/tag/v0.2.0
Build with Node.js 22, npm 11, `npm ci`, and `npm run release:artifact`.
+4 -4
View File
@@ -1,12 +1,12 @@
# Third-party notices
Scan Tools 0.1.0 directly depends on these runtime packages:
Scan Tools 0.2.0 directly depends on these runtime packages:
| Package | Pinned version | Declared licence |
| -------------------------------- | -------------: | ---------------- |
| `@add-ideas/toolbox-contract` | 0.2.3 | Apache-2.0 |
| `@add-ideas/toolbox-helpers` | 0.1.0 | GPL-3.0-or-later |
| `@add-ideas/toolbox-shell-react` | 0.2.3 | Apache-2.0 |
| `@add-ideas/toolbox-contract` | 0.3.0 | Apache-2.0 |
| `@add-ideas/toolbox-helpers` | 0.2.0 | GPL-3.0-or-later |
| `@add-ideas/toolbox-shell-react` | 0.3.0 | Apache-2.0 |
| `@tesseract.js-data/eng` | 1.0.0 | MIT |
| `jspdf` | 4.2.1 | MIT |
| `react` | 19.2.8 | MIT |
+18 -7
View File
@@ -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.
+1 -1
View File
@@ -1,5 +1,5 @@
const CACHE_PREFIX = "scan-tools-shell-";
const CACHE_NAME = CACHE_PREFIX + "0.1.0";
const CACHE_NAME = CACHE_PREFIX + "0.2.0";
const CORE = ["./", "./manifest.webmanifest", "./favicon.svg"];
self.addEventListener("install", (event) => {
event.waitUntil(
+22 -3
View File
@@ -3,12 +3,12 @@
"schemaVersion": 1,
"id": "de.add-ideas.scan-tools",
"name": "Scan Tools",
"version": "0.1.0",
"version": "0.2.0",
"description": "Correct, assemble, recognize and export scanned pages locally.",
"entry": "./",
"icon": "./favicon.svg",
"categories": ["document", "image", "productivity"],
"tags": ["scan", "camera", "deskew", "perspective", "ocr", "pdf"],
"tags": ["scan", "camera", "deskew", "perspective", "ocr", "hocr", "pdf"],
"integration": {
"contextVersion": 1,
"launchModes": ["navigate", "new-tab"],
@@ -16,11 +16,30 @@
},
"requirements": {
"secureContext": false,
"workers": true,
"workers": false,
"indexedDb": false,
"crossOriginIsolated": false,
"topLevelContext": false
},
"io": {
"accepts": [
{ "mediaType": "image/png", "extensions": [".png"] },
{ "mediaType": "image/jpeg", "extensions": [".jpg", ".jpeg"] },
{ "mediaType": "image/webp", "extensions": [".webp"] }
],
"produces": [
{ "mediaType": "image/png", "extensions": [".png"] },
{ "mediaType": "image/jpeg", "extensions": [".jpg"] },
{ "mediaType": "application/pdf", "extensions": [".pdf"] },
{ "mediaType": "text/plain", "extensions": [".txt"] },
{ "mediaType": "text/html", "extensions": [".hocr.html"] },
{ "mediaType": "text/tab-separated-values", "extensions": [".tsv"] }
]
},
"capabilities": {
"required": [],
"optional": ["workers", "offscreen-canvas", "webassembly", "camera-capture"]
},
"privacy": {
"processing": "local",
"fileUploads": true,