A Manual to

Graphic File Formats

A Special PCS Service !

Written, edited, compiled, and transformed to HTML by UDI Latarre © 1995-98

Click here to download a free copy.

FILE FORMAT -

The specific format in which an image file is saved. The format is identified by the three letter extension at the end of the file name. Every format has its own characteristics, advantages and disadvantages. By defining the file format it may be possible to determine the number of bits per pixel and additional information.

 

General Information:

Images that may be used by PC computers are saved in various formats. Different image file formats are capable of holding different quantities of colors. Each file format will have a reference to the number of "bits per pixel" that the format is capable of supporting.

·                     1 bit per pixel refers to an image with 2 colors.

·                     4 bits per pixel refers to an image with up to 16 colors.

·                     8 bits per pixel refers to an image with up to 256 colors.

·                     16 bits per pixel refers to an image with up to 32,768 colors.

·                     24 bits per pixel refers to an image with up to 16,777,216 colors.

 

BMP / DIB / RLE File Formats

The BMP, DIB, and RLE files are known as "Device Independent Bitmap" files, or "DIB's".
These files exist in two different formats:

1.                  OS/2 Format
The OS/2 formats were the first of the two different formats designed. Images saved using this format may be used with the OS/2 Presentation Manager.

2.                  Windows Format
An enhanced "DIB" file format was released with Microsoft Windows.

These files commonly use different extensions for their file names:
BMP, DIB, and RLE, according to where they are used. Although their file name extensions are different, the files themselves are the same (within either OS/2 or Windows).

 

BMP

(Bit-Map)

