Raster graphics file formats table. Basic graphic file formats

It was last Friday, but it was not possible to write a Friday post under N3. The reason is banal - lack of free time due to the housing issue and a number of other problems. But this Friday there will be a photo for sure. It already exists and was ready for publication yesterday, but I still decided to spend my free evening time on renovation work in the apartment. Therefore, if you haven’t watched it, then be sure to watch it and cheer yourself up.

Let's return to the topic of the post, or rather to the question, what picture formats are there? In general the word "picture" I don't like it when applied to photography. But this is exactly how this question sounds very often, so I decided to leave everything unchanged. I'll just make one clarification. Since a photograph is a raster image, this post will only talk about raster graphics formats.

At all graphic formats— a set of rules for processing received graphic data for the purpose of their further storage or editing. As they say in the lines of V. Mayakovsky “All professions are needed, all professions are important”... The same can be said for image formats.

The developers offer a lot raster formats, intended for storing files. Among the most frequently used are the following: BMP, TIFF, GIF, JPEG, PNG, PSD, ICO.So, let's look at some of the pros and cons, as well as the scope of application of the listed raster image formats.

Raster image formats

  • BMP-(abbreviation for Bit Map image) represents standard raster format and has a universal purpose. It is supported by most graphics editors, including the fairly common one Paint. Initially, coding in it was performed in the simplest way, using . But this turned out to be wasteful, since each pixel was represented by only one byte. Consequently, only 256 colors became available, which significantly limited the ability to transmit images. Later it was improved somewhat. Bit Map image almost optimal for storing data and sharing it with other similar applications. But, at the same time, it takes up too much memory space, since it is necessary to save the encoding of all image points. File BMP Does not support animation or interlaced display.
  • TIFF(from Tagged Image File Format)– universal for publishing systems and topographic graphics. Such raster image formats provide high quality printing. They were created to support almost all programs designed to work with bitmap files, so they are compatible with all platforms. Widely used TIFF in printing and publishing. Files (scanned images, illustrations, faxes, etc.) with the extension .tif stored in this powerful format for later color printing, although monochrome printing is also available - in views CMYK And RGB. It is not used for publishing pictures on a computer network or when creating websites, because it is quite large in size. It is also unsuitable for animation.
  • GIF(according to the first letters of Graphic Interchamge Format)serves for storageraster images in graphicsand for sharing them. It is one of the “oldest” on the Internet and has been in circulation for a long time, despite the fact that it uses indexed colors (in a limited set). Files with the extension.gifwidely used in the design of Web sites. Among the main advantagesGraphic Interchamge Format It is worth mentioning that the type of image does not depend on the underlying platform or the type of browser, and compression occurs without loss of information. This format displays high-quality drawings with a small amount of uniform colors, drawings, transparent pictures and animation.GIFsmall in size, so it loads quickly, which is important when creating HTML pages. But still, the format has a significant drawback - it has a small range of colors, which limits its capabilities when storing images that have smooth transitions.
  • JPEG(abbreviation for Joint Photographic Expert Group) helps get rid of the flaws that arise when creating and saving images in GIFs. This uses a compression method for photographs or other images. These raster graphics file formats are the most common when storing multi-color pictures. Compressing images (they are stored in files marked .jpg) is performed in a smooth mode, which ensures a high degree of processing and reduces data loss. On the hard drive in JPEG It’s convenient to save a significant number of pictures, in particular large photographs with smooth transitions. This allows you to significantly save disk space. Also using JPEG It is possible to publish photos of quite acceptable quality on a computer network. But it should be taken into account that during compression some of the data is lost, and when saving the same image again, the chances of irreversible loss of information increase. In this regard, the situation is greatly improved by the improved version of the format - JPEG 2000. True, it is not supported by all browsers, which slows down its spread.
  • PNG(portable network graphics) allows you to store raster graphics in a lossless compressed form, and the files are smaller in size than GIF. In format PNG Almost any color, as well as transparency, is available. This circumstance opens up wide possibilities in web design. Now it is constantly popular because it is compatible with all platforms, supports interlaced display, has a significant color gamut, and supports animation.
  • Domestic PSD raster graphics formats (short for PhotoShop Document) are intended for program packages. They support all types of images, as well as their layers during processing. Saved in files marked with extension .psd.

There are others raster graphics formats, which were not discussed in the article, but you can write about them in the comments, without forgetting about the competition!

We all know that absolutely all files have their own specific extension. Photos - jpg, music files - mp3 and so on. The file name can be whatever the user wants, but it is not recommended to change the file extension. Sometimes changing the extension can corrupt the file. So be careful about this. Let's look at the most popular file extensions that we come across almost every day:

Archive extensions:

ZIP is a file using ZIP compression, which is supported by almost all archivers.

RAR (Roshal ARchive)– this is already a file using RAR compression. The compression ratio is much higher than ZIP compression.

Video extensions:

AVI– one of the most popular video file extensions. The compression ratio is lower than that of similar video formats. This format is played in almost all video players.

MPEG1-2(MPG)– expansion of audio and video storage with data loss.

