How ajjahn/psd works
Main Components Identification
a) Core Processing Components:
• File Header Parser
• Image Resources Parser
• Layer & Mask Information Parser
• Image Data Parser
• Blend Mode Engine
b) Data Flow Components:
• Input Handler (Raw PSD bytes)
• Channel Processing
• Layer Management
• Output Generation (RGBA)
Input Layer
• PSD byte input
• File validation components
Processing Layer
• Section parsers (arranged horizontally)
• Parallel processing capabilities
• Channel compression handlers
Layer Management
• Handling
• Layer blending
• RGBA composition
Output Layer
• Final image composition
• Layer extraction
• WASM bridge (for browser support)
Specific Design Elements
Use these visual elements:
• Rectangles: Core processing modules
• Hexagons: Data transformation components
• Blue: Input/Output operations
• Green: Core processing
• Yellow: Layer management
• Purple: Blend operations
Key Relationships to Highlight
• Relationship between:
• File sections and their parsers
• Layer groups and individual layers
• Channel compression and decompression
• Blend mode calculations
• WASM integration points
Implementation Details
• Channel processing pipeline
• Compression handling (RLE and Raw)
• Layer group hierarchy
• Blend mode operations