Nicole Crémel IT/User Support
A format, for a graphics file, corresponds to the method used by a graphical application (producing images) to write data on disks. Some formats are adequate for some specific tasks for which other formats would be totally inadequate. Depending on what you want to do some formats are better than others.
Three types of basic formats are used to classify the type of data a graphics file contains:
Note that the purpose of all these formats is to give the possibility to exchange graphical data across different applications or to transmit graphical data to a printer. All software have their own "native" format, but a large number of software product can read and/or write other formats (which can be the "native" format of other software). For instance, PageMaker 6.5 can access native Illustrator files. This means in practice that some "trans-coding" process has to be run, either when you import graphical data from another software, or when you write your graphical data in a format different from the native one. You can understand that the resulting file (after "trans-coding") will be different from the original: a good "trans-coding" will just make it as close as possible. Sometimes differences are very small, sometimes they are more important. The quality of the translation is directly linked to the differences between the storing method of the import and output formats. One important factor is, for instance, the precision for the position of the objects. An example can be given with Illustrator, whose native format has a very good precision for this, whereas you will lose that precision when importing a PICT file format, where the position coordinates of objects are often rounded to integer values; consequently the position of objects can be slightly different when you will export this file.
Why all these formats which are not equivalent and sometimes specialized? And why do you sometimes run into problems when exchanging graphical data across different applications? These questions are quite complex. However it is sure that depending on the tasks to be performed and the device you use, some formats are more appropriate than the others.
Some formats are strictly linked to a system.
To be powerful many graphical formats depend on the characteristics of the system where they are displayed or printed. These formats are system-dependent. For instance, many bitmap formats (like PICT files, or TIFF files with indexed colours) do not certify the validity of their palette of colours when they are exchanged across systems/applications; consequently the image colour can be modified. Some vector formats in metafiles require the list of fonts to remain unchanged on the system because fonts are not referred by their name but just by a number; this is particularly bad when you want to add a new font on your system, or use another system. E.g. WMF - Microsoft Windows Metafile - which uses GDI (Windows Graphic Device Interface) is strictly linked to Windows and PICT based on QuickDraw is linked to the Macintosh. On the contrary, PostScript files (EPS) are a perfect example of system-independent graphical files.
Those system-dependent formats must strictly be used in the context for which they have been defined: the purpose of BMP is to display files on Windows and the printing is very bad; DXF and CGM have been designed for pen-plotters. EPS, TIFF, JPEG and GIF are not system-dependent and can be used across platforms and environments. However EPS and TIFF are specially designed for high resolution PostScript devices (printers). GIF and JPEG are good to transfer very large images in a very compact way: they are well suited for image editing and are, for the time being, the favourite format for pictures on the Web.
Some software does not read/write correctly some of the formats.
In many cases problems are not linked to the format itself, but to the behaviour of the import or export filter used by the application (to import or export files in a format different from the "native" format for this application).
Some formats are less powerful than others.
For example, the graphical model used by PICT, CGM and WMF, are not as powerful as the Illustrator PostScript drawing software, and cannot take into account all sophisticated features of such software.
This mainly depends on what you want to do afterwards. We can only give some hints depending on what you want to do:
Specialized software products exist to convert one format to another (e.g. DeBabelizer, from Equilibrium Tech. for Mac and Windows), but most software (e.g. from Adobe) can do it: e.g. Photoshop can read and write many bitmap formats (TIFF, GIF, JPEG + EPS). When reading a PICT file from a Macintosh into Illustrator all vector elements are converted into Illustrator drawing, and bitmap elements into TIFF. Then you just have to store the file into EPS. Even Pagemaker 6.5 can do such a conversion. Vector files are more difficult to convert and it might be more difficult to access a DXF, CGM or WMF file from a different application (although Adobe PDF can be used as an intermediate step).
Some useful "tricks":
Many "public domain" utilities exist for manipulating graphical
data and converting them from one format to another. At CERN (on Unix)
such tools/command are accessible from the ASIS
software repository (
/usr/local/bin/X11). Following is a non-exhaustive list
of graphical utilities available on all CERN central platforms:
gv: PostScript and PDF previewer:
gsis the Aladdin Ghostscript interpreter/previewer. Ghostscript is an implementation of Adobe Systems' PostScript (tm) and "Portable Document Format" (PDF) languages.
gv- derived from Tim Theisen's Ghostview 1.5 - allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the Ghostscript interpreter.
xfig: editing and drawing tools
xwpickis very useful tool written at CERN by Evgeni Chernyaev, which lets you pick an image from an arbitrary window or rectangular area of an X11-server and write it to a file in a variety of formats (PostScript, or Encapsulated PostScript with a compressed image, GIF, PCX, PICT, PPM). It uses the Lempel-Ziv Welch (LZW) compression scheme for image encoding in Postscript, thus producing very compact files.
For all the commands described above you can get more information
through the "man pages", by typing
GIF and JPEG are the two graphical file formats most commonly used on the Web. As we already said those formats are very good to transfer very large images in a very compact way. The particularity of GIF is to exploit a compression mode without any data loss after decompression (using the LZW - Lempel-Ziv-Welch - a compression method patented by Unisys and IBM, sometimes also used by TIFF). The advantage of JPEG is to register RGB pictures with 24 bits depth (8 bits for each Red/Green/Blue colour): the RGB palette has more than 16 million values which provide many possible nuances. For compactness issues, GIF only uses a reduced palette with indexed colours, still allowing a quite good representation of all colours. A GIF picture can have maximum 256 different colours at a time, referred to by a number in a colour table (i.e. table of indices corresponding to RGB value).
A new graphics format, PNG (Portable Network Graphics, pronounced pingue), has been designed in 1997 by an Internet development group. This format is specially adapted to the needs of the Web: as does GIF, it exploits a compression method without any data loss after decompression, but, contrary to LZW, no license is required for it. With PNG it is possible to store the graphics data either with 24 bits colour, like in JPEG, or using indexed colours, like in GIF: this depends whether you wish to emphasize colour quality or smaller file size. PNG also offers new and more sophisticated features.
Some Web browsers - e.g. Netscape 4.04 onwards on Windows and Macintosh, Microsoft Explorer 4.0 - and software products - e.g Adobe Photoshop, Illustrator and PageMaker - are already able to vizualise this format, without necessarily exploiting all its possibilities Only 20% of the browsers are able to display PNG files for the time being, but this number should increase very quickly.
To complete this tutorial we give you a table with a short description of most of the graphics formats which are available today.
|AI||Adobe Illustrator file format|
|AVS||Application Visualization System X image file|
|BMP||Microsoft Windows Bitmap image file|
|BMP24||Microsoft Windows 24-bit Bitmap image file|
|CGM||Computer Graphics Metafile|
|CMYK||Raw Cyan, Magenta, Yellow, and blacK bytes|
|DCX||ZSoft IBM PC multi-page Paintbrush file|
|DIB||Microsoft Windows Bitmap image file|
|DXF||AutoCAD Data eXchange Format|
|EPS||Adobe Encapsulated PostScript file|
|EPS2||Adobe Level II Encapsulated PostScript file|
|EPSF||Adobe Encapsulated PostScript file|
|EPSI||Adobe Encapsulated PostScript Interchange format|
|FIG||TransFig image format|
|FITS||Flexible Image Transport System|
|FPX||Kodak FlashPix Format|
|GIF||CompuServe Graphics Interchange Format|
|GIF87||CompuServe Graphics Interchange Format|
|GKS||Graphics Kernel System metafile|
|GRADATION||Gradual passing from one shade to another|
|GRAY||Raw Gray bytes|
|HDF||Hierarchical Data Format|
|HISTOGRAM||Histogram of the image|
|HTML||Hypertext Markup Language with a client-side image map|
|IGES||International Graphics Exchange System|
|IV||SGI Open InVentor format|
|JBIG||Joint Bi-level Image experts Group file interchange format|
|JPEG||Joint Photographic Experts Group JFIF format|
|MAP||Colormap intensities and indices|
|MATTE||Raw matte bytes|
|MIFF||Magick Image File Format|
|MPEG||Motion Picture Experts Group file interchange format|
|MTV||MTV Raytracing image format|
|NETSCAPE||Netscape 216 color cube.|
|PBM||Portable Bitmap utility format (black and white)|
|PCL||Page Control Language|
|PCX||ZSoft IBM PC Paintbrush file|
|Portable Document Format|
|PGM||Portable Graymap utility format (gray scale)|
|PICT||Apple Macintosh QuickDraw/PICT file|
|PLASMA||Plasma fractal image|
|PNG||Portable Network Graphics|
|PNM||Portable anymap utility|
|PPM||Portable Pixmap utility format (color)|
|PS||Adobe PostScript file|
|PS2||Adobe Level II PostScript file|
|RAD||Radiance image file|
|RGB||Raw Red, Green, and Blue bytes|
|RGBA||Raw Red, Green, Blue, and mAtte bytes|
|RLA||Alias/Wavefront image file|
|RLE||Utah Run Length Encoded image file|
|SGI||Irix RGB image file|
|SHTML||Hypertext Markup Language with a client-side image map|
|TEXT||Raw text file|
|TGA||Truevision Targa image file|
|TIFF||Tagged Image File Format|
|TIFF24||24-bit Tagged Image File Format|
|TILE||Tile image with a texture|
|UYVY||16bit/pixel interleaved YUV|
|VICAR||Video Image Communication And Retrieval rasterfile format|
|UIL||X-Motif UIL table|
|VID||Visual Image Directory|
|VIFF||Khoros Visualization image file|
|VRML||Virtual Reality Modeling Language|
|WMF||Microsoft Windows Metafile|
|X||select image from X server screen|
|XC||constant image of X server color|
|XBM||X Windows system bitmap, Black and white only|
|XPM||X Windows system Pixmap file (color)|
|XWD||X Windows system window Dump file (color)|
|YUV||CCIR 601 4:1:1 file|
You can find more information regarding "graphics file formats"
The Reference book on this subject is the "Encyclopedia of Graphics File Formats" (~900 pages!) by James D. Murray & William VanRyper, which is sold at the User Support Bookshop.