MPEG4(MP4)– this format is very often used to transfer files on the Internet.

Graphic extensions:

GIF (Graphics Interchange Format) - format for network distribution. The files are very small in size. Supports animation.

BMP– raster format. The most common graphics format in Windows. Almost all graphics programs can create and read the BMP format. Standard graphics file format for Windows. Almost all Windows image editing programs can create and read BMP files. An image with a .BMP extension cannot be compressed.

JPEG(JPG)– very often used for raster images (drawings, photos). Excellent compression ratio allows for downsizing. But I would like to note that when compressing a file, the quality of the compressed image may be lost. The JPEG format is one of the best formats in the field of photographs and images, as it supports a large number of colors. (16.7 million colors)

PSD (Photo Shop Data)– Photoshop processing format.

TIFF(Tagged Image File Format)– very widely used by digital technology users. It is compressed without data loss, which is a big advantage over other formats. The number of colors is approximately the same as the JPEG format - 16.7 million colors.

Document formats:

DOC– I think this is the most famous format :) Belongs to the Microsoft Word program. Contains both text and graphs, pictures, tables, diagrams, etc.

PDF (Portable Document Format)– This format belongs to an equally well-known program - Adobe Acrobat. Mainly intended for electronic presentation of printed products. To display this format, the free Adobe Reader program is used.

TXT– a document containing unformatted text. In Windows, it is created and opened with regular notepad.

Music formats:

MP3– the compression ratio is approximately the same as that of the JPG format. But naturally, with strong compression, the sound quality deteriorates significantly.

WAV– a format from Microsoft that is used in Windows. Since this format has large file sizes, it is very inconvenient for transmission over the Internet.

WMA (Windows Media Audio)- another music format from Microsoft for storing audio information. Has a good compression ratio.

GIF(Graphics Interchange Format)
The GIF format was developed in 1987 by the computer information service CompuServe. Advantages
  1. Small size, which is achieved by a limited color range - no more than 256 colors.
  2. Transparent background.
  3. Animation.
And another important factor is that the LZW compression algorithm for the GIF format is patented. Unisys has held the patent since 1994 and began charging developers who use the GIF format. PNG(Portable Network Graphics)
The fruit of the community of independent programmers is a response to the transition of the most popular GIF format into the category of commercial products. The PNG format does almost everything that the GIF format does, except for animation. Advantages
  1. The best data compression - compresses raster images not only horizontally, but also vertically.
  2. Supports color photographic images up to and including 48-bit.
  3. 256 levels of transparency.
The size of a PNG image will be smaller than that of a GIF. But the smallest details will be easier with GIF, because in a PNG image file about 1 Kb is occupied by a description of the color palette, which is sometimes comparable to the size of the image itself. PNG-24
A format similar to PNG-8, but using a 24-bit color palette.
This allows you to save photographs and complex drawings in this format. Advantages
  1. Full color palette.
  2. High-quality transparency allows you to overlay the design on any background
GIF and regular PNG are cut at the edges and therefore transparency is suitable for a certain background - light. JPG, JPEG, JFIF(JPEG File Interchange Format)
To find a better way to compress photographic quality images, two standards organizations, the International Telecommunications Union (ITU) and the International Organization for Standardization (ISO), created the Joint Photographic Experts Group (JPEG).
Uses lossy compression. With this compression, information that is not essential for the perception of the image is removed. WBMP(WAP BitMap)
monochrome (two-color) images.
The maximum image size should not exceed the card size limit - 1.5 KB. BMP(BitMap)
The simplest raster format, BMP, is a native Windows format. BMP stores color data only in the RGB model, meaning it is a format created for screen use. PCX(PCExchange)
Images in PCX format can be viewed with most DOS programs. Like BMR, this format is largely outdated and is supported by modern graphics programs solely for compatibility with antique software. TIFF, TIF(Tagged Image File Format)
Originally developed by Aldus for its PhotoStyler graphics editor. As a universal format for storing raster images, TIFF is widely used, primarily in publishing systems that require the best quality images. Due to its compatibility with most professional image processing software, the TIFF format is very convenient when transferring images between different types of computers (for example, from PC to Mac and vice versa). PSD(Photoshop)
The Adobe Photoshop format is distinguished by the ability to store layers. Convenient only for processing in Photoshop and for storing the source for editing in the future. RAW(RAW Image Data)
The format is designed for digital cameras. This is an exact copy of the image captured on the matrix during shooting; it consists of three photographs taken in red, blue and green colors.
RAW file extensions may vary from manufacturer to manufacturer, and they are not always able to be opened using image processing programs.
Although if a camera supports saving RAW, then, as a rule, it comes with some kind of program for processing files of this format.
Currently, Adobe has proposed the DNG (Digital Negative Specification) format, which was created in order to make life easier for manufacturers of graphics tools. Some companies (Leica and Pentax) have already included DNG in their cameras, but most camera vendors still continue to use their formats.
RAW format extensions
.dng - Adobe (generic)
.crw .cr2 - Canon
.raf - Fuji
.kdc - Kodak
.mrw - Minolta
.nef - Nikon
.orf - Olympus
.ptx .pef - Pentax
.x3f - Sigma
.arw - Sony

