# kvkrpm/image_steganography architecture

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

- Interactive diagram: https://gitdiagram.com/kvkrpm/image_steganography
- Repository: https://github.com/kvkrpm/image_steganography

## Overview

This repository is an image-steganography application. The visible product scripts represent encoding and decoding, with OpenCV and Fernet dependencies; Main.py also uses Pillow. The source index confirms these imports but does not show calls between the application entry point and the encode/decode scripts, so those links are omitted. The README gives no workflow details, and traing.py’s role and connections are unclear from the available evidence.

Main entry points: [`encode_steganography.py`](https://github.com/kvkrpm/image_steganography/blob/main/encode_steganography.py) (Encode script), [`decode_steganography.py`](https://github.com/kvkrpm/image_steganography/blob/main/decode_steganography.py) (Decode script), [`Main.py`](https://github.com/kvkrpm/image_steganography/blob/main/Main.py) (Main application), [`Lib/site-packages/cv2/__init__.py`](https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/cv2/__init__.py) (OpenCV API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_main["Main application<br/>[Main.py]"]
  node_encode["Encode script"]
  node_decode["Decode script"]
  node_training["Training script<br/>[traing.py]"]
end

subgraph group_media["Image handling"]
  node_pillow["Pillow image API<br/>[Image.py]"]
  node_opencv["OpenCV API<br/>[__init__.py]"]
end

subgraph group_security["Encryption"]
  node_fernet["Fernet encryption<br/>[fernet.py]"]
end

node_user(("User"))

node_user -.->|"uses"| node_main
node_main -->|"imports"| node_pillow
node_encode -->|"imports"| node_opencv
node_encode -->|"imports"| node_fernet
node_decode -->|"imports"| node_opencv
node_decode -->|"imports"| node_fernet

click node_main "https://github.com/kvkrpm/image_steganography/blob/main/Main.py"
click node_encode "https://github.com/kvkrpm/image_steganography/blob/main/encode_steganography.py"
click node_decode "https://github.com/kvkrpm/image_steganography/blob/main/decode_steganography.py"
click node_training "https://github.com/kvkrpm/image_steganography/blob/main/traing.py"
click node_pillow "https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/PIL/Image.py"
click node_opencv "https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/cv2/__init__.py"
click node_fernet "https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/cryptography/fernet.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_main,node_encode,node_decode,node_training,node_user toneBlue
class node_pillow,node_opencv toneAmber
class node_fernet toneMint
```

## Components

### Application

- [Main application](https://github.com/kvkrpm/image_steganography/blob/main/Main.py): `Main.py`
- [Encode script](https://github.com/kvkrpm/image_steganography/blob/main/encode_steganography.py): `encode_steganography.py`
- [Decode script](https://github.com/kvkrpm/image_steganography/blob/main/decode_steganography.py): `decode_steganography.py`
- [Training script](https://github.com/kvkrpm/image_steganography/blob/main/traing.py): `traing.py`

### Image handling

- [Pillow image API](https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/PIL/Image.py): `Lib/site-packages/PIL/Image.py`
- [OpenCV API](https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/cv2/__init__.py): `Lib/site-packages/cv2/__init__.py`

### Encryption

- [Fernet encryption](https://github.com/kvkrpm/image_steganography/blob/main/Lib/site-packages/cryptography/fernet.py): `Lib/site-packages/cryptography/fernet.py`

### Other components

- **User**

## Connections

- User → Main application: uses
- Main application → Pillow image API: imports (evidence: `Main.py`)
- Encode script → OpenCV API: imports (evidence: `encode_steganography.py`)
- Encode script → Fernet encryption: imports (evidence: `encode_steganography.py`)
- Decode script → OpenCV API: imports (evidence: `decode_steganography.py`)
- Decode script → Fernet encryption: imports (evidence: `decode_steganography.py`)
