Add Plustek (USB) scanner backend for OpticFilm 8200i SE and enable the Scan tab on Windows - #783
Draft
jboneng wants to merge 14 commits into
Draft
Add Plustek (USB) scanner backend for OpticFilm 8200i SE and enable the Scan tab on Windows#783jboneng wants to merge 14 commits into
jboneng wants to merge 14 commits into
Conversation
…he Scan tab on Windows
…r gate at every PPI
…nset peak after makeup, to help negpys convertion logic out
…port one bit depth
…elease this functionality would be a part of, change it so pyUSB (and libusb for windows build) is a non optional part of the frozen release build
…n't know what release this functionality would be a part of
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a first-party Plustek (USB) scanner backend and enables the Scan tab on Windows by implementing a pyUSB based driver for the the OpticFilm series of scanners into NegPy.
Until now, film-scanner acquisition went only through SANE (
python-sane), which is unavailable on Windows, so the Scan UI was a placeholder there. This PR:negpy/infrastructure/scanners/plustek/plustek_backend.pyagainst NegPy’s realScannerBackend/ScanResulttypes (same pattern as SANE)ScanSidebaron WindowsSupported scan hardware today: Plustek OpticFilm 8200i SE only (
07b3:1825, GL128). Other OpticFilm PIDs may enumerate/probe but are locked out of scan until validated.Backend selection
plusteksanePersisted
backend: "sane"on Windows is coerced toplustekon load so old settings do not try to open python-sane.Architecture
capture_iris enabled; IR is registered to RGB with whole-pixel phase correlation after the carriage re-homesScannerUnavailablewith an install / WinUSB hint (soft fail; app still runs)TransientScanError(ScannerService retries)SE capture quality (post-landing fixes on this branch)
docs/PLUSTEK_WINDOWS.mdtroubleshooting for DVDSET / host-path symptomsScan UI capability gating
Controls appear only when the selected device reports a real choice / feature:
caps.autofocus(SANE when"autofocus" in opt; Plustek SE = false)caps.auto_exposure(SANEae; Plustek SE = false)len(supported_depths) > 1(Plustek SE is 16-bit only → hidden; sole depth still sent in scan params)Packaging
make install/ release sync keep--no-group plustekso CI does not require USB deps; developers who scan runuv sync --group plustekusb/usb.coreso they pass without the optional group (CI)include = ["negpy*"]so nested packages ship correctlyNOTICE.mdDocs
docs/PLUSTEK_WINDOWS.md— Zadig / WinUSB steps + SE calib troubleshootingKnown follow-ups (out of scope)
Future ToDos
Test plan
uv sync --group plustekuv run pytest tests/scanners/test_backend_registry.py tests/scanners/test_plustek_backend.py tests/scanners/plustek/ tests/scanners/test_capabilities.py tests/test_scan_sidebar.py -q_IRsidecar / dust path worksbackend: "sane"on Windows do not crash; coerce to Plustek