Vector graphics

CDR(CorelDRAW)
The format of the popular CorelDRAW, which is the undisputed leader in the class of vector graphics editors on the PC platform. Having relatively low stability and problems with compatibility of files of different versions of the format. A.I.(Adobe Illustrator)
Being part of the Adobe family, they support almost all programs related to vector graphics in one way or another. The best intermediary for transferring images from one program to another, from PC to Macintosh and vice versa. It is characterized by the greatest stability and compatibility with the PostScript language, which is used by almost all publishing and printing applications. WMF(Windows Metafile)
Another native Windows format, this time vector. Understood by almost all Windows programs that are somehow related to vector graphics. EMF(Enhanced Metafile)
Similar to WMF.

OTHER FORMATS

SWF(ShokWaveFlash)
Flash format, a product of Macromedia, which allows the development of interactive multimedia applications. The scope of Flash use is different, it can be games, websites, CD presentations, banners and just cartoons. When creating a product, you can use media, sound and graphic files, you can create interactive interfaces and full-fledged web applications using PHP and XML. SVG(Scalable Vector Graphics)
The standard recommended by the World Wide Web Consortium for describing two-dimensional vector and combined vector-raster graphics using XML markup.
In the browser, SVG graphics are rendered using raster engines. Support for translucency in each layer, linear gradients, radial gradients, visual effects (shadows, hillshades, shiny surfaces, textures, patterns of any design, symbols of any complexity).
SVG is a format for 2D vector graphics as defined in the specification, but by adding script (namely JavaScript) inside an SVG file you can create 3D animated images.
SVG can have a built-in raster image, which, like any other object in SVG, can have transformation, transparency, etc. applied to it. ICO(Icon)
Icons are used in all kinds of programs on a computer and smartphone. But the average person may generally need to create or use an icon on their website.
Many people are trying to start their own website. Even if you use a ready-made website template with a style that only needs to be filled in, it would still be nice for you to make a unique icon. An icon on the Internet is used as a symbol of a site, a logo. For example, now you see a red square in the address bar. If you add a page of our website to your favorites, our icon will appear next to the link, which will help you quickly visually find the link to the site. Actually, this is the main purpose of an icon on the Internet.

PostScript

EPS(Encapsulated PostScript)
The most reliable and universal way to save data. It uses a simplified version of PostScript, cannot contain more than one page in one file, and does not save a number of printer settings. Like PostScript print files, EPS records the final work, although programs such as Adobe Illustrator and Adobe Photoshop can use it as a working document. EPS is designed for transferring vectors and rasters to publishing systems, and is created by almost all programs that work with graphics.

WHICH FORMAT SHOULD I CHOOSE?

For the Internet
photograph or drawing with flowing tones JPEG
picture with straight lines,
small range of colors
with a smooth fill (no gradient)
GIF
PNG
complex picture with transparent background PNG-24
animation SWF
icons ICO
For printing and storage
For print TIFF
For storage PSD
For logo EPS (CDR AI)
Logo for MS Office WMF
For photography
For storing and printing photos, but not of low quality JPEG
For printing and for the original of the best quality RAW
Of course, the best format for storing e.g. logos are EPS. which supports vector and is equally suitable for both vector and raster editors.

Knowledge of file formats and their capabilities is one of the key factors in pre-press preparation of publications, preparation of images for the web and in computer graphics in general.

Yes, today there is no such kaleidoscope of extensions as in the early 90s, when every image editor company considered it its duty to create its own file type, or even more than one, but this does not mean that “everything needs to be saved in TIFF, but compress with JPEG".

Each of the formats established today has undergone natural selection and has proven its viability and necessity. They all have some characteristic features and capabilities that make them indispensable in their work.

Knowledge of the features and subtleties of technology is important for a modern designer, just as it is necessary for an artist to understand the differences in the chemical composition of paints, the properties of soils, types of metals and types of wood.

The main purpose of Knowledge, by and large, is to expand a person’s capabilities, to increase the degree of his freedom, when a person acts as he sees fit, and not as his circumstances force him to do.

Formats:

GIF | JPEG | PNG | TIFF | PostScript | EPS | PDF | Scitex CT | Adobe Photoshop Document | Adobe Illustrator Document | Macromedia FreeHand Document | CorelDRAW Document | PICT |WMF | BMP | RTF

Compression methods:

LZW | JPEG | Huffman | CCITT | RLE (Run Length)

All graphic data in a computer can be divided into two large branches: raster and vector. Vectors are a mathematical description of objects relative to the origin. Simply put, for the computer to draw a straight line, the coordinates of two points are needed, which are connected along the shortest path, the radius is specified for the arc, etc.

Thus, a vector illustration is a set of geometric primitives. Most vector formats can also contain raster objects embedded in the file or a link to a raster file (OPI technology).

The difficulty in transferring data from one vector format to another lies in the use of different algorithms by programs, different mathematics when constructing vector objects and describing raster objects.

