# d2phap/imageglass architecture

> Architecture diagram of the GitHub repository d2phap/imageglass, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/d2phap/imageglass
- Repository: https://github.com/d2phap/imageglass

## Overview

ImageGlass is a cross-platform photo viewer with image browsing, rendering, and focused editing tools. The principal workflow is launching a platform app, opening and navigating images, decoding and caching them, then displaying them in the viewer; users can also save or print images and use built-in or external tools. The tree and README establish broad capabilities, while sampled source supports only selected implementation links. Dashed edges mark relationships not verified in the excerpts or source index.

Main entry points: [`source/ImageGlass.Win32/Program.cs`](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Win32/Program.cs) (Platform Entry), [`source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager.cs`](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager.cs) (Photo Manager), [`source/ImageGlass.Lib/Core.cs`](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Core.cs) (App Core), [`source/ImageGlass.Lib/Common/Photoing/Photos/Photo.cs`](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Photos/Photo.cs) (Photo Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_platform_entry["Platform Entry<br/>[Program.cs]"]
  node_core["App Core<br/>[Core.cs]"]
  node_settings[("Settings<br/>[Config.cs]")]
end

subgraph group_photos["Photo Workflow"]
  node_photo_manager["Photo Manager<br/>[PhotoManager.cs]"]
  node_photo["Photo Model<br/>[Photo.cs]"]
  node_codec_registry["Codec Registry<br/>[CodecRegistry.cs]"]
  node_skia_codec["Skia Codec<br/>[SkiaCodec.cs]"]
  node_encode_pipeline["Save Pipeline"]
  node_thumbnail_cache[("Photo Cache")]
end

subgraph group_experience["Viewing Experience"]
  node_viewer["Image Viewer<br/>[ViewerControl.cs]"]
  node_renderer["Photo Renderer<br/>[PhotoRenderer.cs]"]
  node_slideshow["Slideshow"]
end

subgraph group_tools["Tools and Output"]
  node_built_in_tools["Built-in Tools"]
  node_external_tools["External Tools"]
  node_plugins["Plugin System<br/>[PluginRegistry.cs]"]
  node_printing["Print Workflow<br/>[PrintSession.cs]"]
end

subgraph group_services["Platform Services"]
  node_file_search["File Search"]
  node_updates["Update Service<br/>[UpdateProvider.cs]"]
  node_platform_services["Platform Adapters"]
end

node_user(("User"))

node_user -->|"launches"| node_platform_entry
node_platform_entry -->|"starts"| node_core
node_platform_entry -->|"configures"| node_file_search
node_platform_entry -.->|"selects adapters"| node_platform_services
node_user -.->|"views images"| node_viewer
node_viewer -.->|"requests photos"| node_photo_manager
node_photo_manager -->|"uses"| node_photo
node_photo_manager -->|"caches"| node_thumbnail_cache
node_photo_manager -->|"reads services"| node_core
node_photo -.->|"decodes through"| node_codec_registry
node_codec_registry -.->|"selects codec"| node_skia_codec
node_viewer -.->|"renders with"| node_renderer
node_user -.->|"browses files"| node_file_search
node_user -.->|"customizes"| node_settings
node_user -.->|"starts"| node_slideshow
node_user -.->|"uses"| node_built_in_tools
node_user -.->|"prints"| node_printing
node_photo -->|"saves from"| node_encode_pipeline
node_encode_pipeline -->|"selects encoder"| node_codec_registry
node_core -->|"registers proxies"| node_plugins
node_core -->|"registers tools"| node_external_tools
node_user -.->|"checks updates"| node_updates

click node_platform_entry "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Win32/Program.cs"
click node_core "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Core.cs"
click node_settings "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Settings/Config.cs"
click node_file_search "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/ServiceProviders/FileSearchService/FileSearchProvider.cs"
click node_photo_manager "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager.cs"
click node_photo "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Photos/Photo.cs"
click node_codec_registry "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecRegistry.cs"
click node_skia_codec "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Codecs/SkiaCodecs/SkiaCodec.cs"
click node_encode_pipeline "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecEncodePipeline.cs"
click node_thumbnail_cache "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager_Caching.cs"
click node_viewer "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/UI/Viewer/ViewerControl.cs"
click node_renderer "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/UI/Viewer/Renderer/PhotoRenderer.cs"
click node_slideshow "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/ServiceProviders/SlideshowProvider.cs"
click node_built_in_tools "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Tools/Builtins/CropImage/CropImageToolControl.axaml.cs"
click node_external_tools "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Tools/External/ToolProcessManager.cs"
click node_plugins "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Plugins/PluginRegistry.cs"
click node_printing "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Printing/PrintSession.cs"
click node_updates "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/ServiceProviders/UpdateProvider.cs"
click node_platform_services "https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Linux/Common/ServiceProviders/LinuxShellProvider.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_platform_entry,node_core,node_settings,node_user toneBlue
class node_photo_manager,node_photo,node_codec_registry,node_skia_codec,node_encode_pipeline,node_thumbnail_cache toneAmber
class node_viewer,node_renderer,node_slideshow toneMint
class node_built_in_tools,node_external_tools,node_plugins,node_printing toneRose
class node_file_search,node_updates,node_platform_services toneIndigo
```

## Components

### Application

- [Platform Entry](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Win32/Program.cs): `source/ImageGlass.Win32/Program.cs`
- [App Core](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Core.cs): `source/ImageGlass.Lib/Core.cs`
- [Settings](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Settings/Config.cs): `source/ImageGlass.Lib/Settings/Config.cs`

### Photo Workflow

- [Photo Manager](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager.cs): `source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager.cs`
- [Photo Model](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Photos/Photo.cs): `source/ImageGlass.Lib/Common/Photoing/Photos/Photo.cs`
- [Codec Registry](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecRegistry.cs): `source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecRegistry.cs`
- [Skia Codec](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Codecs/SkiaCodecs/SkiaCodec.cs): `source/ImageGlass.Lib/Common/Photoing/Codecs/SkiaCodecs/SkiaCodec.cs`
- [Save Pipeline](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecEncodePipeline.cs): `source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecEncodePipeline.cs`
- [Photo Cache](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager_Caching.cs): `source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager_Caching.cs`

### Viewing Experience

- [Image Viewer](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/UI/Viewer/ViewerControl.cs): `source/ImageGlass.Lib/UI/Viewer/ViewerControl.cs`
- [Photo Renderer](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/UI/Viewer/Renderer/PhotoRenderer.cs): `source/ImageGlass.Lib/UI/Viewer/Renderer/PhotoRenderer.cs`
- [Slideshow](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/ServiceProviders/SlideshowProvider.cs): `source/ImageGlass.Lib/Common/ServiceProviders/SlideshowProvider.cs`

### Tools and Output

- [Built-in Tools](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Tools/Builtins/CropImage/CropImageToolControl.axaml.cs): `source/ImageGlass.Lib/Tools/Builtins/CropImage/CropImageToolControl.axaml.cs`
- [External Tools](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Tools/External/ToolProcessManager.cs): `source/ImageGlass.Lib/Tools/External/ToolProcessManager.cs`
- [Plugin System](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Plugins/PluginRegistry.cs): `source/ImageGlass.Lib/Plugins/PluginRegistry.cs`
- [Print Workflow](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/Printing/PrintSession.cs): `source/ImageGlass.Lib/Common/Printing/PrintSession.cs`

### Platform Services

- [File Search](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/ServiceProviders/FileSearchService/FileSearchProvider.cs): `source/ImageGlass.Lib/Common/ServiceProviders/FileSearchService/FileSearchProvider.cs`
- [Update Service](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Lib/Common/ServiceProviders/UpdateProvider.cs): `source/ImageGlass.Lib/Common/ServiceProviders/UpdateProvider.cs`
- [Platform Adapters](https://github.com/d2phap/imageglass/blob/develop/source/ImageGlass.Linux/Common/ServiceProviders/LinuxShellProvider.cs): `source/ImageGlass.Linux/Common/ServiceProviders/LinuxShellProvider.cs`

### Other components

- **User**

## Connections

- User → Platform Entry: launches (evidence: `README.md`)
- Platform Entry → App Core: starts (evidence: `source/ImageGlass.Win32/Program.cs`)
- Platform Entry → File Search: configures (evidence: `source/ImageGlass.Win32/Program.cs`)
- Platform Entry → Platform Adapters: selects adapters
- User → Image Viewer: views images
- Image Viewer → Photo Manager: requests photos
- Photo Manager → Photo Model: uses (evidence: `source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager_Caching.cs`)
- Photo Manager → Photo Cache: caches (evidence: `source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager_Caching.cs`)
- Photo Manager → App Core: reads services (evidence: `source/ImageGlass.Lib/Common/Photoing/Manager/PhotoManager_Caching.cs`)
- Photo Model → Codec Registry: decodes through
- Codec Registry → Skia Codec: selects codec
- Image Viewer → Photo Renderer: renders with
- User → File Search: browses files
- User → Settings: customizes
- User → Slideshow: starts
- User → Built-in Tools: uses
- User → Print Workflow: prints
- Photo Model → Save Pipeline: saves from (evidence: `source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecEncodePipeline.cs`)
- Save Pipeline → Codec Registry: selects encoder (evidence: `source/ImageGlass.Lib/Common/Photoing/Codecs/Registry/CodecEncodePipeline.cs`)
- App Core → Plugin System: registers proxies (evidence: `source/ImageGlass.Lib/Core.cs`)
- App Core → External Tools: registers tools (evidence: `source/ImageGlass.Lib/Core.cs`)
- User → Update Service: checks updates
