GIM Image

From XentaxWiki
Revision as of 16:03, 31 March 2021 by imported>Ikskoks (→‎Related Structures)
Jump to navigation Jump to search

Back to index | Edit this page

GIM

  • Format Type : Image
  • Endian Order : Little Endian / Big Endian


Format Specifications

// GIM image 
// file format


// header
4 bytes (char) - magic  // "MIG." or ".GIM"
4 bytes (char) - version  // "1.00" or "00.1"
4 bytes (char) - platform  //  "PSP" - PSP
                           //  null - PS3 or std
4 bytes - reserved


num_of_blocks *
{
   // block headers
   2 bytes (uint16) - block ID // 0x01 - Block
                               // 0x02 - Root
                               // 0x03 - Picture
                               // 0x04 - Image
                               // 0x05 - Palette
                               // 0x06 - Sequence
                               // 0xFF - File info

   2 bytes (uint16) - unknown    // 0x00 or 0x10
   4 bytes (uint32) - block size
   4 bytes (uint32) - next block relative offset
   4 bytes (uint32) - block data relative offset

   // block data
   num_of_blocks *
   {
      x bytes - block data  // See "Related Structures" section
                            // for more details
   }
}



Related Structures

// Image block (0x04) data


// image header
2 bytes (uint16) - header size
2 bytes (uint16) - reference
2 bytes (uint16) - image format  // 0x00 = RGBA5650 (16 bit no alpha)
                                 // 0x01 = RGBA5551 (16 bit sharp alpha)
                                 // 0x02 = RGBA4444 (16 bit gradient alpha)
                                 // 0x03 = RGBA8888 (32 bit gradient alpha)
                                 // 0x04 = INDEX4 (16 colors)
                                 // 0x05 = INDEX8 (256 colors)
                                 // 0x06 = INDEX16 (16 colors with alpha)
                                 // 0x07 = INDEX32 (256 colors with alpha)
                                 // 0x08 = DXT1 (no alpha)
                                 // 0x09 = DXT3 (sharp alpha)
                                 // 0x0A = DXT5 (gradient alpha)
                                 // 0x108 = DXT1EXT
                                 // 0x109 = DXT3EXT
                                 // 0x10A = DXT5EXT

2 bytes (uint16) - pixel order // 0x00 - NORMAL
                               // 0x01 - PSPIMAGE

2 bytes (uint16) - image/palette width
2 bytes (uint16) - image/palette height
2 bytes (uint16) - image/palette bpp alignment
2 bytes (uint16) - image/palette pitch alignment
2 bytes (uint16) - image/palette height alignment
2 bytes (uint16) - dimension count // e.g. 2
2 bytes (uint16) - reserved
2 bytes (uint16) - reserved
4 bytes (uint32) - index relative start offset // e.g. 0
4 bytes (uint32) - first plane relative start offset
4 bytes (uint32) - last plane relative start offset
4 bytes (uint32) - plane mask
2 bytes (uint16) - level type  // 0x00 - GENERIC
                               // 0x01 - MIPMAP
                               // 0x02 - MIPMAP2
                               // 0x03 - SEQUENCE
2 bytes (uint16) - level/mipmap count
2 bytes (uint16) - frame type
2 bytes (uint16) - frame count

x bytes - optional user data
x bytes - padding

4 bytes (uint32) - frame offset  // e.g. 64
0-12 bytes - padding


// data
x bytes - image/palette data



// File Info block (0xFF) data

22 bytes (char) - original filename
14 bytes (char) - Windows user account
25 bytes (char) - creation timestamp
14 bytes (char) - GimConv version
0-3 bytes - optional padding



// Sequence block (0xFF) data

MultiEx BMS Script

Not written yet.

Notes and Comments

* This file format occurs in PSP and PS2 games. * Files with this file format can have extension ".gim" or ".mig".

Compatible Programs

* gim2bmp * gim2png * GimConv * GimExtractor * GitMO * MinoriTool * Puyo Tools * TextER * gis2png * mig2bmp / bmp2mig * OPTIX iMage studio * Noesis * GIM Viewer * Dissidia Modding Suite (it includes GimConv and gim2png)

Games

List of games using this file format: * Yu-Gi-Oh! Tag Force * Yu-Gi-Oh! Tag Force 2

See Also

* GIM Specification