OPI (Open Prepress Interface) is a technology developed by Aldus that allows you to import not original files, but their images, creating in the program only a low-resolution copy (sketch) and a link to the original. During the printing process, the sketches are replaced with the original files. Using OPI, instead of simple embedding, makes it possible to save computer resources (primarily memory), significantly increasing its performance. OPI is the primary tool for working with imported graphics files in programs such as FreeHand and QuarkXPress, and is widely used in other products.

A raster file is simpler (to understand, at least). It is a rectangular matrix (bitmap), divided into small squares - pixels (pixel - picture element). Raster files can be divided into two types: those intended for display and for printing.

The resolution of files in such formats as GIF, JPEG, BMP depends on the computer's video system. In old Macs, there were 72 pixels per square inch of screen (screen resolution); on Windows, there was no single standard, but today the most commonly used value is 96 pixels per square inch of screen. In reality, however, these parameters have now become quite arbitrary, since almost all video systems of modern computers allow you to change the number of pixels displayed on the screen.

Raster formats intended exclusively for display have screen resolution only, meaning one pixel in the file corresponds to one screen pixel. They are also printed in screen resolution.

Raster files intended for pre-press preparation of publications have, like most vector formats, the Print Size parameter - the printed size. Associated with it is the concept of print resolution, which is the ratio of the number of pixels per square inch of a page (ppi, pixels per inch or dpi - dots per inch - the term is not entirely correct, but is often used).

Print resolution can be from 130 dpi (for a newspaper) to 300 (high-quality printing), almost never needed anymore.

Raster formats also differ from each other in their ability to carry additional information: various color models, vectors, Alpha channels or spot color channels, layers of various types, leading (interlaced loading), animation, compression capabilities and more.

GIF (CompuServe Graphics Interchange Format)

The hardware-independent GIF format was developed in 1987 (GIF87a) by CompuServe for transmitting raster images over networks. In 1989, the format was modified (GIF89a), support for transparency and animation was added. GIF uses LZW compression, which makes it possible to compress files with a lot of uniform fills (logos, inscriptions, diagrams) well.

The LZW (Lempel-Ziv-Welch) compression method was developed in 1978 by the Israelis Lempel and Ziv and later refined in the USA. Compresses data by searching for identical sequences (called phrases) throughout the file. The identified sequences are stored in a table and are assigned shorter markers (keys). So, if there are patterns of pink, orange, and green pixels in an image that repeat 50 times, LZW detects this, assigns a separate number to that set (for example, 7), and then stores that data 50 times as the number 7. The LZW method also , like RLE, performs better in areas of uniform, noise-free colors, it performs much better than RLE at compressing arbitrary graphics data, but the encoding and decompressing process is slower.

GIF allows you to record an image “through a line” (Interlaced), thanks to which, having only part of the file, you can see the entire image, but with a lower resolution. This is achieved by writing and then loading, first 1, 5, 10, etc. lines of pixels and stretching the data between them, the second pass is followed by 2, 6, 11 lines, the image resolution in the Internet browser increases. Thus, long before the file is downloaded, the user can understand what is inside and decide whether to wait until the entire file is downloaded. Interlaced notation slightly increases the file size, but this is usually justified by the acquired property.

In GIF you can set one or more colors to be transparent; they will become invisible in Internet browsers and some other programs. Transparency is provided by an additional Alpha channel saved with the file. In addition, a GIF file can contain not one, but several raster images, which browsers can load one after another with the frequency specified in the file. This is how the illusion of movement is achieved (GIF animation).

The main limitation of the GIF format is that a color image can only be recorded in 256 colors or less.

Read also:

  • D. Kirsanov "Inexhaustible GIF"
  • A. Lebedev "The simple secret of GIF"
  • A. Lebedev "The complex secret of GIF"

JPEG (Joint Photographic Experts Group)

Strictly speaking, JPEG is not a format, but a compression algorithm based not on searching for identical elements, as in RLE and LZW, but on the difference between pixels. Data encoding occurs in several stages. First, the graphics data is converted to a LAB color space, then half or three-quarters of the color information is discarded (depending on the implementation of the algorithm). Next, blocks of 8x8 pixels are analyzed.

For each block, a set of numbers is formed. The first few numbers represent the color of the block as a whole, while subsequent numbers reflect the subtle renderings. The range of details is based on human visual perception, so large details are more noticeable.

In the next step, depending on the quality level you choose, a certain portion of the numbers representing fine details are discarded. The final step uses Huffman coding to more efficiently compress the final data. Data recovery occurs in reverse order.

Thus, the higher the compression level, the more data is discarded, the lower the quality. Using JPEG you can get a file 1-500 times smaller than BMP! The format is hardware independent, fully supported on PC and Macintosh, but it is relatively new and is not understood by older programs (before 1995). JPEG does not support indexed color palettes. Initially, CMYK was not included in the format specifications; Adobe added support for color separation, but CMYK JPEG causes problems in many programs. The best solution is to use JPEG compression in Photoshop EPS files, which is described below.

