# christiansmith812/heic2jpg architecture

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

- Interactive diagram: https://gitdiagram.com/christiansmith812/heic2jpg
- Repository: https://github.com/christiansmith812/heic2jpg

## Overview

heic2jpg converts HEIC/HEIF batches into JPEGs through either a command-line or desktop front end. The shared workflow validates settings, discovers files, plans names and jobs, then converts and reports results; planning also supports previews and collision handling. Conversion preserves EXIF, applies orientation, optionally resizes, and sets output file dates. The README documents recursive discovery, parallel workers, and configurable naming. The graph follows documented calls and excerpted references; unsampled implementation details are omitted where their relationships cannot be verified.

Main entry points: [`gui.py`](https://github.com/christiansmith812/heic2jpg/blob/main/gui.py) (Desktop window), [`heic2jpg.py`](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py) (CLI entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontends["User interfaces"]
  node_cli["CLI entry point<br/>[heic2jpg.py]"]
  node_desktop["Desktop window<br/>[gui.py]"]
end

subgraph group_workflow["Batch workflow"]
  node_validation["Settings validation<br/>[heic2jpg.py]"]
  node_discovery["Source discovery<br/>[heic2jpg.py]"]
  node_planning["Job planning<br/>[heic2jpg.py]"]
  node_worker_dispatch["Worker dispatch<br/>[heic2jpg.py]"]
  node_reporting["Batch results<br/>[heic2jpg.py]"]
  node_naming["Name rendering<br/>[heic2jpg.py]"]
end

subgraph group_conversion["Image conversion"]
  node_image_processing["JPEG conversion<br/>[heic2jpg.py]"]
end

node_cli_user(("CLI user"))
node_desktop_user(("Desktop user"))
node_source_photos["HEIC/HEIF files"]
node_jpeg_outputs["JPEG output files"]

node_cli_user -->|"runs"| node_cli
node_desktop_user -->|"opens"| node_desktop
node_cli -->|"validates"| node_validation
node_cli -->|"collects"| node_discovery
node_cli -->|"plans"| node_planning
node_cli -->|"runs jobs"| node_worker_dispatch
node_desktop -->|"validates"| node_validation
node_desktop -->|"previews names"| node_naming
node_desktop -->|"collects"| node_discovery
node_desktop -->|"plans"| node_planning
node_desktop -->|"runs jobs"| node_worker_dispatch
node_source_photos -->|"provides files"| node_discovery
node_planning -->|"renders names"| node_naming
node_planning -->|"supplies jobs"| node_worker_dispatch
node_worker_dispatch -->|"dispatches jobs"| node_image_processing
node_image_processing -->|"writes JPEGs"| node_jpeg_outputs
node_worker_dispatch -->|"returns results"| node_reporting

click node_cli "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_desktop "https://github.com/christiansmith812/heic2jpg/blob/main/gui.py"
click node_validation "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_discovery "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_planning "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_worker_dispatch "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_reporting "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_naming "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py"
click node_image_processing "https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.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_cli,node_desktop,node_cli_user,node_desktop_user toneBlue
class node_validation,node_discovery,node_planning,node_worker_dispatch,node_reporting,node_naming toneAmber
class node_image_processing toneMint
class node_source_photos,node_jpeg_outputs toneIndigo
```

## Components

### User interfaces

- [CLI entry point](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`
- [Desktop window](https://github.com/christiansmith812/heic2jpg/blob/main/gui.py): `gui.py`

### Batch workflow

- [Settings validation](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`
- [Source discovery](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`
- [Job planning](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`
- [Worker dispatch](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`
- [Batch results](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`
- [Name rendering](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`

### Image conversion

- [JPEG conversion](https://github.com/christiansmith812/heic2jpg/blob/main/heic2jpg.py): `heic2jpg.py`

### Other components

- **CLI user**
- **Desktop user**
- **HEIC/HEIF files**
- **JPEG output files**

## Connections

- CLI user → CLI entry point: runs (evidence: `README.md`)
- Desktop user → Desktop window: opens (evidence: `README.md`)
- CLI entry point → Settings validation: validates (evidence: `README.md`)
- CLI entry point → Source discovery: collects (evidence: `README.md`)
- CLI entry point → Job planning: plans (evidence: `README.md`)
- CLI entry point → Worker dispatch: runs jobs (evidence: `README.md`)
- Desktop window → Settings validation: validates (evidence: `gui.py`)
- Desktop window → Name rendering: previews names (evidence: `gui.py`)
- Desktop window → Source discovery: collects (evidence: `gui.py`)
- Desktop window → Job planning: plans (evidence: `gui.py`)
- Desktop window → Worker dispatch: runs jobs (evidence: `gui.py`)
- HEIC/HEIF files → Source discovery: provides files (evidence: `README.md`)
- Job planning → Name rendering: renders names (evidence: `README.md`)
- Job planning → Worker dispatch: supplies jobs (evidence: `README.md`)
- Worker dispatch → JPEG conversion: dispatches jobs (evidence: `heic2jpg.py`)
- JPEG conversion → JPEG output files: writes JPEGs (evidence: `heic2jpg.py`)
- Worker dispatch → Batch results: returns results (evidence: `README.md`)