BMP is the standard MS-Windows raster format.
(BMP files can be created with Windows' Paintbrush and used as "wallpaper" for the background when running Windows. See your Windows manual about using BMP files as wallpaper.)
Windows uses a fixed color palette for BMP files which cannot be changed, as doing so would make the screen and border colors change too. This means that transferring an image to the BMP format may result in some color shifts when BMP files are imported into Windows applications.

Characteristics:

BMP-OS/2-RGB format supports 1, 4, 8, 24 bits per pixel - not compressed.

BMP-Windows-RGB format supports 1, 4, 8, 24 bits per pixel - not compressed.

BMP-Windows-RLE format supports 4, 8 bits per pixel - RLE compression.

 

DIB

(Device Independent Bitmap)

DIB files are applied mainly in computer multimedia systems.
They can also be can be used as image files in the Windows environment.

Characteristics:

DIB-OS/2-RGB format supports 1, 4, 8, 24 bits per pixel - not compressed.

DIB-Windows-RGB format supports 1, 4, 8, 24 bits per pixel - not compressed.

DIB-Windows-RLE format supports 4, 8 bits per pixel - RLE compression.

 

RLE

(Run Length Encoding)

RLE files are actually "DIB" files that use one of the RLE compression routines. A DIB image that has been saved by means of using one of the RLE compression methods would produce an identical file as when saving the same image directly in an RLE format.
(The only difference would be the file name extension !)

TIP:

An RLE image file may be used as a replacement opening screen for Windows.
(It must be a 4 bit per pixel RLE file.)

Characteristics:

RLE format supports only 4 or 8 bits per pixel.

 

Formats Originating From Specific Applications.

GIF

(Graphics Interchange Format)

The CompuServe GIF is commonly used to upload documents to the CompuServe Information Service and to pass documents between other types of computers. The idea behind designing GIF files was to create the smallest possible image file for uploading and downloading from electronic Bulletin Board Systems (BBS), thus producing a highly compressed format that minimizes file transfer time over phone lines. The compression is accomplished by using the LZW method for indexed color tables.
There are two GIF file versions: 87a and 89a.
Both versions may use an encoding method referred to as interlacing. When an image is saved by using four passes instead of just one, it is called interlacing. On each pass, certain lines of the image are saved to the file. If the program decoding a GIF file displays the image as it is decoded, the user will be able to see the four passes of the decoding cycle. This will allow the user to get a good idea of what the image will look like before even half of the image is decoded. Most communication programs (for BBSs and the InterNet) allow the user to download GIF files and view them as they are downloaded. If the image is interlaced, the user will be able to decide if the image is one they like before half of the download is complete. If the user does not like the image, the download can be aborted. This results in the saving of time and money for the person downloading the image.
GIF files may contain multiple images.

Characteristics:

GIF Files can range from monochrome to 256-color.

GIF - version 87a Non-Interlaced supports 1, 4, 8 bits per pixel.

GIF - version 87a Interlaced supports 1, 4, 8 bits per pixel.

GIF - version 89a Non-Interlaced supports 1, 4, 8 bits per pixel.

GIF - version 89a Interlaced supports 1, 4, 8 bits per pixel.

 

IMG

IMG files were originally designed to work with the GEM Paint Program.
IMG files handle monochrome and gray level images.
The VENTURA Publisher application, working in the same GEM environment, also supported the IMG file format.
In order to maintain compatibility, various other desktop publishing applications have added support for importing and exporting this format (although usually not processing it).

Characteristics:

IMG - Old Style format supports 1, 4, 8 bits per pixel.

IMG - New Style format supports 1, 4, 8

IMG - Ventura 4.0 format supports up to 256 levels of gray, and up to 24 bits per pixel.

Some applications read only 1 bit per pixel in both the new and old IMG styles.

MAC

(Macintosh Paint)

MAC files are used in the Macintosh MacPaint application.
The MAC format file has 2 basic options:
* The common option is a ported MacPaint files,that includes a "MacBinary" header.
* The rare option is the one used with PFS First Publisher,this file has no header.
In order to migrate a MAC file from a Macintosh to a PC, a "MacBinary" header has to be added to the file format. MAC images can be transferred "back" from a PC to a Macintosh. Unless you have a specific PC application that requires no header, the MAC files should be saved with a header.
The MAC format requires always an image width of 576 pixels and a height of 720 lines. For that reason files converted to the MacPaint format from other formats will be cropped or padded out as necessary to fit in the 576X720 pixels size.
MAC file format supports only 1 bit per pixel, meaning that Only monochrome files can be converted to MacPaint files.

Characteristics:

MAC - without a header format supports 1 bit per pixel.

MAC- with a header format supports 1 bit per pixel.

 

MSP

(MicroSoft Paint)

MSP files originated in the prehistoric Microsoft Paint
(A paint program that was in the MS Windows version 2.0 !).
MSP files can be converted into BMP files. The opposite is not possible.
MSP and PCX formats are not compatible.
MSP files are monochromatic only.

Characteristics:

MSP - Old version format supports 1 bit per pixel.

MSP - New version format supports 1 bit per pixel.

 

PCX

PCX format, established by Zsoft for its PC Paintbrush software, is commonly used by IBM compatible computers.
With no standard to the industry, this format became the standard by default. This format is supported by more applications than any other format.
Version 3 does not contain palette information. Some applications will override this by using the default VGA colors used by Windows as the palette. This may result in a different looking images when using different viewers.
Most PC software support version 5 of the PCX format.
TIP:

In order to allow older applications the ability to read PCX files use the lowest version possible.
On the other hand, some applications do not have add support for versions 0, 2, and 3. If you are using such an application - save your images as a version 5.

Characteristics:

PCX - version 0 format supports 1 bit per pixel.

PCX - version 2 format supports 1, 4 bits per pixel.

PCX - version 3 format supports 1, 4 bits per pixel.

PCX - version 5 format supports 1, 4, 8, 24 bits per pixel.

 

PIC

(Pictor)

PIC format files are generated and used by PICTOR, PC-Paint and GRASP.
This PIC file format is not compatible with the Lotus 1-2-3 PIC drawing files !
16 color PIC files have a non-common structure in their color manifestations. For this reason, graphic applications (rather then the 3 mentioned above) will produce a temporary scratch file while packing or unpacking a 16 color PIC file.

Characteristics:

PIC - Pictor format supports 1, 8 bits per pixel.

PIC - PC Paint format supports 4 bits per pixel.

 

TGA

(Targa)

The Targa TGA format was developed by Truevision for their Targa and Vista products.
The TGA format file is widely used by high-end paint programs and ray tracing packages. It can handle images with up to sixteen million unique colors. It is an industry standard but is not as widely supported as
PCX or TIFF formats. The TGA format was designed for use on systems that use MS-DOS color applications.
TGA files may be saved compressed (run length encoded) or not compressed. Since Windows does not recognize 16 & 32 bits per pixel, some applications will treat them as 24 bits per pixel. A 16 bits per pixel image will be up-graded to 24 bits per pixel, and a 32 bits per pixel image will be down-graded to a 24 bits per pixel image. This procedure will not affect the image since the 8 extra bits of a TGA 32 bits per pixel file are used to store Alpha or transparency information.

Characteristics:

TGA format supports 8, 16, 24, 32 bits per pixel - not compressed.

TGA format supports 8, 16, 24, 32 bits per pixel - RLE compression.

 

RAS

(RASTER)

RAS files are generated in a raster format by Sun Microsystems computers.
There are three types of RAS files:
* Type 0 - Old Style.
* Type 1 - Modern Style.
* Type 2 - Experimental.

Characteristics:

RAS - type 1 - Modern Style format supports 1, 8, 24, 32 bits per pixel.

 

WPG

(WordPerfect Graphic File)

WPG file format is used by WordPerfect.
It first appeared with the release of WordPerfect 5.0, and with the release of version 5.1, the format was changed accordingly. It is advised to use the same format version as the version of WordPerfect in which the image will be used. These files can contain bitmaps, line art, and vector graphics. When using an application rather then WordPerfect for viewing a WPG file containing both bitmapped and vector elements, the vector elements will be discarded.
Note that the WPG specification allows files of up to 256 colors, but WordPerfect itself would not read files of more than 16 colors !

Characteristics:

WPG - version 5.0 format supports 1, 4, 8 bits per pixel.

WPG - version 5.1 format supports 1, 4, 8 bits per pixel.

 

IFF

(Amiga Interchange File Format)

The Amiga Interchange File Format (IFF) is used to transfer documents to and from Commodore Amiga computers.
The IFF file standard is extremely flexible, and allows all a few formats, not only images, including text to be stored inside an IFF file. IFF files can be exported from an Amiga to a PC.
The format can also be created on a PC, but the extension of the file name will then change to
LBM or to CE (Depending on the application). However, the basic file structure remains the same. The standard form for IFF image files created on a PC is called ILBM. ILBM is formed by means of compressing all images as planes. This is much slower, but it means that these compressed files will be accessible by any application able to read an IFF file, even if they are exported back to an Amiga.

 

LBM

LBM file format is used in Electronic Arts' Deluxe Paint package.
LBM files are saved using an IFF Bitmap header and IFF color map. Its native format is a subclass of IFF called PBM, and compresses its images as bytes using the PackBits compression type, giving a ratio of up to 1:10.
(This technique is somewhat unique to Deluxe Paint, and Electronic Arts have been keeping it a total "secret").

The known types are:

Black and white

16 colors

256 colors

 

CE

CE file format is the name used for IFF files that were created on an MS-DOS platform using the Digital Vision's Computer Eyes video scanner board.

 

PIXAR

The PIXAR format is designed specifically for exchanging files with PIXAR image computers.
PIXAR workstations are designed for high-end graphics applications, such as work involving three-dimensional images and animation.
There are no format options associated with the PIXAR file format.


PixelPaint

The PixelPaint file format allows a document to be opened in the PixelPaint and PixelPaint Professional graphics applications.
You should only use this format for writing files for PixelPaint versions 1.0 and 2.0, as PixelPaint Professional no longer allows a document to be saved in this format.
This format allows you to specify the image size (canvas). It also enables you to decide whether you want the image to appear in the center or in the upper left corner of the canvas when the document is opened.

 

Formats Designed For High Compression.

 

JPEG

(Joint Photographic Experts Group)

JPEG compression economizes on the way data is stored and also identifies and discards extra data, that is, information beyond what the human eye can see.
Because it discards data, the JPEG algorithm is referred to as "lossy". This means that once an image has been compressed and then decompressed, it will not be identical to the original image. In most cases, the difference between the original and compressed version of the image is indistinguishable.
In general, compressed JPEG images have compression ratios of between 5:1 and 15:1. A trade-off does exist between the image quality and the amount of compression. You do not need to decompress images saved in the JPEG format. They are automatically decompressed when they are opened.

 

JAS

The JAS format files were designed to create the smallest possible image files for 24 bits per pixel color images and 8 bits per pixel gray scaled images. JAS uses a discrete cosine transformation to alter the image data and then compress that data. This process results in a substantial reduction of the file size when the image is saved to the disk. This method is referred to as "lossy": saving and retrieving an image using the JAS file format will result in some loss of image data. The amount of loss is dependent on the compression level that you have selected in your application. By using the lowest possible value for the file compression you will have the least amount of loss.
TIP:

Whenever you save an image as a JAS file, you should immediately load the image that was just saved. Check to make sure the amount of data loss is acceptable before deleting your original image.

Characteristics:

JAS (without color palette) format supports 24 bits per pixel.

JAS (gray scale) format supports 8 bits per pixel.

 

TIFF

(Tagged-Image file Format)

Tagged-Image File Format (TIFF) is used mainly for exchanging documents between different applications and different computer platforms.
The Tagged Image File Format was primarily designed to become the standard format. In order to become the standard, the format was designed to handle just about any possibility. The result of this design provided the flexibility of an infinite number of possibilities of how a TIFF image can be saved.
As a result, no application at all can claim to support all TIFF variations. Some professional applications support many TIFF variations, but there will always be an obscure variation that will cause a problem for some application.
The TIFF format uses 6 different encoding routines:
- No-compression
- Huffman
- Pack Bits
- LZW
- Fax Group 3
- Fax Group 4
In addition it differentiates between types of images in 3 different categories:
- Black and white
- Gray scaled
- Colored
The TIFF format supports LZW method compression for image types.
(This is the same compression used by the
GIF format for indexed color.)
TIP:

If an application is having a problem reading compressed TIFF files, try re-saving the file without compression.

Characteristics:

TIFF - with no compression format supports 1, 4, 8, 24 bits per pixel.

TIFF - Huffman format supports 1 bit per pixel.

TIFF - Pack Bits format supports 1 bit per pixel.

TIFF - LZW format supports 4, 8, 24 bits per pixel.

TIFF - Fax Group 3 format supports 1 bit per pixel.

TIFF - Fax Group 4 format supports 1 bit per pixel.

 

Miscellaneous.

EPS

(Encapsulated PostScript)

The Encapsulated PostScript file (EPS) format is supported by most illustration and page layout programs, and in most cases is the preferred format for these applications.
Note that this is also the only file format that supports transparent whites in Bitmap mode.

 

Raw

The Raw format is a flexible file format for transferring documents between different applications and computer platforms.
Raw format consists of a stream of bytes describing the color information in the file. Each pixel is described in binary format, where 0 equals black and 255 equals white.

 

Scitex CT

(Scitex Continuous Tone)

The Scitex CT format is available for CMYK color images and grayscale images.
Scitex computers are used for high-end image processing.

 

CUT

CUT file format is definitely the most awkward format.
CUT files do not "know" how many colors they have in them !
They rely on a second accompanying file, called a PAL file, to define their colors. Most applications will search for the PAL file in order to determine whether the CUT file has two or eight bits of color. If there is no PAL file with the same name as the CUT file, the CUT file is treated as 2 colors. Files saved to the CUT format from various applications will appear as two color files if they were recognized that way or as 256-color files if they had more than two colors initially. Note that a 256 color file, with a missing PAL file will eventually end up as a 2 color file !

Characteristics:

CUT - without a PAL file supports 1 bit per pixel.

CUT - with a PAL file supports 1, 8 bits per pixel.

 

This information is brought to you as a free service by:

PCS

Personal Computer Services

Phone: 972-3-5246451

Email: PCS@why-not.com

This manual was prepared and edited by Udi Latarre for PCS - Personal computer services.
Copyright © 1995-98 by PCS - Personal computer services. All rights reserved.

Use of this manual is free of charge with the following limitations:
This manual may NOT be changed, modified or excerpted except if expressly permitted in writing by Udi Latarre and/or PCS - Personal computer services.
This manual can be freely copied/distributed as long as this copyright notice is maintained within the document.

 

 

Electronic Publishing Home Page

Department of Communication, Seton Hall University