Skip to content

Repository files navigation

LAMO Converter — GUI

https://arthurlamonattopro.github.io/LamoImage/

Description

A graphical converter for transforming PNG ↔ .lamo, a custom file format that packages compressed PNG data + metadata into a single file. Features a lightweight PySide6 interface, integrated preview, and complete format read/write support.


🔥 Download (Release)

Download the compiled version here:

👉 Releases: https://github.com/arthurlamonattopro/LamoImage/releases/

(If you want to run it directly without installing Python. The interface is the same.)


📦 Features

  • Open and preview PNG images.
  • Convert images (PNG, JPG, WebP) → .lamo.
  • Open .lamo files and reconstruct the original image.
  • Display complete file metadata.
  • Preview with automatic resizing.
  • Documented binary structure that is easy to extend.

🧩 Requirements (Running from Source)

  • Python 3.8+
  • Pillow
  • cryptography
  • PySide6

Installation:

pip install pillow cryptography pyside6

▶️ How to Run (Source Version)

python conversor.py

Portability Instructions for Linux and macOS

The LamoImage project consists of two Python scripts (LamoViewer.py and conversor.py) that use the Pillow library for image manipulation and PySide6 (Qt) for the graphical user interface (GUI).

Since Python and its libraries are cross-platform, the source code is directly compatible with Linux and macOS. Portability mainly requires ensuring that the necessary dependencies are installed on your system.

1. Prerequisites

You will need Python 3 installed. Python 3.6 or newer is recommended.

1.1. GUI Dependency (PySide6 / Qt)

PySide6 is the official Qt binding for Python and is cross-platform.

  • macOS: Install PySide6 via pip in the same Python environment used by the project.
  • Linux: PySide6 can also be installed via pip, but may require system graphics libraries that are already present on a desktop environment.

2. Installing Dependencies

It is strongly recommended to use a virtual environment to isolate the project's dependencies.

Step 1: Create and Activate the Virtual Environment

# Navigate to the project folder
cd /path/to/lamo_project

# Create the virtual environment
python3 -m venv venv

# Activate the virtual environment
# Linux/macOS:
source venv/bin/activate

Step 2: Install Python Libraries

With the virtual environment activated:

pip install Pillow cryptography PySide6

3. Running the Scripts

After installing the dependencies, you can run the scripts directly.

3.1. LAMO Viewer

To launch the image viewer (.lamo and common image formats):

python3 LamoViewer.py

3.2. LAMO Converter

To launch the conversion tool (common images to .lamo and vice versa):

python3 conversor.py

Note for macOS/Linux: Make sure a graphical desktop environment is available. The GUI will not open in an SSH session without graphical forwarding.


🧠 .lamo Format Structure

A binary file containing:

  • LMGO — signature (4 bytes)
  • 1 — version (1 byte)
  • JSON size (4 bytes, big-endian)
  • Metadata (UTF-8 JSON)
  • Compressed data size (4 bytes)
  • Compressed PNG data (zlib)

Minimum metadata:

{
  "width": 1920,
  "height": 1080,
  "mode": "RGB",
  "inner_format": "PNG"
}

✨ Internal API (for Developers)

  • write_lamo(path, img, metadata) — creates a .lamo file.
  • read_lamo(path) — reads a .lamo file and returns (Image, metadata).
  • convert_png_to_lamo(path) — quick conversion.
  • LamoConverterWindow — complete PySide6 GUI.

🧪 Usage Examples

Programmatic conversion:

from lamo_core import write_lamo, convert_png_to_lamo
convert_png_to_lamo("photo.png")

Adding custom metadata manually:

from PIL import Image
img = Image.open("photo.png")
write_lamo("output.lamo", img, {"author": "Lamo", "description": "Test"})

⚠️ Common Issues

  • "magic mismatch" → The file is not a .lamo file or is corrupted.
  • Large PNG takes a while to preview → This is normal; GUI rendering may take a few moments.

🚀 Roadmap / Suggestions

  • Batch mode (convert entire folders).
  • Configurable compression.
  • Editable metadata through the interface.
  • Improve format security
  • Internal WebP/JPEG support

🤝 Contributing

Fork the repository, make your changes, and submit a PR. The .lamo world grows with you.

About

Official implementation of the .lamo format: a compact binary container that stores an image and metadata in a single file. It includes tools for reading, writing, viewing, and inspecting the content.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages