The story behind IMGEditor — a tool for editing IMG archive files used in GTA III, Vice City, San Andreas, and Bully.
IMGEditor is a desktop application for editing IMG archive files — the container format used by Rockstar's 3D era games. These archives hold textures, models, and other game assets.
The IMG format is a simple archive structure:
struct IMGHeader {
char magic[4]; // "VER2"
uint32_t numEntries;
uint32_t dirOffset;
uint32_t dirSize;
};
I chose C++ with ImGui for the UI because:
The biggest challenge was supporting multiple game variants. Each game uses slightly different versions of the format, so I implemented a version detection system:
enum class IMGVersion {
GTA3, // Original format
VC, // Vice City variant
SA, // San Andreas (most common)
Bully, // Bully Scholarship Edition
Unknown
};
IMGVersion DetectVersion(const char* header) {
// Analyze header structure to determine version
// ...
}
IMGEditor has been downloaded thousands of times and is used by modders worldwide. It's become an essential tool in the GTA modding toolkit.