Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/index.php on line 54

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebStart.php on line 63

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 97

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 100

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 103

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Defines.php on line 187

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 115

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 134

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 137

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 139

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 144

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 150

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 157

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 381

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 382

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 383

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 384

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/languages/Language.php on line 20

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: include_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Skin.php on line 153

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/skins/Vector.deps.php on line 11

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Skin.php on line 155

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: include(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/resourceloader/ResourceLoader.php on line 201

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/json/FormatJson.php on line 12

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
TIM (PlayStation graphics) - Just Solve the File Format Problem

TIM (PlayStation graphics)

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
(Created page with "{{FormatInfo |formattype=electronic |subcat=Graphics |extensions={{ext|tim}} }} == Overview == '''TIM''', or '''PSX TIM''', is an uncompressed raster image file format associa...")
 
m (Change telparia.com samples link to template)
 
(11 intermediate revisions by 5 users not shown)
Line 3: Line 3:
 
|subcat=Graphics
 
|subcat=Graphics
 
|extensions={{ext|tim}}
 
|extensions={{ext|tim}}
 +
|kaitai struct=psx_tim
 
}}
 
}}
== Overview ==
 
 
'''TIM''', or '''PSX TIM''', is an uncompressed raster image file format associated with the Sony PlayStation family of video game consoles.
 
'''TIM''', or '''PSX TIM''', is an uncompressed raster image file format associated with the Sony PlayStation family of video game consoles.
  
 
It supports 4- and 8-bit paletted images, and 15- and 24-bit full color images.
 
It supports 4- and 8-bit paletted images, and 15- and 24-bit full color images.
 +
 +
See also [[TIM2]].
  
 
== Identification ==
 
== Identification ==
Files begin with (hex) bytes <code>10 00 00 00</code>.
+
Files begin with (hex) bytes {{magic|10 00 00 00}}.
 +
 
 +
