Skip to main content

Interface and acquire images from the Reflecta (a.k.a PacificImage) line of film scanners.

Project description

pieusb

Python package to enable interfacing with USB-connected Reflecta (a.k.a. PacificImage) film and dia scanners.

Usage example

import pieusb
from pieusb.types import ScanPhase

for info in pieusb.available_devices():
    print(info.vendor, info.model)

scanner = pieusb.Scanner(pieusb.available_devices()[0])
scanner.mode = "rgbi"
scanner.resolution = 5000
scanner.color_depth = 16
scanner.tl_x, scanner.tl_y = 0, 0
scanner.br_x, scanner.br_y = 14200, 9600

def on_progress(data):
    if data.phase == ScanPhase.SCANNING:
        print(f"{data.scanned_lines}/{data.total_lines}")

def on_complete(result):
    if result.error:
        raise result.error
    numpy.save("scan.npy", result.image)

scanner.scan(progress=on_progress, scan_complete=on_complete)   # returns immediately
scanner.wait()                                                  # optional
scanner.close()

WARNING

No guarantees are made as far as hardware safety goes.

It may be possible to set certain parameters, such as scan width or height, such that the physical limits of the scanner are exceeded. This may damage your hardware.

Proceed at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pieusb-0.1.0.tar.gz (757.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pieusb-0.1.0-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file pieusb-0.1.0.tar.gz.

File metadata

  • Download URL: pieusb-0.1.0.tar.gz
  • Upload date:
  • Size: 757.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pieusb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 74ad3b7cc63241d1155fca8a3546a4ab25f50c1b9ee783deb8a437bd119ddc9a
MD5 39285bfa31ccd423c65d905af1682315
BLAKE2b-256 ec89da1e2a7e7ff34a3df394d2bc841d3961028ee844a302f8e7b09f63ccdd77

See more details on using hashes here.

File details

Details for the file pieusb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pieusb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pieusb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6a4dc19a73d0947a59a32899f35789cfc9d571f7f65178163c59fc92fc31a60
MD5 9e419ad6e6888ef404adc7b23ddc7a5c
BLAKE2b-256 a98d90cd219d0dc06862673f919895b3dd885ddb1d614fc4fcd7475df480221f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page