Texture file types

Keywords:
BMP, DDS, DXT1a, DXT1c, DXT3, DXT5, EXR, GIF, HRD, JP2, JPG, MTD, NRRD, PNG, PNM, PSD, SGI, TGA, TIF, Advantages, Compression algorithm, Disadvantages, File extension, Magic-Word, MIME-Type
Author(s): Jürgen Müller
Date: 2007-08-14

Summary: This tutorial show you the advantages and disadvantages from the different texture file types, which are supportet by instantPlayer.

General

It is important to use not only one texture format, because they are not all perfect for every situation. In some cases, it is more important to have a higher performance, in some other it has to be nearly realistic. But if you use large BMP-Files for example to make your scene look good, you maybe become great problems because the performens goes down. Nor is it reasonable to have a high detailed texture at a great distance from the viewer. In this case you get better, if you use a format that supports MipMaps. But in detail, I show you all things of interest in this tutorial. As next, I told you, why I'd choosed the following topics, to present you the formats.

File Extensions

I will show you all extensions of each format. So, you will be able to know the file format of the file you currently have, only by looking at the extension.

Magic-Word

But, if the file maybe does not have an extension, you are able to detect the format, by looking inside of it. Mostly the first four bytes are containing the so called "Magic-Word", which names the image format of the current file. To read it, you have to convert these four bytes into ASCII, for example using an hex editor.

MIME-Types

The "Multipurpose Internet Mail Extensions" is a standard that extends the support from e-mails. If a texture format has such one, you can identify it, only by looking on that extension.

Color Modes

One possibility to reduce the size of an image is to reduce the color depth. In some cases you don't recognize the difference but save a lot of memory space. But not all formats support any color depth, so I list you the supported depths at each format.

Compression Algorithm

The most important way to reduce the size is to compress the file with an compression algorithm. But there are a lot of different algorithms and with different advantages and disadvantages. For example there are lossy and lossless compression algorithms. If it is unacceptable to reduce the quality you have to take a lossless algorithm because the quality is still the same, but the size can be reduced up to 30%. But if performance is the important point, you drive much better, using lossy compressions, because they can produce much smaller files.

Supporting Tools

Under this caption I give you a list, of some well known (if there any) tool, that can handle the actual file format.

Advantages / Disadvantages

And last but not least, I list some advantages and disadvantages of the formats for an quick overview of the format.

BMP

General Informations

The "Windows Bitmap" format was introduced by the "Microsoft Corporation".

File extensions

Magic-Word

MIME-Types

Color modes

Compression algorithm

Supporting Tools

Advantages

Disadvantages

Image: An example of an BMP image.
Files:

DDS

General Informations

The "DirectDraw Surface" format was introduced by the "Microsoft Corporation".

File extensions

Magic-Word

MIME-Types

Color modes

Compression algorithm

Supporting Tools

Advantages

Disadvantages

Files:

EXR

The "OpenEXR" format was introduced by "Industrial Light & Magic".

File extensions

Magic-Word

MIME-Types

Color modes

Compression algorithm

Supporting Tools

Advantages

Disadvantages

Files:

GIF

The "Graphics Interchange Format" was introduced by "CompuServe".

File extensions

Magic-Word

The number specifies the version of gif.

MIME-Types

Color modes

Compression algorithm

Supporting Tools

Advantages

Disadvantages

Image: An example of an GIF image.
Files:

HDR

The "High Dynamic Range" format was introduced by "???".

File extensions

Magic-Word

MIME-Types

Color modes

Compression algorithm

Supporting Tools

Advantages

Disadvantages

Files:

JPEG

The "Joint Photographic Experts Group" format was introduced by the "Joint Photographic Experts Group".

File extensions

Magic-Word

MIME-Types

Color modes

Compression algorithm

The compression runs in multiple pathes:

Supporting Tools

Advantages

Disadvantages

Image: An example of an JPEG image.
Files:

JPEG2000

The "Joint Photographic Experts Group 2000" format was introduced by the "Joint Photographic Experts Group".

File extensions

Magic-Word

MIME-Types

Color modes

Compression algorithm

The compression runs in multiple steps.

Supporting Tools

Advantages

Disadvantages

Not yet widely adopted