List of file formats

From FlightGear wiki
Revision as of 16:20, 3 August 2006 by Melchior FRANZ (talk | contribs) (mention that RLE is lossless)
Jump to navigation Jump to search

*.rgb

These files are texture files in SGI Image Format. This format supports multiple layers, transparency, compression, indexed colors, 8 bits and 16 bits per plane. Files of this format use different extensions, often to indicate the image properties, but in fact it's always the same format. The "official" extensions is *.sgi. Images with one layer are usually black/white (*.bw) or a mere alpha layer (*.a), with two layers black/white with alpha, with three layers red/green/blue (*.rgb), and with four layers red/green/blue/alpha (*.rgba). This, however, is a convention and not mandated by the image specification. SGI images can be uncompressed or RLE-compressed, which is a lossless compression method.

FlightGear uses plib to read SGI images. They must not use 16 bits per plane and have to have side lengths of 2nx2m. For example: 64x64, 256x256 or 128x2048. Note that other sizes will not work, and let FlightGear use a red/white chequer texture instead! FlightGear textures shall be RLE-compressed, and as 'aggressively' as possible.

All better graphics applications should be able to read and write the format, but often they load SGI images without problems, but only write them properly when the *.sgi extension is used. Here are some free applications that create SGI images, along with some usage notes:

GIMP

Either save the image with extension *.sgi and rename it afterwards, or choose in the file dialog "Select Filetype" -> "Silicon Graphics IRIS image". Save with "Aggressive RLE". (The remark about SGI not supporting that is wrong. This is compliant with the file specification from SGI itself.)


krita/kolourpaint (KDE)

KDE supports reading and writing of SGI images on the base library level, so all applications that can read/write images in general can also read/write SGI images. They are automatically saved in highest possible compression (more aggressive than GIMP :-)


convert (ImageMagick/GraphicsMagick)

Like with GIMP, it's necessary to either call the target file *.sgi or to specify the file type explicitly via sgi: prefix:

$ convert foo.png foo.sgi      # RIGHT
$ convert foo.png sgi:foo.rgb  # RIGHT
$ convert foo.png foo.rgb      # WRONG! This doesn't create an SGI image!

This creates SGI images with RLE compression by default.