There are JPEG subformats. Baseline Optimized - files are slightly better compressed, but are not readable by some programs. JPEG Baseline Optimized is designed specifically for the web and all major browsers support it. Progressive JPEG is also designed specifically for the Web, its files are smaller than standard ones, but slightly larger than Baseline Optimized. The main feature of Progressive JPEG is its support for analogue interlaced output.

From what has been said, the following conclusions can be drawn. JPEG compresses photographic-quality raster images better than logos or diagrams - they have more halftone transitions, and unwanted interference appears among monochromatic fills. Large images for the web or with high printed resolution (200-300 or more dpi) are compressed better and with less loss than with low resolution (72-150 dpi), because in each 8x8 pixel square, the transitions are softer, due to the fact that there are more of them (squares) in such files. It is undesirable to save any images with JPEG compression where all the nuances of color rendering (reproduction) are important, since color information is discarded during compression. Only the final version of the work should be saved in JPEG, because each resaving leads to more and more data losses (discarding) and turning the original image into a mess.

The LAB color space represents color in three channels: one channel dedicated to luminance values ​​(L - Lightnes) and the other two for color information (A and B). Color channels correspond to a scale, not to any one color. Channel A represents a continuous spectrum from green to red, while channel B represents a continuous spectrum from blue to yellow. The average values ​​for A and B correspond to real shades of gray.

There is a similar YCC color model used in the Kodak Photo CD and FlashPix formats, not covered here.

The Huffman compression method was developed in 1952 and is used as a component in a number of other compression schemes, such as LZW, Deflation, JPEG. The Huffman method takes a set of symbols and analyzes them to determine the frequency of each symbol. The most frequently occurring characters are then represented in the smallest possible number of bits. For example, the letter "e" is most often found in English texts. Using Huffman encoding you can represent "e" with just two bits (1 and 0), instead of the eight bits needed to represent the letter "e" in ASCII.

PNG (Portable Network Graphics)

PNG is a relatively recently developed format for the Web, designed to replace the outdated GIF. Uses Deflate lossless compression, similar to LZW (it was because of the patenting of the LZW algorithm in 1995 that PNG arose). Compressed indexed PNG files are usually smaller than similar GIF files, and PNG RGB is smaller than the corresponding TIFF file.

PNG files can have any color depth, up to 48 bits. Two-dimensional interlacing is used (not only rows, but also columns), which, just like in GIF, slightly increases the file size. Unlike GIF, where transparency is like honey - either it is there or not, PNG also supports translucent pixels due to the Alpha channel with 256 shades of gray.

The PNG file records gamma correction information. Gamma is a certain number that characterizes the dependence of the brightness of your monitor screen on the voltage on the electrodes of the kinescope. This number, read from the file, allows you to enter a brightness correction when displaying. It is needed so that the picture created on Mac looks the same on Windows and on various UNIXes. Thus, this feature helps to implement the main idea of ​​WWW - the same display of information regardless of the user's equipment.

PNG is supported in Microsoft Internet Explorer version 4 on Windows and version 4.5 on Macintosh. Netscape added PNG support to its browser in versions starting with 4.0.4 for both platforms. However, support for important format features such as seamless transparency and gamma correction has not yet been implemented.

Read also:
M. Tiguleev "P&NG"

TIFF (Tagged Image File Format)

The hardware-independent TIFF format appeared as an internal format of the Aldus PhotoStyler program. Its modular architecture turned out to be so successful that, having successfully survived the death of its native program, TIFF continues to improve and develop today.

Today it is one of the most widespread and reliable; it is supported by almost all programs on PC and Macintosh in one way or another related to graphics. Generally, TIFF is the best choice when importing raster graphics into vector programs and publishing systems. It has a full range of color models available from monochrome to RGB, CMYK and additional solid colors. TIFF may contain clipping paths, alpha channels, layers, and other additional data.

The exception, to some extent, is FreeHand. Sometimes TIFF files in it can randomly change their location when creating a PostScript file or directly in the document when opening it. More often than not, TIFFs “jump” while in the clipping path. With FreeHand, it is still preferable to use EPS.

TIFF can be saved in two recording orders: Macintosh and PC. This is because Motorola processors read and write numbers from left to right, while Intel processors read and write numbers the other way around. Modern programs can use both formats without problems.

In the TIFF format, it is possible to save using several types of compression: JPEG, ZIP, but, as a rule, only LZW compression is used. A number of older programs (eg QuarkXPress 3.x, Adobe Streamline, many text recognition programs) cannot read compressed TIFF files, but if you are using newer software there is no reason not to use compression.

Adobe PostScript

PostScript is a page description language (laser printer control language) from Adobe. It was created in the 80s to implement the WYSIWYG (What You See is What You Get) principle. Files of this format are a program with execution commands for an output device. They have the extension .ps or, less commonly, .prn and are obtained using the Print to File function of graphics programs when using a PostScript printer driver.

Such files contain the document itself (only what was located on the pages), all associated files (both raster and vector), the fonts used, as well as other information: color separation boards, additional boards, screen lineature and raster dot shape for each board and other data for the output device. If the file is created correctly, it does not matter what platform it was made on, whether True Type or Adobe Type 1 fonts were used - it makes no difference.