== Structure ==
 +
 
 +
{{Restored|2017-11-03|https://web.archive.org/web/20171103172802/http://rewiki.regengedanken.de/wiki/.TIM}}
 +
 
 +
A TIM file contains one uncompressed bitmap. It starts with this header:
 +
 
 +
<pre>
 +
typedef struct {
 +
unsigned long magic; /* Constant = 0x10 */
 +
unsigned long type;
 +
unsigned long offset; /* allways Size of Clut data  12 */
 +
unsigned short Palette Org X;
 +
unsigned short Palette Org Y;
 +
unsigned short palette_colors;
 +
unsigned short nb_palettes;
 +
} tim_header_t;
 +
</pre>
 +
 
 +
* <code>type</code> can be:
 +
** <code>0x08</code> for 4 bits paletted images
 +
** <code>0x09</code> for 8 bits paletted images
 +
** <code>0x02</code> for 16 bits true-colour images.
 +
* <code>offset</code> is an offset to start of image data.
 +
* <code>nb_palettes</code> is the number of palettes stored in the file, each palette having <code>palette_colors</code> colors.
 +
 
 +
=== Palettes ===
 +
 
 +
In the case of paletted images, palettes are following the header in the file. Each color is coded in a 16-bits RGB value, which format is A1B5G5R5. There are 'palette_colors'*'nb_palettes' values stored.
 +
 
 +
=== Image header ===
 +
 
 +
After the optionnal palettes, come the image header. The width is in 16bit words, it means the real width in pixel is <code>width*4</code> for 4-bits paletted images, <code>width*2</code>  for 8-bits paletted images and <code>width</code> for 16-bits paletted images.
 +
 
 +
<pre>
 +
typedef struct {
 +
unsigned short width; /* Width of image in 16-bits words */
 +
unsigned short height; /* Height of image in pixels */
 +
} tim_size_t;
 +
</pre>
 +
 
 +
=== Image data ===
 +
 
 +
* '''4 bits images:''' Each pixel is stored in 4 bits (so 2 pixels per byte), bits 7-4 for first pixel, and bits 3-0 for second pixel. The value is an index in a palette stored in the beginning of the file.
 +
* '''8 bits images:''' Each pixel is stored in a byte, which is an index in a palette stored in the beginning of the file.
 +
* '''16 bits images:''' Each pixel is in [[A1B5G5R5]] format.
  
 
== Software ==
 
== Software ==
* [http://www.imagemagick.org/ ImageMagick] (read-only)
+
* [[ImageMagick]]
 +
* [[Konvertor]]
 +
* [[XnView]]
 +
* [[RECOIL]]
 +
* [ftp://ibiblio.org/pub/linux/apps/graphics/convert/tim2bmp-1.0.tar.gz tim2bmp]
 +
 
 +
== Sample files ==
 +
* {{CdTextfilesURL|cdaction/cdaction20a/HORR/USA/}} {DATA,EFFSPR,ITEM_M2}/*.TIM
 +
* {{CdTextfilesURL|pcgamesexe/pcge199902/RE2/COMMON/DATU/}}
 +
* {{CdTextfilesURL|pcgamesexe/pcge199902/RE2/PL0/EMD0/}}
 +
* {{DexvertSamples|image/tim}}
  
 
== Resources ==
 
== Resources ==
* [http://www.romhack.de/dokumente/files/psx/grafik/tim_graphic_format.txt TIM Graphic Formats, By Klarth, Version 1.0]
+
* [http://www.romhacking.net/documents/31/ TIM Graphic Formats, By Klarth, Version 1.0]
 +
* [http://mrclick.zophar.net/TilEd/download/timgfx.txt TIM Graphic Formats, By Klarth, Version 0.7]
 +
 
 +
[[Category:Sony]]

Latest revision as of 02:56, 28 December 2023

File Format
Name TIM (PlayStation graphics)
Ontology
Extension(s) .tim
Kaitai Struct Spec psx_tim.ksy

TIM, or PSX TIM, is an uncompressed raster image file format associated with the Sony PlayStation family of video game consoles.

It supports 4- and 8-bit paletted images, and 15- and 24-bit full color images.

See also TIM2.

Contents

[edit] Identification

Files begin with (hex) bytes 10 00 00 00.

[edit] Structure

This content was first retrieved from the Internet Archive's Wayback Machine for the date 2017-11-03 from the following URL: https://web.archive.org/web/20171103172802/http://rewiki.regengedanken.de/wiki/.TIM

A TIM file contains one uncompressed bitmap. It starts with this header:

typedef struct {
	unsigned long	magic;	/* Constant = 0x10 */
	unsigned long	type;
	unsigned long	offset; /* allways Size of Clut data   12 */
	unsigned short	Palette Org X;
	unsigned short	Palette Org Y;
	unsigned short	palette_colors;
	unsigned short	nb_palettes;
} tim_header_t;
  • type can be:
    • 0x08 for 4 bits paletted images
    • 0x09 for 8 bits paletted images
    • 0x02 for 16 bits true-colour images.
  • offset is an offset to start of image data.
  • nb_palettes is the number of palettes stored in the file, each palette having palette_colors colors.

[edit] Palettes

In the case of paletted images, palettes are following the header in the file. Each color is coded in a 16-bits RGB value, which format is A1B5G5R5. There are 'palette_colors'*'nb_palettes' values stored.

[edit] Image header

After the optionnal palettes, come the image header. The width is in 16bit words, it means the real width in pixel is width*4 for 4-bits paletted images, width*2 for 8-bits paletted images and width for 16-bits paletted images.

typedef struct {
	unsigned short	width;	/* Width of image in 16-bits words */
	unsigned short	height; /* Height of image in pixels */
} tim_size_t;

[edit] Image data

  • 4 bits images: Each pixel is stored in 4 bits (so 2 pixels per byte), bits 7-4 for first pixel, and bits 3-0 for second pixel. The value is an index in a palette stored in the beginning of the file.
  • 8 bits images: Each pixel is stored in a byte, which is an index in a palette stored in the beginning of the file.
  • 16 bits images: Each pixel is in A1B5G5R5 format.

[edit] Software

[edit] Sample files

[edit] Resources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38