# mertefekurt/pixelmorph architecture

> Architecture diagram of the GitHub repository mertefekurt/pixelmorph, 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/mertefekurt/pixelmorph
- Repository: https://github.com/mertefekurt/pixelmorph

## Overview

PixelMorph is a desktop image pixel-sorting application. A user opens an image in the PyQt interface, chooses vertical, horizontal, or global-brightness sorting, starts processing in a background thread, previews the result, and can save it. Image loading, pixel sorting, and image saving are distinct domain stages; animation utilities support the interface. The excerpts show the app entry point and processing and fade-animation calls. The UI excerpts are incomplete, so loader and saver links remain unverified.

Main entry points: [`ui_elements.py`](https://github.com/mertefekurt/pixelmorph/blob/main/ui_elements.py) (PixelMorph UI), [`main.py`](https://github.com/mertefekurt/pixelmorph/blob/main/main.py) (App entry), [`image_loader.py`](https://github.com/mertefekurt/pixelmorph/blob/main/image_loader.py) (Image loading), [`image_processor.py`](https://github.com/mertefekurt/pixelmorph/blob/main/image_processor.py) (Pixel sorting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_entry["App entry<br/>[main.py]"]
  node_interface["PixelMorph UI<br/>[ui_elements.py]"]
end

subgraph group_image["Image workflow"]
  node_loader["Image loading<br/>[image_loader.py]"]
  node_processor["Pixel sorting<br/>[image_processor.py]"]
  node_saver["Image saving<br/>[image_saver.py]"]
end

subgraph group_ui_support["UI support"]
  node_animations["UI animations<br/>[animations.py]"]
end

node_user(("User"))

node_user -->|"launches"| node_entry
node_entry -->|"creates"| node_interface
node_user -.->|"uses"| node_interface
node_interface -.->|"loads image"| node_loader
node_interface -->|"processes image"| node_processor
node_interface -.->|"saves result"| node_saver
node_interface -->|"animates preview"| node_animations

click node_entry "https://github.com/mertefekurt/pixelmorph/blob/main/main.py"
click node_interface "https://github.com/mertefekurt/pixelmorph/blob/main/ui_elements.py"
click node_loader "https://github.com/mertefekurt/pixelmorph/blob/main/image_loader.py"
click node_processor "https://github.com/mertefekurt/pixelmorph/blob/main/image_processor.py"
click node_saver "https://github.com/mertefekurt/pixelmorph/blob/main/image_saver.py"
click node_animations "https://github.com/mertefekurt/pixelmorph/blob/main/animations.py"

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_entry,node_interface,node_user toneBlue
class node_loader,node_processor,node_saver toneAmber
class node_animations toneMint
```

## Components

### Application

- [App entry](https://github.com/mertefekurt/pixelmorph/blob/main/main.py): `main.py`
- [PixelMorph UI](https://github.com/mertefekurt/pixelmorph/blob/main/ui_elements.py): `ui_elements.py`

### Image workflow

- [Image loading](https://github.com/mertefekurt/pixelmorph/blob/main/image_loader.py): `image_loader.py`
- [Pixel sorting](https://github.com/mertefekurt/pixelmorph/blob/main/image_processor.py): `image_processor.py`
- [Image saving](https://github.com/mertefekurt/pixelmorph/blob/main/image_saver.py): `image_saver.py`

### UI support

- [UI animations](https://github.com/mertefekurt/pixelmorph/blob/main/animations.py): `animations.py`

### Other components

- **User**

## Connections

- User → App entry: launches (evidence: `README.md`)
- App entry → PixelMorph UI: creates (evidence: `main.py`)
- User → PixelMorph UI: uses
- PixelMorph UI → Image loading: loads image (evidence: `ui_elements.py`)
- PixelMorph UI → Pixel sorting: processes image (evidence: `ui_elements.py`)
- PixelMorph UI → Image saving: saves result (evidence: `ui_elements.py`)
- PixelMorph UI → UI animations: animates preview (evidence: `ui_elements.py`)