However, you need to take into account that even if you have made the correct settings in the print window, problems may arise due to the incorrect translation of the graphic language program you are using into the PostScript language (for example, the introduction of information about unused fonts). The most correct PS files are created by Adobe programs.

Data in a PostScript file is usually written in binary encoding. Binary code takes up half the space of ASCII. ASCII encoding is sometimes required for transferring files over networks, for cross-platform sharing, and for printing over serial cables. In these cases, the binary encoding may become corrupted (making the file unreadable) or cause "strange" behavior by the file server. These problems have long been eliminated in modern systems, but older computers and servers are susceptible to them.

The above applies to all PostScript-based formats: EPS and PDF, which are described below.

A more detailed description of the PostScript language, its features, problems and methods of printing from various programs can be found on my website in the article “Non-scary PostScript”.

EPS (Encapsulated PostScript)

The Encapsulated PostScript format can be called the most reliable and universal way to save data. It uses a simplified version of PostScript: it cannot contain more than one page in one file, and does not save a number of printer settings. Like PostScript print files, EPS records the final work, although programs such as Adobe Illustrator and Adobe Photoshop can use it as a working document.

EPS is designed for transferring vectors and rasters to publishing systems, and is created by almost all programs that work with graphics. It makes sense to use it only when the output is carried out on a PostScript device. EPS supports all color models necessary for printing, among them, such as Duotone, it can also record data in RGB, clipping path, trapping and raster information, embedded fonts. In EPS format, data is saved on the clipboard (Clipboard) of Adobe programs for exchange among themselves.

You can save a sketch (image header, preview) along with the file. This is a low-resolution copy in PICT, TIFF, JPEG or WMF format that is saved with the EPS file and allows you to see what's inside, since only Photoshop and Illustrator can open the file for editing. All others import the sketch, replacing it with original information when printed on a PostScript printer. On a printer that does not support PostScript, the sketch itself is printed. If you work on Photoshop for Mac, save thumbnails in JPEG format; other Mac programs save thumbnails in PICT format.

These and JPEG thumbnails cannot be used by Windows applications. If you're working on a PC or don't know where the file will be used, save the sketch in TIFF format (when given the choice). CorelDRAW also offers the vector format WMF for sketches, you should use this Microsoft brainchild very carefully - it will not lead to any good.

Initially, EPS was developed as a vector format, later its raster version appeared - Photoshop EPS. In addition to the sketch type (TIFF, PICT, JPEG), Photoshop allows you to choose the data encoding method. ASCII, Binary and JPEG. The first two were described above; JPEG is worth focusing on.

Photoshop allows you to compress raster data using the JPEG algorithm. Adobe has improved this compression method. Photoshop's JPEG now supports CMYK and compresses better than JPEG that fully complies with the original specifications. In other words, JPEG-encoded non-thumbnail EPS files weigh less than comparable JPEG files! However, I would like to draw your attention to an important feature when working with JPEG compression in EPS.

Printer and phototypesetting drivers cannot perform color separations on such files. That is, when performing color separation on your computer, the JPEG-compressed EPS image will appear entirely on the first board (Cyan, usually). However, in the service bureau, Scitex workstations (the majority of them in Israel) can color separate pages with JPEG EPS illustrations without any problems. I think systems from other companies also support JPEG EPS, in any case it’s worth asking. In service bureaus and printing houses in Tel Aviv, I was often recommended to use JPEG EPS instead of TIFF for recording raster data, since it is faster to output.

EPS has many varieties, depending on the creator program. The most reliable EPS are created by programs produced by Adobe Systems: Photoshop, Illustrator, InDesign. Since 1996, Adobe programs have a built-in PostScript interpreter so they can open and edit EPS. This opportunity seems to me very important. Other graphic editors cannot open EPS; moreover, the EPS files they create sometimes turn out to be, to put it mildly, special.

Among the most problematic are Quark EPS, created by the Save Page As EPS function, and FreeHand editable EPS, created by the Save As function. You should not particularly trust Corel EPS versions 6 and lower and EPS from CorelXARA. EPS files from CorelDRAW 7 and higher still have the problem of adding fields to the Bounding Box (a conditional rectangle in PostScript that describes all objects on the page).

Before exporting EPS files from CorelDRAW, CorelXARA and, to a lesser extent, FreeHand, it is worth converting many program effects (translucent fills, for example) into raster or simple vector objects. Thick outlines (more than 2 pt) may also make sense to convert into objects when the program provides such an opportunity. You can check the EPS file with Adobe Illustrator, if it opens, then everything is in order.

PDF (Portable Document Format)

PDF is proposed by Adobe as a platform-independent format for creating electronic documentation, presentations, and transferring layouts and graphics over networks. Used as an internal graphics format in Mac OS X.

PDF files are created by converting from PostScript files or using the export function of a number of programs. Adobe Acrobat Distiller is used for conversion; this is the best way to create PDF. Creating PDFs using the export method from programs usually gives worse results - the files are heavier and often have problems with embedding fonts.

