This is the specifications for the image file which is handled by the Game Extractor plugin Viewer_RES_0TSR_4_TEX.

Endian Order:Little Endian
Compression:none
Encryption:None


This format is used by the following Games:
Test Drive: Eve of Destruction [PS2]*.tex tm0


This is the format specification information:
 
// HEADER
  4 - Image Width
  4 - Image Height
  4 - Number of Mipmaps
  1 - Image Format? (0=4-bit Paletted, 1=8-bit Paletted, 2=RGB555)
  3 - Unknown
  4 - Unknown
  4 - null
  4 - Color Palette Offset (128) (null if not a paletted image)
  
  // for each mipmap
    4 - Image Data Offset [+4]
    
  X - null Padding to offset 128
    
// PALETTE
  if (8-bit paletted){
    // for each color (256 colors)
      4 - Color (ARGB)
    }
  else if (4-bit paletted){
    // for each color (16 colors)
      4 - Color (ARGB)
      
    960 - null Padding
    }
    
// IMAGE DATA
  // for each mipmap
    // for each pixel
      if (8-bit paletted){
        1 - Color Palette Index
        }
      else if (4-bit paletted){
        4bits - Color Palette Index
        }
      else {
        X - Pixel Data
        }


These are the accompanying notes and further information:
 
Paletted Image Data is PS2-Swizzled, other image data isn't swizzled


Game Extractor is able to read files of this type, as well as files from thousands of other games. To give it a try, download Game Extractor (Basic Version) for free, and see what it can do.

For further information on this format, refer to the source code on our GitHub repository.