ThunderScanConverter

main

Swift tool for reading ThunderScan files and turning them into PNGs
amyworrall/ThunderScanConverter

ThunderScanConverter

Converts ThunderScan .SCAN files to PNG.

Background

ThunderScan was a scanner device for early Macintosh computers that replaced the ribbon cartridge in an Apple ImageWriter printer, turning it into an image scanner. It captured up to 32 levels of gray (5 bits per pixel).

The .SCAN file format stores uncompressed grayscale image data with a split bit-plane layout: 4-bit nibbles plus a 1-bit plane combine to give 5-bit (32-level) grayscale. The format also supports 1-bit halftone images.

The file format was derived with the help of the Photoshop 1.0 source code, which is available for non-commercial use. This was used to document the file format, and that documentation was then used to build a Swift processor.

Note: The .SCAN file format is not the same as "ThunderScan compression" (TIFF compression code 32809), which is a separate RLE/delta codec for use inside TIFF files.

Building

Requires a Mac with Xcode command-line tools installed.

cd ThunderScanConverter
swift build -c release

The binary will be at .build/release/ThunderScanConverter.

Usage

# Convert a .SCAN file, writing output alongside the input as .png
.build/release/ThunderScanConverter path/to/image.SCAN

# Specify a custom output path
.build/release/ThunderScanConverter path/to/image.SCAN output.png

File Format

See SCAN_FORMAT.md for complete documentation of the .SCAN file format.

Example

$ .build/release/ThunderScanConverter negs.SCAN
Input:      negs.SCAN
Dimensions: 503 x 177
Depth:      5 bits/pixel
Resolution: 100 DPI
Output:     negs.png

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Mar 22 2026 18:03:23 GMT-0900 (Hawaii-Aleutian Daylight Time)