# omarhossam-1/image_processing1 architecture

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

- Interactive diagram: https://gitdiagram.com/omarhossam-1/image_processing1
- Repository: https://github.com/omarhossam-1/image_processing1

## Overview

This repository contains two image-editing experiences: the PixelLab Windows GUI and an older console-based filter program. The main workflow is to import an image, edit it with filters or adjustments, review the result, and save it. PixelLab also tracks assets and edit history and supports interactive crop and skew workflows. The GUI excerpt and source index identify these capabilities, but do not expose enough call sites to verify most internal dispatches; those links are dashed. The bundled ImGui and stb code is represented as runtime support, not catalogued file by file.

Main entry points: [`Image Processing/PixelLab/GUI.cpp`](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/GUI.cpp) (GUI and workflow), [`Image Processing/Image_Class.h`](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/Image_Class.h) (Image data and operations), [`Image Processing/main.cpp`](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/main.cpp) (Console editor), [`Image Processing/PixelLab/Adjustments.cpp`](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Adjustments.cpp) (Adjustments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["PixelLab application"]
  node_gui["GUI and workflow<br/>[GUI.cpp]"]
  node_state["Assets and history<br/>[AppState.h]"]
  node_console["Console editor<br/>[main.cpp]"]
end

subgraph group_editing["Image editing"]
  node_adjust["Adjustments<br/>[Adjustments.cpp]"]
  node_bridge["Filter dispatch<br/>[FilterBridge.cpp]"]
  node_filterdefs["Filter definitions<br/>[Filters.h]"]
  node_adjustimpl["Adjustment operations<br/>[Adjustments.cpp]"]
end

subgraph group_media["Image I/O"]
  node_image["Image data and operations<br/>[Image_Class.h]"]
  node_decode["Image decoding<br/>[stb_image.h]"]
  node_encode["Image encoding<br/>[stb_image_write.h]"]
end

subgraph group_ui["UI and rendering"]
  node_renderer["Image renderer<br/>[Renderer.cpp]"]
  node_theme["Visual theme<br/>[Theme.h]"]
  node_imgui["ImGui framework"]
  node_winbackend["Win32 backend"]
  node_dxbackend["DirectX backend"]
end

node_user(("Editor"))

node_user -->|"edits images"| node_gui
node_gui -.->|"updates state"| node_state
node_gui -.->|"selects filters"| node_bridge
node_gui -.->|"previews adjustments"| node_adjust
node_gui -.->|"renders image"| node_renderer
node_gui -.->|"applies theme"| node_theme
node_gui -.->|"uses widgets"| node_imgui
node_gui -.->|"uses backend"| node_winbackend
node_gui -.->|"uses backend"| node_dxbackend
node_bridge -->|"uses definitions"| node_filterdefs
node_image -->|"decodes images"| node_decode
node_image -->|"encodes images"| node_encode
node_console -->|"loads and saves"| node_image
node_console -.->|"accepts choices"| node_user
node_adjust -.->|"implements operations"| node_adjustimpl

click node_gui "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/GUI.cpp"
click node_state "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/AppState.h"
click node_adjust "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Adjustments.cpp"
click node_bridge "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/FilterBridge.cpp"
click node_filterdefs "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Filters.h"
click node_renderer "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Renderer.cpp"
click node_theme "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Theme.h"
click node_imgui "https://github.com/omarhossam-1/image_processing1/tree/master/Image%20Processing/PixelLab/imgui"
click node_winbackend "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/imgui/imgui_impl_win32.cpp"
click node_dxbackend "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/imgui/imgui_impl_dx11.cpp"
click node_image "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/Image_Class.h"
click node_decode "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/stb_image.h"
click node_encode "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/stb_image_write.h"
click node_console "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/main.cpp"
click node_adjustimpl "https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Adjustments.cpp"

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_gui,node_state,node_console toneBlue
class node_adjust,node_bridge,node_filterdefs,node_adjustimpl toneAmber
class node_image,node_decode,node_encode toneMint
class node_renderer,node_theme,node_imgui,node_winbackend,node_dxbackend toneRose
class node_user toneIndigo
```

## Components

### PixelLab application

- [GUI and workflow](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/GUI.cpp): `Image Processing/PixelLab/GUI.cpp`
- [Assets and history](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/AppState.h): `Image Processing/PixelLab/AppState.h`
- [Console editor](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/main.cpp): `Image Processing/main.cpp`

### Image editing

- [Adjustments](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Adjustments.cpp): `Image Processing/PixelLab/Adjustments.cpp`
- [Filter dispatch](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/FilterBridge.cpp): `Image Processing/PixelLab/FilterBridge.cpp`
- [Filter definitions](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Filters.h): `Image Processing/PixelLab/Filters.h`
- [Adjustment operations](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Adjustments.cpp): `Image Processing/PixelLab/Adjustments.cpp`

### Image I/O

- [Image data and operations](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/Image_Class.h): `Image Processing/Image_Class.h`
- [Image decoding](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/stb_image.h): `Image Processing/stb_image.h`
- [Image encoding](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/stb_image_write.h): `Image Processing/stb_image_write.h`

### UI and rendering

- [Image renderer](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Renderer.cpp): `Image Processing/PixelLab/Renderer.cpp`
- [Visual theme](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/Theme.h): `Image Processing/PixelLab/Theme.h`
- [ImGui framework](https://github.com/omarhossam-1/image_processing1/tree/master/Image%20Processing/PixelLab/imgui): `Image Processing/PixelLab/imgui`
- [Win32 backend](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/imgui/imgui_impl_win32.cpp): `Image Processing/PixelLab/imgui/imgui_impl_win32.cpp`
- [DirectX backend](https://github.com/omarhossam-1/image_processing1/blob/master/Image%20Processing/PixelLab/imgui/imgui_impl_dx11.cpp): `Image Processing/PixelLab/imgui/imgui_impl_dx11.cpp`

### Other components

- **Editor**

## Connections

- Editor → GUI and workflow: edits images (evidence: `Image Processing/PixelLab/GUI.cpp`)
- GUI and workflow → Assets and history: updates state (evidence: `Image Processing/PixelLab/GUI.cpp`)
- GUI and workflow → Filter dispatch: selects filters
- GUI and workflow → Adjustments: previews adjustments
- GUI and workflow → Image renderer: renders image
- GUI and workflow → Visual theme: applies theme (evidence: `Image Processing/PixelLab/GUI.cpp`)
- GUI and workflow → ImGui framework: uses widgets (evidence: `Image Processing/PixelLab/GUI.cpp`)
- GUI and workflow → Win32 backend: uses backend
- GUI and workflow → DirectX backend: uses backend
- Filter dispatch → Filter definitions: uses definitions (evidence: `Image Processing/PixelLab/FilterBridge.cpp`)
- Image data and operations → Image decoding: decodes images (evidence: `Image Processing/Image_Class.h`)
- Image data and operations → Image encoding: encodes images (evidence: `Image Processing/Image_Class.h`)
- Console editor → Image data and operations: loads and saves (evidence: `Image Processing/main.cpp`)
- Console editor → Editor: accepts choices
- Adjustments → Adjustment operations: implements operations (evidence: `Image Processing/PixelLab/Adjustments.cpp`)
