Expand description
Image processing and responsive image generation.
Stage 2 of the Simple Gal build pipeline. Takes the manifest from the scan stage and processes all images to generate responsive sizes and thumbnails.
§Dependencies
Uses the pure Rust imaging backend — no external dependencies required.
§Output Formats
For each source image, generates:
- Responsive images: Multiple sizes in AVIF format
- Thumbnails: Fixed aspect ratio crops for gallery grids
§Default Configuration
Responsive sizes: 800px, 1400px, 2080px (on the longer edge)
Quality: 90%
Thumbnail aspect: 4:5 (portrait)
Thumbnail size: 400px (on the short edge)§Output Structure
processed/
├── manifest.json # Updated manifest with generated paths
├── 010-Landscapes/
│ ├── 001-dawn-800.avif # Responsive sizes
│ ├── 001-dawn-1400.avif
│ ├── 001-dawn-2080.avif
│ └── 001-dawn-thumb.avif # 4:5 center-cropped thumbnail
└── ...Structs§
- Generated
Variant - Input
Album - Input
Image - Input
Manifest - Input manifest (from scan stage)
- Output
Album - Output
Image - Output
Manifest - Output manifest (after processing)
- Process
Config - Configuration for image processing
- Process
Result - Process result containing the output manifest and cache statistics.
- Variant
Info - Information about a single processed variant (for progress reporting).
Enums§
- Process
Error - Process
Event - Progress events emitted during image processing.
- Variant
Status - Cache outcome for a single processed variant (for progress reporting).
Functions§
- process
- process_
with_ backend - Process images using a specific backend (allows testing with mock).