Expand description
§photostax-core
Unified photo stack library for Epson FastFoto repositories.
§Overview
Epson FastFoto scanners produce multiple files per scanned photo:
| File Pattern | Description |
|---|---|
<name>.jpg or <name>.tif | Original front scan |
<name>_a.jpg or <name>_a.tif | Enhanced version (color-corrected) or back of photo |
<name>_b.jpg or <name>_b.tif | Back of the photo (always) |
This library groups these files into PhotoStack objects and provides a
Repository trait for accessing them from various storage backends.
Both JPEG and TIFF formats are fully supported.
§Quick Start
use photostax_core::backends::local::LocalRepository;
use photostax_core::stack_manager::StackManager;
use photostax_core::photo_stack::ScannerProfile;
use photostax_core::search::SearchQuery;
// Create a StackManager with a local repository
let repo = LocalRepository::new("/path/to/photos");
let mut mgr = StackManager::single(Box::new(repo), ScannerProfile::Auto).unwrap();
// Query all stacks (auto-scans on first call)
let mut result = mgr.query(None, Some(20), None, None).unwrap();
println!("{} stacks across {} pages", result.total_count(), result.page_count());
// Iterate current page
for stack in result.current_page() {
println!("Photo: {} ({})", stack.name(), stack.id());
}
// Navigate to next page
while let Some(page) = result.next_page() {
for stack in page {
println!("Photo: {}", stack.name());
}
}§Module Organization
photo_stack— CorePhotoStackandMetadatatypes representing grouped photosclassify— Image analysis for classifying ambiguous_ascans as front or backrepository—Repositorytrait for storage backend abstractionscanner— Directory scanning and file grouping logicsearch— Query builder for filtering photo stacks by metadatasnapshot— Point-in-time snapshot for consistent paginationmetadata— EXIF, XMP, and sidecar database supportbackends— Storage backend implementations (local filesystem, cloud planned)
§Features
- Multi-format support: JPEG (
.jpg,.jpeg) and TIFF (.tif,.tiff) - Metadata merging: Combines EXIF, XMP, and custom sidecar database tags
- Search & filter: Query stacks by metadata with a fluent builder API
- Extensible backends: Pluggable
Repositorytrait for different storage systems
§License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Modules§
- backends
- Storage backend implementations.
- classifier
- Image classifier trait for determining if an ambiguous
_ascan is an enhanced front or a back-of-photo image. - classify
- Image classification for ambiguous FastFoto
_ascans. - events
- Event types for the reactive notification cascade.
- file_
access - File access abstraction with locking semantics.
- hashing
- Content hashing for duplicate detection and cache invalidation.
- image_
handle - Image handle trait and ImageRef accessor for per-file I/O operations.
- metadata
- Image format detection and metadata sub-modules.
- metadata_
handle - Metadata handle trait and MetadataRef accessor for per-stack metadata I/O.
- photo_
stack - Photo stack data structures representing grouped FastFoto scans.
- query_
result - Paginated query result with cursor navigation.
- repository
- Storage backend abstraction for photo repositories.
- scanner
- Directory scanning and photo stack grouping.
- search
- Search and filtering for photo stacks.
- snapshot
- Point-in-time snapshot for consistent pagination.
- stack_
manager - Unified cache manager for multiple photo repositories.