To create PDF, there is also a PDFWriter program that works as a virtual printer. PDFWriter is not PostScript based and cannot handle graphics correctly. It is designed for quickly producing simple text documents. It has the same problem with embedding fonts as many programs that can export PDF. The most reliable and closest to the original PDF is created from PostScript and EPS files by the Acrobat Distiller program, supplied in the Adobe Acrobat package.

PDF was originally designed as a compact electronic documentation format. Therefore, all data in it can be compressed, and different types of compression are applied to different types of information, the most suitable for them: JPEG, RLE, CCITT, ZIP (similar to LZW and also known as Deflate). The Acrobat Exchange 3 program (which in version 4 became simply called Acrobat 4.0) allows you to create hyperlinks, fill in fields, include video and sound in a PDF file, and other actions.

The CCITT (International Telegraph and Telephone Committie) compression method was developed for facsimile transmission and reception. It is a narrower version of Huffman coding. CCITT Group 3 is identical to the fax message format, CCITT Group 4 is the fax format, but without special control information.

The PDF file can be optimized. Repeating elements are removed from it, a page-by-page order is established for loading pages via the web, with priority first for text, then graphics, and finally fonts. However, when there are no duplicate elements, the file, after optimization, usually increases slightly.

PDF is increasingly being used to transmit graphics and layout over networks in a compact form. It can retain all the output device information that was in the original PostScript file. This applies to PDF versions 1.2 (Acrobat 3) and higher. However, version 1.2 cannot include trapping information, some other specific data (DSC, for example), and does not use color profiles. All this is implemented in subsequent versions of the format.

You can find a more detailed description of technologies based on Adobe Acrobat PDF on my website in the article Man-Orchestra 3.0.

Scitex CT

A PostScript file intended for output goes through a number of stages on its way to the phototypesetting machine. The most important of these is rasterization - the process of converting PostScript data into a bitmap, performed by the PostScript interpreter (RIP).

CorelDRAW format files can be used to transfer/transfer works to a PC, but it is not advisable to import them into layout programs. On a Macintosh, CorelDRAW for Windows files open with the Macintosh version of CorelDRAW and Adobe Illustrator 8 or later.

PICT (Macintosh QuickDraw Picture Format)

PICT is a native Mac OS Classic format. Standard for the clipboard, uses the Mac OS graphical language. PICT is capable of carrying raster, vector information, text and sound, and uses RLE compression. Supported on Mac by all programs. Pure bitmap PICT files can have any bit depth (from Lineart to CMYK).

Vector PICT files, which have all but disappeared from use these days, had strange problems with line thickness and other printing variations.

The format is used for the needs of Mac OS, and when creating certain types of presentations only for Macintosh. Outside the Macintosh, PICT has a .pic or .pct extension and can be read by separate programs, but working with it is rarely simple and straightforward.

WMF (Windows Metafile)

The WMF vector format uses the Windows graphic language and can be said to be its native format. Used to transfer vectors via the clipboard. Understood by almost all Windows programs that are somehow related to vector graphics.

However, despite its apparent simplicity and versatility, the WMF format should be used only as a last resort for transmitting bare vectors. WMF distorts color, cannot save a number of parameters that can be assigned to objects in various vector editors, cannot contain raster objects, and is not understood by many Macintosh programs.

BMP (Windows Device Independent Bitmap)

Another native Windows format. It is supported by all graphic editors running this operating system. It is used to store bitmap images intended for use in Windows and, in fact, is not suitable for anything else.

Capable of storing both indexed (up to 256 colors) and RGB colors (more than 16 million shades). It is possible to use compression based on the RLE principle, but this is not recommended, since many programs do not understand such files (they may have the .rle extension). There is a version of the BMP format for the OS/2 operating system.

Using BMP for purposes other than Windows is a common mistake for newbies. It is important to understand that it is not advisable to use BMP either on the web, or for printing (especially), or for simply transferring and storing information.

RTF (Microsoft Rich Text Format)

The RTF text format came here for its extraordinary ability to transfer texts from one program to another. It allows you to transfer formatted text from optical character recognition programs or text editors to graphics programs or in any other direction. RTF can be a good solution (and sometimes the only solution) when transferring non-Latin, for example, Hebrew text or Russian in Windows 95/98 Hebrew Edition from program to program.

The secret to compatibility is the use of special RTF and Unicode formatting tags. It is Unicode (used as the basis of the Microsoft Word 97/98 format for Macintosh and PC) that allows you to easily transfer Russian texts from PC to Mac and back in MS Word 97/98 files (true for higher versions of Word).

RTF is used as the main one in the TextEdit editor that comes with Mac OS X and in the WordPad program that comes with Windows.

The abundance of images used on computers can be divided into three large groups. First of all, 2D graphics, in which flat (without a third coordinate) images are created; this group includes raster and vector graphics. Then 3D graphics and motion graphics.

