# nirkzxc/aeconv architecture

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

- Interactive diagram: https://gitdiagram.com/nirkzxc/aeconv
- Repository: https://github.com/nirkzxc/aeconv

## Overview

AEConv is a Rust command-line image converter. Users invoke conversion, batch, listing, format, or image-info commands; conversions decode an image, optionally resize and round its corners, encode the target format, and write the result. The graph includes format capabilities, metadata, and atomic output handling. README documents the wider format and processing capabilities; some implementation details are unsampled, so uncertain internal links are omitted or marked unverified.

Main entry points: [`src/engine.rs`](https://github.com/nirkzxc/aeconv/blob/main/src/engine.rs) (Conversion engine), [`src/cli.rs`](https://github.com/nirkzxc/aeconv/blob/main/src/cli.rs) (Command handling), [`src/codecs.rs`](https://github.com/nirkzxc/aeconv/blob/main/src/codecs.rs) (Image decoding), [`src/batch.rs`](https://github.com/nirkzxc/aeconv/blob/main/src/batch.rs) (Batch conversion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["Command interface"]
  node_cli["Command handling<br/>[cli.rs]"]
  node_batch["Batch conversion<br/>[batch.rs]"]
  node_errors["Error reporting<br/>[errors.rs]"]
end

subgraph group_conversion["Conversion pipeline"]
  node_engine["Conversion engine<br/>[engine.rs]"]
  node_decode["Image decoding<br/>[codecs.rs]"]
  node_encode["Format encoding<br/>[codecs.rs]"]
  node_resize["Image resizing<br/>[processing.rs]"]
  node_corners["Rounded corners<br/>[processing.rs]"]
end

subgraph group_formats["Formats and metadata"]
  node_registry["Format registry<br/>[formats.rs]"]
  node_metadata["Image metadata<br/>[metadata.rs]"]
end

subgraph group_files["File handling"]
  node_outputconfig["Output configuration<br/>[output.rs]"]
  node_atomicwrite["Atomic file writes<br/>[output.rs]"]
end

node_user(("CLI user"))
node_filesystem[("Local image files")]

node_user -->|"invokes"| node_cli
node_cli -->|"runs conversion"| node_engine
node_cli -->|"runs batch"| node_batch
node_cli -->|"lists formats"| node_registry
node_cli -->|"reads image info"| node_decode
node_engine -.->|"decodes image"| node_decode
node_engine -.->|"resizes image"| node_resize
node_engine -.->|"rounds corners"| node_corners
node_engine -.->|"encodes image"| node_encode
node_engine -.->|"configures output"| node_outputconfig
node_engine -.->|"writes result"| node_atomicwrite
node_engine -.->|"checks formats"| node_registry
node_decode -->|"checks decode support"| node_registry
node_decode -->|"extracts metadata"| node_metadata
node_batch -->|"converts files"| node_engine
node_batch -->|"matches extensions"| node_registry
node_batch -->|"configures output"| node_outputconfig
node_filesystem -->|"provides input"| node_decode
node_atomicwrite -->|"writes output"| node_filesystem
node_engine -.->|"returns errors"| node_errors
node_cli -->|"reports errors"| node_errors

click node_cli "https://github.com/nirkzxc/aeconv/blob/main/src/cli.rs"
click node_batch "https://github.com/nirkzxc/aeconv/blob/main/src/batch.rs"
click node_engine "https://github.com/nirkzxc/aeconv/blob/main/src/engine.rs"
click node_decode "https://github.com/nirkzxc/aeconv/blob/main/src/codecs.rs"
click node_encode "https://github.com/nirkzxc/aeconv/blob/main/src/codecs.rs"
click node_resize "https://github.com/nirkzxc/aeconv/blob/main/src/processing.rs"
click node_corners "https://github.com/nirkzxc/aeconv/blob/main/src/processing.rs"
click node_registry "https://github.com/nirkzxc/aeconv/blob/main/src/formats.rs"
click node_metadata "https://github.com/nirkzxc/aeconv/blob/main/src/metadata.rs"
click node_outputconfig "https://github.com/nirkzxc/aeconv/blob/main/src/output.rs"
click node_atomicwrite "https://github.com/nirkzxc/aeconv/blob/main/src/output.rs"
click node_errors "https://github.com/nirkzxc/aeconv/blob/main/src/errors.rs"

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_batch,node_errors,node_user toneBlue
class node_engine,node_decode,node_encode,node_resize,node_corners,node_filesystem toneAmber
class node_registry,node_metadata toneMint
class node_outputconfig,node_atomicwrite toneRose
```

## Components

### Command interface

- [Command handling](https://github.com/nirkzxc/aeconv/blob/main/src/cli.rs): `src/cli.rs`
- [Batch conversion](https://github.com/nirkzxc/aeconv/blob/main/src/batch.rs): `src/batch.rs`
- [Error reporting](https://github.com/nirkzxc/aeconv/blob/main/src/errors.rs): `src/errors.rs`

### Conversion pipeline

- [Conversion engine](https://github.com/nirkzxc/aeconv/blob/main/src/engine.rs): `src/engine.rs`
- [Image decoding](https://github.com/nirkzxc/aeconv/blob/main/src/codecs.rs): `src/codecs.rs`
- [Format encoding](https://github.com/nirkzxc/aeconv/blob/main/src/codecs.rs): `src/codecs.rs`
- [Image resizing](https://github.com/nirkzxc/aeconv/blob/main/src/processing.rs): `src/processing.rs`
- [Rounded corners](https://github.com/nirkzxc/aeconv/blob/main/src/processing.rs): `src/processing.rs`

### Formats and metadata

- [Format registry](https://github.com/nirkzxc/aeconv/blob/main/src/formats.rs): `src/formats.rs`
- [Image metadata](https://github.com/nirkzxc/aeconv/blob/main/src/metadata.rs): `src/metadata.rs`

### File handling

- [Output configuration](https://github.com/nirkzxc/aeconv/blob/main/src/output.rs): `src/output.rs`
- [Atomic file writes](https://github.com/nirkzxc/aeconv/blob/main/src/output.rs): `src/output.rs`

### Other components

- **CLI user**
- **Local image files**

## Connections

- CLI user → Command handling: invokes (evidence: `README.md`)
- Command handling → Conversion engine: runs conversion (evidence: `src/cli.rs`)
- Command handling → Batch conversion: runs batch (evidence: `src/cli.rs`)
- Command handling → Format registry: lists formats (evidence: `src/cli.rs`)
- Command handling → Image decoding: reads image info (evidence: `src/cli.rs`)
- Conversion engine → Image decoding: decodes image (evidence: `src/engine.rs`)
- Conversion engine → Image resizing: resizes image (evidence: `src/engine.rs`)
- Conversion engine → Rounded corners: rounds corners (evidence: `src/engine.rs`)
- Conversion engine → Format encoding: encodes image (evidence: `src/engine.rs`)
- Conversion engine → Output configuration: configures output (evidence: `src/engine.rs`)
- Conversion engine → Atomic file writes: writes result (evidence: `src/engine.rs`)
- Conversion engine → Format registry: checks formats (evidence: `src/engine.rs`)
- Image decoding → Format registry: checks decode support (evidence: `src/codecs.rs`)
- Image decoding → Image metadata: extracts metadata (evidence: `src/codecs.rs`)
- Batch conversion → Conversion engine: converts files (evidence: `src/batch.rs`)
- Batch conversion → Format registry: matches extensions (evidence: `src/batch.rs`)
- Batch conversion → Output configuration: configures output (evidence: `src/batch.rs`)
- Local image files → Image decoding: provides input (evidence: `README.md`)
- Atomic file writes → Local image files: writes output (evidence: `src/output.rs`)
- Conversion engine → Error reporting: returns errors (evidence: `src/engine.rs`)
- Command handling → Error reporting: reports errors (evidence: `src/main.rs`)
