| 日本語 | English |
|---|
ScanPhotoEditor is an offline macOS document app for extracting individual printed photographs from smartphone captures. It automatically detects multiple photos, corrects perspective, provides precise manual geometry controls, and exports full-resolution images or an ordered PDF without applying automatic image enhancement.
![]() Drop image files or folders into a new project. |
![]() Refine detected corners while viewing the corrected result. |
![]() Export corrected regions as an ordered multi-page PDF. |
- Recursively imports HEIC/HEIF, JPEG, PNG, and TIFF files from drag-and-dropped files or folders.
- Detects multiple rectangular photographs in each source image with Apple Vision.
- Provides draggable corner and edge handles, an optional 8×8 grid, and zoomable source previews.
- Supports manual regions, detection reruns, full-frame reset, quarter-turn rotation, and horizontal or vertical flips.
- Keeps geometry edits, region creation and deletion, source removal, and ordering changes undoable.
- Reorders sources and regions by drag and drop, or sorts source images by filename using natural numeric order.
- Saves copied originals, thumbnails, geometry, and export order in a portable
.scanphotopackage. - Exports all regions or the selected region as JPEG, HEIC, PNG, TIFF, and/or an ordered multi-page PDF.
- Provides separate JPEG, HEIC, and PDF quality settings, export progress, cancellation, failure reporting, and conflict-safe filenames.
- Processes photos locally with no cloud upload or third-party runtime dependencies.
The rendering pipeline is intentionally geometry-only:
- EXIF orientation normalization
- Perspective correction
- Explicit quarter-turn rotation
- Explicit horizontal or vertical flips
- Color-profile handling required by the encoder
ScanPhotoEditor does not apply automatic exposure, white balance, contrast, saturation, sharpening, denoising, restoration, OCR, or face analysis. Imported originals are copied into the project package and are never modified.
- Apple Silicon Mac
- macOS 26.0 or later
- Xcode 26.5 or later
- XcodeGen 2.45.4 when regenerating the Xcode project
The checked-in ScanPhotoEditor.xcodeproj is the primary project. Open it in Xcode and run the ScanPhotoEditor scheme, or build and launch from Terminal:
./script/build_and_run.shTo regenerate the project after changing project.yml:
xcodegen generateThe build script also supports --debug, --logs, --telemetry, and --verify.
- Create a new document or open an existing
.scanphotoproject. - Drop supported image files or folders anywhere in the document window.
- Select a detected region in the sidebar.
- Drag its corner or edge handles to refine the crop. Use the grid and corrected preview to check alignment.
- Rotate, flip, add, delete, reset, reorder, or rerun detection as needed.
- Save the document to preserve copied originals and non-destructive edits.
- Choose File → Export…, select the output formats and regions, then choose a destination folder.
If no rectangle is detected, the app creates a full-frame region marked Needs Review so it can be corrected manually.
A .scanphoto document is a package containing the project manifest, copied original files, and generated thumbnails:
Example.scanphoto/
├── manifest.json
├── Originals/
└── Thumbnails/
Editing uses preview-sized images. Full-resolution originals are decoded only during export, and PDF pages are rendered one at a time to keep memory use bounded.
The app uses:
- SwiftUI for the document interface, editor, inspector, settings, and export workflow
- Vision for rectangle detection
- Core Image for perspective correction
- ImageIO for image decoding and encoding
- Core Graphics for streamed PDF generation
ReferenceFileDocumentandFileWrapperfor.scanphotopackages- XCTest and XCUITest for automated coverage
Run the test suite with:
xcodebuild \
-project ScanPhotoEditor.xcodeproj \
-scheme ScanPhotoEditor \
-destination 'platform=macOS,arch=arm64' \
testScanPhotoEditor is available under the MIT License.