Since images are created using special tools - graphic editors - it is impossible to consider file formats without taking into account their features. First of all, what is a graphics file? In the most general case, this is the system of image information adopted in a given graphics editor and the method of saving (recording) it. Such an information system can contain both general data (representation of an image on a particular display device, size, resolution, type of printer for printing, degree and method of information compression), and data that is specific and unique. Such data is created during the image editing stage and is intended for subsequent use during editing. For example, CorelDraw files contain information about curves, Photoshop files contain information about layers, channels, etc. Each graphic editor encodes this information in a certain way when recording (saving) on ​​a medium. Thus, the graphic file format should be understood as a set of information about the image and the method of recording it in the file. In general, all graphic formats can be divided into two groups. General-purpose formats contain only the image itself and are intended for storing, transferring or viewing images (gif, tiff, jpeg, etc.) and specific formats intended for storing intermediate results of image editing (cdr, cpt, psd, ai, etc.).

Let us dwell in more detail on the 2D group due to its greatest prevalence. A raster graphics image is an ordered array of unit elements (pixels for a monitor or dots for a printer) containing color information. The number of such elements is determined by the image size and resolution, and the file size additionally depends on the color palette used (black and white or 1-bit, grayscale and 256 colors or 8-bit, high color or 16-bit, true color or 24-bit ). Vector graphics contain mathematical descriptions of the curves and fills (areas filled with a single color and areas of gradients) that make up an image. The issue of resolution and color palette is decided immediately before the file is output to a specific physical device and taking into account its characteristics. In the printing industry, this process is known as RIP - rasterizing an image process.

File compression. Since graphic files tend to be large, the ability to compress (pack) information is useful. Currently, there are two known compression methods - lossless and lossy. Lossless compression algorithms are similar to those of conventional archivers (LZH, PKZIP, ARJ). The most famous of them, LZW (LZ84), is widely used in the popular raster formats GIF and TIFF. Lossy compression algorithms discard information that is not perceptible to humans (JPEG, PCD). The degree of compression in this case is much higher, but occurs more slowly and can lead to deterioration in quality (depending on the selected compression ratio). The main disadvantage of this algorithm is the impossibility of recompression without significant loss of the original image quality. Therefore, it is recommended to save only the final editing results in JPEG format, and in no case intermediate ones.


General purpose formats

Microsoft Windows Bitmap (BMP)

A format for storing raster graphics in a Microsoft Windows environment (for example, screen wallpapers and screensavers). Supports 1-, 4-, 8-, 24-bit color. Allows compression without loss of quality.

Kodak Photo CD (PCD).

Developed by Kodak. The format is intended for storing slides and negatives captured using a Kodak Photo CD type camera. Each file stores 5 copies of one image of different sizes and qualities from 192x192 to 3072x2048 pixels. It is impossible to programmatically record a PCD image on a computer; you can only import the image into a graphics editor that supports this format.

Zsoft PC PaintBrush (PCX)

One of the oldest and most famous formats for storing raster graphics. It appeared almost along with personal computers, due to which it is the most common and is supported by almost all image viewing/editing programs. Uses the simplest lossless compression algorithm RLE.

Tag Image File Format (TIFF)

Developers: Aldus and Microsoft. A universal format for storing raster graphics, widely used in publishing. It is necessary to make a reservation that there are quite a lot of its varieties, due to different compression algorithms. The format that uses the LZW algorithm has the greatest compatibility. The format supports 24 and 32-bit color (CMYK), two types of recording IBM PC and Macintosh, and can store information about masks (selected areas of the image).

TrueVision TGA (TGA)

Developed by TrueVision. The format is used for storing raster graphics and has an interesting feature - along with support for 24-bit color, it has another 8 bits for each single image element to store additional information. In particular, it may contain a mask, which is used in video editing programs, for example, to create an overlay of two sequences of frames. It has been known for a long time and is supported by many graphics packages.

Graphics Interchange Format (GIF)

Developed by CompuServe Corporation in 1987 for storing raster graphics. Implemented one of the most effective LZW compression methods for its time (87g). Allows you to display an image on the screen in four passes, allowing you to preview the image before it is finally drawn. In 1989, a new version of GIF 89a appeared. This format supports saving multiple images, animation sequences, and transparency colors in one file for the purpose of overlaying images on top of each other. Still widely used to store and transmit small images (page design elements) to the World Wide Web.

Joint Photographic Experts Group (JPEG)

The raster format owes its popularity to the strong degree of compression of the source image, based on a lossy compression algorithm. However, this applies primarily to 24- and 8-bit images. There are several varieties, due to different compression algorithms and display methods (gradual rendering is similar to gif). Also widely used on the WWW, mainly for transmitting large images.


Specific formats

As mentioned above, this group of formats is intended mainly for “internal” use (storing intermediate results of image editing). In addition to information about the image itself, the files contain a lot of service data that cannot be correctly interpreted by other viewing/editing programs. Such data may include information about fonts, layers, selections (masks), curves, special effects, etc. The most common formats are for vector graphics - cdr (Corel Draw) and ai (Adobe Illustrator), for raster graphics - psd (Adobe Photoshop ) and cpt (Corel PhotoPaint). Typically, the final image (ie the image intended for publication) is imported into one of the general purpose formats depending on the purpose of publication (gif or jpeg for the Internet, tiff for publishing systems, etc.).

Igor SIVAKOV