Skip to main content

Open & edit .img files for GTA III / VC / SA (+GUI)

Project description

Universal IMG

PyPI version Downloads Python versions License

Universal IMG is a Python library and a graphical user interface (GUI) application designed for opening and editing .img archive files used in Grand Theft Auto III, Vice City, and San Andreas.

The core of the library acts as a Python API wrapper for freimgedcs, while the optional GUI provides a user-friendly desktop application built with Kivy and KivyMD.

Installation

You can install the package via PyPI depending on your needs.

To use the Desktop GUI application:

pip install UniversalIMG[gui]

To use only the Python API (No GUI dependencies):

pip install UniversalIMG

Python API Usage

The library provides a convenient interface to manipulate .img files programmatically.

from pyimgedit import IMGArchive

# Initialize the archive
archive = IMGArchive('models/gta3.img')

# List contents
header, info, files = archive.list()
for file in files:
    print(file.name, file.size, file.offset)

# Add or replace a file
archive.add('player.dff')

# Extract a file
archive.extract('player.dff', 'extracted/player.dff')

# Rebuild archive
archive.rebuild()

GUI Application Features

If you installed the package with the [gui] extra, you can launch the application from the terminal or create a desktop shortcut to the executable.

Interface Overview

The graphical interface supports seamless file browsing, sorting, adding, extracting, and deleting operations with visual progress indicators and operation logs.

Main Interface Operations

Hotkeys & Navigation

The application supports quick keyboard operations for power users:

  • F2 / Ctrl+O - Open Archive
  • F3 / Ctrl+E - Extract Selected
  • Ctrl+A - Add Files
  • Ctrl+Shift+A - Select All
  • F4 / Ctrl+D - Delete Selected
  • F5 / Ctrl+R - Reload Archive
  • F6 / Ctrl+Shift+R - Rebuild Archive
  • F7 / Ctrl+L - Toggle Theme

Theming

Universal IMG includes Light, Dark, and Auto (System) themes. Click the lightbulb icon in the top right corner to cycle through modes.

Theming

Sorting & File Management

Click on column headers to sort files by Name, Size, or Offset. Click on a file name directly to rename it within the archive. Use the pagination bar at the bottom to navigate through large archives and filter files by search query.

Sorting Navigation

Troubleshooting

  1. If you encounter permission issues while editing archives (especially those located in Program Files), ensure you run the application with Administrator privileges or move your .img and executable files to the same non-system drive.

  2. If suddenly you encounter an OpenGL error:

    [INFO    ] [GL] OpenGL parsed version: 1, 1
    [CRITICAL] [GL] Minimum required OpenGL version (2.0) NOT found!
    

    You can change the backend by setting the KIVY_GL_BACKEND=angle_sdl2 environment variable in your system.

License

MIT License. Copyright (c) 2022 Nikita Denissov.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

universalimg-1.3.1.tar.gz (72.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

universalimg-1.3.1-py3-none-any.whl (72.3 kB view details)

Uploaded Python 3

File details

Details for the file universalimg-1.3.1.tar.gz.

File metadata

  • Download URL: universalimg-1.3.1.tar.gz
  • Upload date:
  • Size: 72.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.14 Linux/7.1.3-zen2

File hashes

Hashes for universalimg-1.3.1.tar.gz
Algorithm Hash digest
SHA256 0b71be11f323fea48109e7bf28995d89c2f0dc8c33fb92907ac06d9ce767e6e3
MD5 5da2a47be74cd2cc0ecef4069ac03596
BLAKE2b-256 973fb70fc7d0b92cafba95a470719a75caec27811b4ea90515918ed3233a1d47

See more details on using hashes here.

File details

Details for the file universalimg-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: universalimg-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 72.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.14 Linux/7.1.3-zen2

File hashes

Hashes for universalimg-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1ce8aafcab2a788247f5043839d8abc4fb3d0e0abe3d90dcbf25cf0a637b3b5
MD5 a20e5fec41357840fe366caf06f41349
BLAKE2b-256 3a56bc1ddf2d783d902a4c06e2fe5df1019fe637ea8786731c6e9228b363cf78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page