Graphic files. Computer Graphics Basics

The problem of saving images for subsequent processing is extremely important. Users of any graphic systems encounter it. The image can be processed by several programs before it takes on its final form. For example, the original photograph is first scanned, then sharpened and color-corrected in Adobe Photoshop, GIMP, etc. The image can then be exported to a drawing program such as CorelDRAW, Inkscape or Adobe Illustrstor to add hand-drawn images. If the image is being created for a magazine article or book, it must be imported into a publishing system such as QuarkXPress or Adobe PageMaker. If an image is to appear in a multimedia presentation, it will most likely be used in Microsoft PowerPoint, Macromedia Director, or placed on a Web page.

Any graphic image is saved in a file. The way graphic data is laid out when it is saved in a file determines the file's graphic format. There are file formats for raster images and vector images.

Graphic format is a way of recording graphic information.

Raster images are saved in a file in the form of a rectangular table, in each cell of which the binary color code of the corresponding pixel is written. Such a file stores data about other properties of the graphic image, as well as its compression algorithm.

Vector images are saved in a file as a list of objects and the values ​​of their properties - coordinates, sizes, colors, etc.

There are quite a large number of both raster and vector graphic file formats. Among this variety of formats, there is no ideal one that would satisfy all possible requirements. The choice of one or another format for saving an image depends on the goals and objectives of working with the image. If photographic accuracy of color reproduction is needed, then preference is given to one of the raster formats. It is advisable to store logos, diagrams, and design elements in vector formats. The file format affects the amount of memory the file occupies. Graphic editors allow the user to independently choose the format for saving the image. If you are going to work with a graphic image in only one editor, it is advisable to choose the format that the editor offers by default. If the data will be processed by other programs, it is worth using one of the universal formats.



Knowledge of file formats and their capabilities is one of the key factors in computer graphics. 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 JPEG." Each of the established formats has undergone natural selection and has proven its viability. All of them have some characteristic features and capabilities that make them indispensable in their work. Knowledge of the features and subtleties of technology is also important for a modern designer. As an artist, it is necessary to understand the differences in the chemical composition of paints, the properties of soils, types of metals and rocks.

Information compression methods

Almost all modern graphics file formats use some kind of information compression method, therefore, for a better understanding of further material, the beginning of this section contains a brief summary of these methods.

Image compression- application of data compression algorithms to images stored digitally. As a result of compression, the image size is reduced, which reduces the time it takes to transfer the image over the network and saves storage space.

Image compression is divided into lossy compression and lossless compression. Lossless compression is often preferred for artificially generated images, such as graphs, program icons, or for special cases, for example, if the images are intended for subsequent processing by image recognition algorithms. Lossy compression algorithms usually produce artifacts that are clearly visible to the human eye as the compression ratio increases.

Lossless compression algorithms:



· RLE - used in PCX formats - as the main method and in BMP, TGA, TIFF formats as one of the available ones.

· LZW - used in GIF format

· LZ-Huffman - used in PNG format

The most popular example of an image format that uses lossy compression is JPEG

RLE compression method

One of the simplest compression methods is the RLE (Run Length Encoding) method. The RLE method works by searching for identical pixels in the same row. If a line, say, has 3 white pixels, 21 black, then 14 white, then using RLE makes it possible not to remember each of them (38 pixels), but to write it as 3 white, 21 black and 14 white in the first line .

RLE compression is most effective for images that contain large areas of solid color, and least effective for scanned photographs, since they may not contain long sequences of identical video pixels.

LZW compression method

The LZW (Lempel-Ziv-Welch) compression method was developed in 1978 by Lempel and Ziv, and later refined in the USA. Compresses data by searching for identical sequences (repeating patterns) 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.

Huffman compression method

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.

CCITT compression method

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. CCITT Group 3 and 4 algorithms are designed for encoding binary raster images. They were originally developed for fax networks (which is why they are sometimes called Fax 3, Fax 4). Currently they are also used in printing, digital mapping systems and geographic information systems. The Group 3 algorithm resembles RLE in that it encodes linear sequences of pixels, while Group 4 encodes two-dimensional fields of pixels.

Graphics file formats

Raster format

Raster images are formed in the process of scanning multi-color illustrations and photographs, as well as when using digital photo and video cameras. You can create a raster image directly on your computer using a raster graphics editor.

A raster image is created using dots of different colors (pixels) that form rows and columns. Each pixel can take on any color from a palette containing tens of thousands or even tens of millions of colors, so raster images provide highly accurate color and grayscale reproduction. The quality of a raster image increases with increasing spatial resolution (the number of pixels in the image horizontally and vertically) and the number of colors in the palette.

The disadvantage of raster images is their large information volume, since it is necessary to store the color code of each pixel.

Main raster formats: GIF, BMP, JPEG, PNG, TIF/TIFF, PSD, WBMP, PCX, PCD (PhotoCD), FLM, IFF, PXR, SCT/PICT, PCT, RAW, TGA, FPX, MNG, ICO, FLA /SWF.

Let's look directly at the extensions of the raster graphics format.

The BMP file format (short for BitMaP) is the native raster graphics format for Windows because it most closely matches the native Windows format in which that system stores its raster arrays. BMP files can have extensions .bmp, .dib and .rle. The RLE extension of a file name usually indicates that the file's raster information was compressed using the RLE method.

In BMP files, the color information of each pixel is encoded into 1, 4, 8, 16, or 24 bits (bits/pixel). The number of bits per pixel, also called color depth, determines the maximum number of colors in an image. An image with a depth of 1 bit/pixel can have only two colors, and with a depth of 24 bit/pixel - more than 16 million different colors.

Developed by Microsoft to be compatible with all Windows applications. The BMP format can save black-and-white, grayscale, index color, and RGB color images (but not two-tone or CMYK color images). The disadvantage of these graphic formats: large volume. The consequence is low suitability for Internet publications.

The JPEG (Joint Photographic Experts Group, pronounced "japeg") file format was developed by C-Cube Microsystems as an efficient method for storing images with high color depth, such as those produced by scanning photographs with numerous subtle (and sometimes elusive) shades of color. Files in this format have the extension .JPG or .JPE, .JPEG, .jfif. The JPEG algorithm allows you to compress the image.

The biggest difference between JPEG and the other formats discussed here is that JPEG uses both lossy and lossless compression algorithms. The lossless compression algorithm preserves image information so that the decompressed image exactly matches the original. Lossy compression sacrifices some image information to achieve a higher compression ratio. The decompressed JPEG image rarely matches the original exactly, but very often the differences are so small that they are barely (if at all) detectable. The fewer colors an image has, the worse the effect of using the JPEG format, but for color photographs on the screen this is hardly noticeable.

The JPEG algorithm is most suitable for compressing photographs and paintings containing realistic scenes with smooth transitions of brightness and color. JPEG is most widely used in digital photography and for storing and transmitting images using the Internet.

On the other hand, JPEG of little use for compressing drawings, text and character graphics where sharp contrasts between adjacent pixels result in noticeable artifacts. It is advisable to save such images in lossless formats such as TIFF, GIF or PNG.

JPEG (as well as other distortion compression methods) doesn't fit for image compression during multi-stage processing, since distortions will be introduced into the images each time intermediate processing results are saved. JPEG should not be used in cases where even minimal losses are unacceptable, for example, when compressing astronomical or medical images.

TO shortcomings compression according to the JPEG standard should include the appearance of characteristic artifacts in restored images at high compression rates: the image is scattered into blocks of 8x8 pixels (this effect is especially noticeable in image areas with smooth changes in brightness), in areas with high spatial frequency (for example, on contrasting contours and image boundaries), artifacts appear in the form of noise halos.

However, despite its shortcomings, JPEG has become very widespread due to its fairly high compression ratio, support for full-color image compression, and relatively low computational complexity. In addition, the user is given the opportunity to control the level of loss by specifying the compression ratio. Thanks to this, you can choose the most suitable processing mode for each image: the ability to set the compression ratio allows you to choose between image quality and memory savings. If the image being saved is a photograph intended for a highly artistic publication, then there can be no talk of any losses, since the drawing must be reproduced as accurately as possible. If the image is a photograph that will be placed on a greeting card, then the loss of some of the original information is not of great importance. The experiment will help determine the most acceptable level of loss for each image.

(English) . Graphics Interchange Format - a format for exchanging images). GIF is a format for storing graphic images. The GIF format is capable of storing compressed data without loss of quality in a format of no more than 256 colors. 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 allows you to do a good job of compressing files that have a lot of uniform fills (logos, inscriptions, diagrams). The LZW compression algorithm is a lossless compression format. This means that the data recovered from GIF will exactly match the compressed data. It should be noted that this is only true for 8-bit images with a palette; for a color photograph, the loss will be due to its conversion to 256 colors.

GIF is widely used on World Wide Web pages.

The creators of the format pronounced its name as "jif". However, the pronunciation "gif" is also widely used in the English-speaking world, based on the fact that GIF is an abbreviation for Graphics Interchange Format. Both pronunciations are listed as correct by the Oxford English Dictionary and American Heritage Dictionary.

Interlaced GIF

The GIF format allows interlaced data storage. This splits the lines into groups and changes the order in which the lines are stored in the file. When loading, the image appears gradually, in several passes. Thanks to this, having only part of the file, you can see the entire image, but with a lower resolution.

In an interlaced GIF, lines 1, 5, 9, etc. are written first. Thus, by loading 1/4 of the data, the user will have an idea of ​​the whole image. The second pass follows lines 3, 7, 11, the image resolution in the browser is doubled. Finally, the third pass passes all the missing lines (2, 4, 6...). Thus, long before the file is downloaded, the user can understand what is inside and decide whether to wait for the image to fully download. Interlaced recording slightly increases the file size, but this is usually justified by the acquired property.

Animated images

The GIF format supports animated images. Fragments are sequences of several static frames, as well as information about how long each frame will be shown on the screen. The animation can be looped, then after the last frame the first one will be shown again and so on.

Patent protection

GIF was originally a proprietary format, but its age patent protection has expired. The US patent for the LZW compression algorithm used in GIF (Patent No. 4,558,302) expired on June 20, 2003. The Canadian patent expired on July 7, 2004. The patent expired for the UK, France, Germany and Italy on June 18, 2004, and for Japan on June 20, 2004.

Graphic format PNG(English: Portable Network Graphic - mobile network graphics, pronounced "ping") - a raster graphics file format similar to the GIF format, but which supports many more colors.

For documents that are transmitted over the Internet, the small file size is very important, since the speed of access to information depends on it. Therefore, when preparing Web pages, they use types of graphic formats that have a high data compression ratio: .JPEG, .GIF, .PNG.

The PNG format is designed to replace the older and simpler GIF format, and to some extent to replace the much more complex TIFF format. PNG was created as a free format to replace GIF, so the backronym “PNG’s Not GIF” appeared on the Internet.

Format PNG positioned primarily for use on the Internet and graphics editing.

PNG supports three main types of raster images:

· Halftone (16-bit color depth)

· Color indexed image (8-bit palette for 24-bit color)

Full color image (48 bit color depth)

The PNG format stores graphic information in compressed form. Moreover, this compression is performed without losses, unlike, for example, JPEG with losses. The PNG format has a higher compression ratio for files with more colors than GIF, but the difference is about 5-25%, which is not enough for the format to dominate, since the GIF format compresses small 2-16 color files with no less efficiency.

PNG is a good format for image editing, even for storing intermediate stages of editing, since image restoration and resaving takes place without loss of quality.

The PSD (PhotoShop Document) format is a proprietary format of the Adobe Photoshop program, which allows you to record a raster image with many layers, additional color channels, masks, i.e. this format can save everything that the user has created visible on the monitor. The only format that supports all program features. It is preferable for storing intermediate results of image editing, as it preserves their layer-by-layer structure. All recent versions of Adobe Systems products support this format and allow you to import Photoshop files directly. The disadvantages of the PSD format include insufficient compatibility with other common applications and the lack of compression capabilities.

All color models and any color depth from white-black to true color are supported, lossless compression. Starting with version 3.0, Adobe added support for layers and paths, so the format of version 2.5 and earlier is separated into a separate subformat. For compatibility with it, in later versions of Photoshop it is possible to enable the mode of adding one base layer to the file, in which all layers are merged. Such files can be easily read by most popular viewers and imported into other graphic editors and 3D modeling programs.

Files in this format have the extension .PSD.

TIF, TIFF

The TIFF format (Tagged Image File Format) was created by the joint forces of such giants as Aldus, Microsoft and Next specifically for storing scanned images. Files in this format have the extension .TIF or .TIFF.

The exceptional flexibility of the format made it truly universal. TIFF is one of the oldest formats in the world of microcomputers; today it is the most flexible, universal and actively developing. TIFF is still the main format used for storing scanned images and placing them in publishing systems and illustration programs. Versions of the format exist on all computer platforms, making it extremely convenient for transferring raster images between them. TIFF supports monochrome, indexed, grayscale, and full-color images in RGB and CMYK models with 8- and 16-bit channels. It allows you to store clipping paths, calibration information, and printing parameters. Any number of additional alpha channels can be used. Additional color channels are not supported. The great advantage of the format is its support for almost any compression algorithm. It is possible to save an image in a TIFF file with or without compression. Compression levels depend on the characteristics of the image being saved, as well as on the algorithm used. The most common is lossless compression using the LZW (Lempel Ziv Welch) algorithm, which provides a very high degree of compression.

Areas of application: Word, PowerPoint, Publisher, Paint documents, mainly intended for printing, widely used in printing. Mainly used for working with large images, useful for saving intermediate results of working with an image. The format is too large to be used online and, worse, too complex to interpret. The TIFF format is constantly evolving. A new modified version of the format has been developed, which in the future may supplant the “native” PhotoShop format.

ICO is a format for small pictures (icons) on the WWW. Images are used by browsers to mark Web projects in the URL bar and in favorites. Supported and used by programs for creating icons like IconXP.

PDF format

PDF (Portable Document Format) is a cross-platform electronic document format created by Adobe Systems using a number of PostScript language features. Most often, a PDF file is a combination of text with raster and vector graphics, less often - text with forms, JavaScript, 3D graphics and other types of elements. Primarily intended for electronic representation of printed products - a significant amount of modern professional printed equipment can process PDF directly. For viewing, you can use the official free Adobe Reader program, as well as third-party programs. The traditional way to create PDF documents is a virtual printer, that is, the document as such is prepared in its own specialized program - a graphics program or a text editor. , CAD, etc., and then exported to PDF format for electronic distribution, printing, etc. PDF.

The PDF format allows you to embed the necessary fonts (line-by-line text), vector and raster images, forms and multimedia inserts. Supports RGB, CMYK, Grayscale, Lab, Duotone, Bitmap, several types of raster information compression. It has its own technical formats for printing: PDF/X-1, PDF/X-3. Includes an electronic signature mechanism to protect and verify the authenticity of documents. A large amount of related documentation is distributed in this format.

The XCF format (English eXperimental Computing Facility) is a raster format for storing graphic information that uses lossless compression, created specifically for the Gimp program and supports all its capabilities (similar to the PSD format for Adobe Photoshop). It was named after the laboratory at the University of California at Berkeley where the first version of Gimp was written.

The format supports saving each layer and the current selection, channels, transparency, text layers, layer groups. Images saved in XCF are compressed using a simple RLE algorithm, but GIMP also supports compressed files using either GZIP or bzip2. Compressed files can be opened as regular image files.

XCF files are supported in other graphics editors, but due to the fact that the XCF format is often revised, it is not recommended for use as a data exchange format. Therefore, the XCF format is especially convenient for saving intermediate results, and for those images that will later be opened again in GIMP. The XCF format is not fully backward compatible; for example, GIMP 2.0 can save text in text layers, while GIMP 1.2 cannot. Text layers saved in GIMP 2.0 will be opened as normal raster image layers in GIMP 1.2.

Vector format

No matter how good the above formats are, they all have one drawback in common - raster. Images realized with their help are quite difficult to modify and even scale. Despite the use of various compression methods, they still have a considerable size and a relatively long loading time, which is especially critical for Web graphics.

Vector formats: WMF, EMF, CGM, EPS, WPG, AutoCAD, DXF, DWG, CDR, AI, PCT, FLA/SWF.

(from Scalable Vector Graphics) is a scalable vector graphics markup language created by the World Wide Web Consortium (W3C) and part of a subset of the Extensible Markup Language XML, is intended to describe two-dimensional vector and mixed vector/raster graphics in XML format. Supports both still, animated and interactive graphics - or, in other terms, declarative and scripting.

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.

SVG is an open standard. Unlike some other formats, SVG is not proprietary.

Advantages of the format

Text format - SVG files can be read and edited (with some skills) using regular text editors. When viewing documents containing SVG graphics, you have access to view the code of the file being viewed and the ability to save the entire document. In addition, SVG files are typically smaller in size than comparable JPEG or GIF images and are highly compressible.

Scalable - SVG is a vector format. It is possible to enlarge any part of an SVG image without losing quality.

It is possible to insert elements with images in PNG, GIF or JPG formats.

The text in SVG graphics is text, not an image, so it can be selected and copied.

The animation is implemented in SVG using the SMIL (Synchronized Multimedia Integration Language) language. Using scripts and animation in SVG allows you to create dynamic and interactive graphics.

Disadvantages of the format

SVG inherits all the disadvantages of XML, such as its large file size (however, the latter is compensated by the existence of the compressed SVGZ format).

Difficult to use in large mapping applications due to the fact that the entire document must be read to correctly display a small part of the image.

Encapsulated PostScript (EPS) is an extension of the PostScript format, data in which is recorded in accordance with the DSC (Document Structuring Conventions) standard, but with a number of extensions that allow this format to be used as a graphic one.

The EPS format was created by Adobe based on the PostScript language and served as the basis for the creation of early versions of the Adobe Illustrator format.

In its minimal configuration, an EPS file has a so-called BoundingBox DSC comment - information describing the size of the image. This way, even if the application cannot rasterize the data contained in the file, it has access to the image dimensions and its preview.

The format is used in professional printing and can contain raster images, vector images, and combinations thereof.

An image recorded in EPS format can be saved in different color spaces: Grayscale, RGB, CMYK, Lab, Multi-channel.

The data structure of a raster EPS file can be written using different methods: ASCII-data (text data, slow, but most compatible), Binary (binary data, fast and compact), JPEG with varying degrees of compression (fast, but lossy and poor compatibility).

When saving in EPS, you can specify the format and color depth of the sketch, which, to speed up work, will be displayed on the screen in layout programs instead of the large original. A Preview of an EPS file can also be created using various data reduction techniques: JPEG, TIFF(1/8 bit).

It uses a simplified version of PostScript and cannot contain more than one page in one file, nor does it 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. The main trump card of the format is versatility. Almost all programs that work with graphics can write and read files in this format. An image in a file is usually stored in two copies: a master and a thumbnail, so a raster image recorded in EPS format will be slightly larger in size than PCX and BMP. The native program of this format is Adobe Illustrator. It can be used for cross-platform graphics sharing.

The CDR format, the main working format of the popular CorelDRAW package, which is the undisputed leader in the class of vector graphics editors on the PC platform, is quite controversial. This file format was developed by Corel for use in its own software products. CDR files are not supported by many image editing programs. However, the file can be exported using CorelDRAW to other, more common and popular image formats. Having relatively low stability and problems with compatibility of files of different versions of the format, nevertheless, the CDR format, especially the latest, 7th and 8th versions, can be called professional. The files of these versions use separate compression for vector and raster images, fonts can be embedded, CDR files have a huge working area of ​​45x45 meters, and multi-page is supported.

There are two types of graphic files, raster and vector, which have different formats.

  1. raster graphics files correspond to the formats *.bmp, *.tif, *psd, *.gif, *.png, *.jpg;
  2. vector graphics file corresponds to the formats *.wmf, *.eps, *.cdr, *.ai

Knowledge of file formats is the basis for working with digital photographs. they determine how the information is stored in the file (raster or vector), as well as the form in which the information is stored (the compression algorithm used). Compression is used for raster graphics files, since they are usually quite large. Compressing graphic files differs from archiving them using archiving programs (gag, zip, arj, etc.) in that the compression algorithm is included in the graphic file format.

Basic graphic file formats

RAW

Translated from English - raw. The format used in the photo processing process contains raw information that comes directly from the camera sensor and does not have a clear specification. These files are not processed by the camera's processor (unlike JPG) and contain original shooting information. RAW can be compressed without losing quality. Unlike JPG, which was processed in the camera and already saved with data compression, RAW gives the widest possibilities for processing photographs and preserves maximum quality.

In other words, the RAW format refers to data obtained directly from the matrix without processing.

Different camera manufacturers use different algorithms to create RAW in their cameras. Each manufacturer comes up with its own resolution for its RAW file - NEF, NRW - Nikon; CRW, CR2 – Canon.

JPEG (or JPG)

This is the most common graphics file format. JPEG has earned its popularity due to its flexible data compression capabilities. If necessary, the image can be saved with maximum quality. Or compress it to the minimum file size for transmission over the network. When saving a JPEG file, you can specify the degree of quality, and therefore the degree of compression, which is usually specified in some conventional units, for example, from 1 to 100 or from 1 to 10. A larger number corresponds to better quality, but the file size increases. Usually, the difference in quality between 90 and 100 is practically not perceived by eye.

JPEG uses a lossy compression algorithm. What does this give us? An obvious disadvantage of such a system is the loss of image quality every time a file is saved. On the other hand, image compression simplifies data transfer by 10 times. In practice, saving a photo with minimal compression does not result in any visible degradation in image quality. That is why JPG is the most common and popular format for storing graphic files.

TIFF (Tagged Image File Format)

TIFF format is a format for storing raster graphics. It was originally developed by Aldus in collaboration with Microsoft for use with PostScript. It allows you to save photos in various color spaces (RBG, CMYK, YCbCr, CIE Lab, etc.) and with high color depth (8, 16, 32 and 64 bits). TIFF is used in scanning, faxing, text recognition, printing, and is widely supported by graphics applications. It is possible to save an image in a TIFF file with or without compression. Compression levels depend on the characteristics of the image being saved, as well as on the algorithm used. Unlike JPG, a TIFF image will not lose quality every time the file is saved. But, unfortunately, it is precisely because of this that TIFF files weigh many times more than JPG.

PSD (Photoshop Document)

Photoshop Document (PSD) is an original raster format for storing graphic information, using lossless compression, created specifically for Adobe Photoshop and supporting all its capabilities. It allows you to save a bitmap image with many layers, any color depth and in any color space. Most often, the format is used to save intermediate or final results of complex processing with the ability to change individual elements. PSD also supports compression without loss of quality. But the abundance of information that a PSD file can contain greatly increases its weight.

BMP (Bit MaP image)

Bit MaP image (BMP) is a universal raster graphics file format used in the Windows operating system. This format is supported by many graphic editors, including the Paint editor. Recommended for storing and exchanging data with other applications. The BMP format is one of the first graphic formats. It is recognized by any program that works with graphics. BMP stores data with a color depth in this format from 1 to 48 bits per pixel, the maximum image dimensions are 65535 × 65535 pixels. At the moment, the BMP format is practically not used either on the Internet (JPG weighs several times less) or in printing (TIFF copes with this task better).

GIF (Graphics Interchange Format)

format for storing raster graphics. The GIF format is capable of storing compressed data without loss of quality in a format of up to 256 colors. Includes a lossless compression algorithm that allows you to reduce the file size by several times. An image in GIF format is stored line by line; only the format with an indexed color palette is supported. Recommended for storage; images created programmatically (diagrams, graphs, etc.) and drawings (such as appliqué) with a limited number of colors (up to 256). Used to place graphic images on Web pages on the Internet.

PNG (Portable network graphics)

A raster format for storing graphic information using lossless compression. PNG was created to both improve upon and replace the GIF format with a graphics format that does not require a license for use. Unlike GIF, PNG has alpha channel support and the ability to store an unlimited number of colors. PNG compresses data without loss, which makes it very convenient for storing intermediate versions of image processing. Used to place graphic images on Web pages on the Internet.

JPEG 2000 (or jp2)

A graphic format that, instead of the discrete cosine transform characteristic of JPEG, uses wavelet transform technology, which is based on representing the signal as a superposition of some basic functions - wave packets. As a result of this compression, the image is smoother and clearer, and the file size is reduced by another 30% compared to JPEG at the same quality. In simple terms, for the same quality, JPEG 2000 file size is 30% smaller than JPG. When highly compressed, JPEG 2000 does not break the image into squares characteristic of the JPEG format. Unfortunately, at the moment this format is not very widespread and is supported only by Safari and Mozilla/Fireox browsers (via Quicktime).

WMF (Windows MetaFile)

A universal format of vector graphics files for Windows applications. Used to store a collection of Microsoft Clip Gallery graphics.

CDR (CorelDRaw files)

An original vector graphics file format used in the CorelDraw vector graphics processing system.

AI (AdobeIllustrator files)

An original vector graphics file format used in the AdobeIllustrator vector graphics processing system.

EPS (Encapsulated PostScript)

The format of vector graphics files is supported by programs for various operating systems.

Here are almost all the most common ones graphic file formats, which a self-respecting photographer and designer should know.

The main question and topic of our article is formats. Among all the wealth of choice, there is no ideal format that would satisfy all possible requirements. Nevertheless, knowing the future fate of the file - printing, the Internet or simply printing on an inkjet printer, you can properly prepare it and, if not guarantee, then at least maintain hope for success.

All graphic information can be divided into two main groups: vector and raster. Fonts occupy a separate niche in vector graphics.

Raster graphics are a two-dimensional matrix (bitmap) consisting of elementary particles - pixels. The main parameters are size and resolution. The size can be expressed in millimeters, inches, pixels, etc., respectively, this parameter characterizes the horizontal and vertical size of the image. The second main parameter - resolution - characterizes the ratio of the number of pixels per square inch (ppi - pixels per inch or dpi - dot per inch). For newspaper printing, raster graphics should be in the range of 120-150 dpi, for high-quality printing with photo output - 250-300 dpi. Large resolution values ​​are usually redundant and do more harm than good, slowing down the output. Screen resolution is considered to be 72 dpi (in printing it is used only for preview).

BMP(Windows Device Independent Bitmap). Windows native 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 this is where its scope ends. Using BMP for purposes other than Windows is a fairly common mistake.

GIF(CompuServe Graphics Interchange Format). The hardware-independent GIF format was developed in 1987 (GlF87a) 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.

JPEG(Joint Photographic Experts Group). Strictly speaking, JPEG is not a format, but a compression algorithm based not on searching for identical elements, but on the difference between pixels.

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! Initially, CMYK was not included in the format specifications; Adobe added support for color separations, but CMYK JPEG causes problems in many programs.

JPEG compresses photographic-quality raster images better than logos or diagrams.

TIFF, TIF(Target Image File Format). The hardware-independent TIFF format is one of the most widespread and reliable today; it is supported by almost all programs on PC and Macintosh that are somehow related to graphics. The entire range of color models is available to him from monochrome to RGB, CMYK and additional Pine colors. TIFF may contain clipping paths, alpha channels, layers, and other additional data.

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.

EPS(Encapsulated PostScript). The format 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. 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 needed for printing.

EPS has many varieties, depending on the creator program. The most reliable EPS are created by programs produced by Adobe Systems: Photoshop, Illustrator, InDesign.

QXD(QuarkXPress Document). Working format of the well-known layout program QuarkXPress. The package is characterized by stability, speed and ease of use. The main, never defeated competitor of Adobe Systems continues to exist now in its fifth reincarnation. It should also be noted that two previous versions of QuarkXPress 3.x and QuarkXPress 4.x are still in use. The special ideology of the package lies in its ability to adapt to any layout designer’s tasks. After all, the main functions are performed by special extensions (Xtensions), of which there are more than Plug-ins for Photoshop.

RM(Page Maker). Adobe Systems layout program format. An extremely simple package in terms of capabilities. It was intended primarily for the transition from manual layout to computer layout with minimal costs for staff training. It became widespread among us thanks to timely Russification and, again, ease of learning for beginners. Currently, development of the package has been stopped.

ID(InDesign). Code name "Quark Killer" A follower of RM, designed to squeeze out competitors in the publishing market, primarily Quark. A hodgepodge of solutions borrowed from other layout packages did not lead to the expected result. ID is an extremely clumsy and inconvenient package, which turned out to be the killer only of its progenitor RM, and then because of the cessation of development of the latter.

The only advantages include a built-in PostScript interpreter and apparent ultra-compatibility with other Adobe products.

PDF(Portable Document Format) - proposed by Adobe as a platform-independent format for creating electronic documentation, presentations, transferring layout and graphics over networks.

PDF files are created by converting from PostScript files or using the export function of a number of programs. The format was originally designed as a means of storing electronic documentation. Therefore, all data in it can be compressed, and in different ways: JPEG, RLE, CCITT, ZIP. PDF can also retain all of the output device information that was in the original PostScript file.

Adobe PostScript- page description language. It was created in the 80s to implement the WYSIWYG (What You See is What You Get) principle. Files in this format are actually a program with commands to execute for the output device. Such files contain the document itself, associated files, fonts used, as well as other information: color separation boards, additional boards, screen lineature and halftone dot shape for each board, and other data for the output device.

Data in a PostScript file is usually written in binary encoding. Binary code takes up half the space of ASCII.

CDR- format of the popular vector editor CorelDraw. The package gained its popularity and distribution due to its apparent ease of use and interactive special effects (lenses, transparencies, non-standard gradients, etc.). The wide capabilities of this program in terms of effects are explained by the richer internal page description language than that of Adobe products that use PostScript. This is precisely the main disadvantage of CorelDraw. PostScript with Korelov special effects is often a headache for printing houses and prepress bureaus.

CCX- vector graphics format from Corel. It is not supported by anything other than CorelDraw. Unsuitable for printing and the Internet. The advantages include only a small volume of files saved in this format and the presence of many excellent cliparts.

Vector graphics are a mathematical description of objects relative to an origin. Thus, to display a straight line, the coordinates of only two points are required. For a circle - coordinates of the center and radius, etc.

Graphic formats can contain a lot of additional information: alpha channels, paths, color model, raster lineature and even animation. The choice of format for printed products primarily depends on the output device. Phototypesetting machines operate under the PostScript language. Therefore, for printing, the main data storage formats are TIFF and EPS. Accordingly, the format is raster and vector graphics. Recently, PDF (Portable Document Format) has been gaining momentum.

TIFF Only suitable for transmitting raster graphics. This format allows you to store a lot of useful information: alpha channels, color model, paths and even layers (when using Adobe Photoshop 6-7). However, to improve output reliability, many prepress bureaus do not recommend leaving additional channels and layers in the final files. To be on the safe side, if it is not possible to consult with the printing house, it is also better to disable compression. You should also not save text labels and vector graphics in TIFF format. Even with a resolution of 300 dpi, they will look like a sawtooth effect when printed. In order to avoid such defects, the EPS format is provided, which allows you to contain raster and vector graphics, fonts and other useful information. However, quite often we encounter this curious misconception: when opening an EPS file (created using Illustrator or Corel Drow) with the raster graphics program Photoshop, users continue to firmly believe that they are still working with vector graphics. No, my dears, no matter what format you save it in, the output you will get is only a raster and nothing more. By opening any file with vector graphics in Photoshop, you rasterize it, that is, turn it into a raster format. The only exception can be EPS created directly in Photoshop versions 6-7. Fonts and vector primitives, in this case, will remain vector in the output. This format is called Photoshop EPS. There are quite a few varieties of EPS, they differ in the presence of preview images, composite or separated images, encoding and compression. But they all agree on one thing - EPS is based on the PostScript page description language, which in turn is a standard for printing output devices. Therefore, it should be taken into account that all files in other formats, such as CDR and CCX, must be forcibly converted to PS. At the same time, commands from one language are not always adequately translated into another, and the result of such a conversion can be, at best, damaged films, or, at worst, the entire circulation. Therefore, the attitude of printing house workers towards such formats and programs is appropriate. However, this does not mean that everyone should prepare vector graphics in Illustrator and raster graphics in Photoshop; it’s just that when preparing graphics in another package, you need to limit your flight of “fantasy” and especially carefully check the output files for PostScript errors. Unlike other packages, Adobe Illustrator was designed as an interface to the PostScript language and does not need to convert its files to produce a format understandable for the output device. In the ninth and tenth versions of Illustrator, the base format is PDF, which is also not a problem for output, because it is essentially "refined" EPS. All previous versions are based on PostScript.

Don't forget about fonts. Often, only the names of fonts appear in the EPS file and others are substituted during output, which in no way corresponds to the designer’s intention. Therefore, fonts must be converted to curves, either embedded in a file, or attached as separate files.

Vector formatsVector format files are especially useful for storing linear elements (lines and polygons) as well as elements that can be decomposed into simple geometric objects (such as text). Vector files do not contain pixel values, but mathematical descriptions of image elements. Based on mathematical descriptions of graphic forms (lines, curves, splines), the visualization program constructs an image.

Vector files are structurally simpler than most raster files and are usually organized as data streams.

Examples of the most common vector formats are AutoCAD DXF and Microsoft SYLK.

WMF. This is a vector format used by Windows graphics programs. This format is used to transfer vector images via the clipboard in the Windows environment. This format is accepted by almost all programs that work with vector graphics. This format cannot be used for raster images. Disadvantages: color distortion and failure to save a number of parameters that are set for images in graphics programs.

AI. Illustrator internal format. It can be opened by Photoshop and, in addition, this format is supported by all programs related to vector graphics. This format is the best way to transfer vector images from one program to another. Raster graphic elements are lost in most cases when transmitted via AI format.

CDR. This is the internal format of the Corel Draw program. This format is very popular, as is the software package itself. Many programs can import vector files into Corel Draw formats. The CDR format also contains raster graphic objects. This format uses compression, and different compression is applied to vector and raster files.

Metafile formats

Metafiles can store both raster and vector data. The simplest metafiles resemble vector files; they contain the language or syntax for defining vector data elements, but may also include a raster representation of the image. Metafiles are often used to transport raster and vector data between hardware platforms, as well as to move images between software platforms.

The most common metafile formats are WPG, Macintosh PICT and CGM.

The variety of formats used to record images can be divided into three categories:

Formats that store images in raster form;

Formats that store images in vector form;

Universal formats that combine vector and raster representation.

Raster formats

The BMP (BitMap) raster format is designed for use in the Windows operating system. It is used to represent bitmap images in program resources. Supported by all graphic editors running the Windows operating system. The format works with images whose color depth ranges from 1 to 24 bits. Provides the ability to compress data using the RLE method (not recommended due to compatibility issues).

The BMP format is not suitable for printing or web design; it is recommended to be used only for Windows needs (creating icons, desktop backgrounds, etc.).

PCX (PC eXchange) is one of the oldest graphic formats, created for the PC Paintbrush program, the files of which open in almost all graphic editors. Supports monochrome, grayscale, indexed and full color images in the RGB model. Assumes the use of RLE compression. It has a large number of versions, but is currently being actively replaced by other formats.

TIFF (Tagged Image File Format, TIF) is designed as a universal format for storing scanned images. Supports almost all types of images: monochrome, grayscale, indexed and full-color images in RGB and CMYK models with eight- and sixteen-bit channels.

Currently, its scope has expanded significantly; it is one of the most common and reliable graphic formats, versions of which exist for PC and Macintosh. It is supported by almost all major raster and vector graphics packages, publishing systems, as well as text editing and layout programs.

Unlike the formats discussed above, TIF supports a number of additional functions (almost all elements of the structure of Photoshop documents): it saves the multi-layer structure of the document, information about the degree of transparency of pixels, descriptions of clipping paths, mask channels (alpha channels), etc. Provides the ability to compress data according to the LZW algorithm. Today, TIF is the best choice when exporting raster graphics to vector programs and publishing systems.

The GIF (Graphics Interchange Format) format was created specifically for transmitting raster images over global networks. It is compact-oriented, uses the LZW compression algorithm, and interlaces the transmission of graphic data. This allows you to very quickly see a rough version of the image before the file is fully downloaded. The format is used only for its original purpose - on the Internet, since it only supports indexed images.


GIF allows you to save several indexed images in one file, the sequential display of which (by browsers) is a simple animation. The animation file stores not only the frames themselves, but also the parameters for its demonstration. GIF animation is very common on the Internet. In addition, a certain color in the indexed palette can be designated as “transparent” and then the background of the page will be visible in the browser through areas of this color.

The GIF format is very popular. It is supported by almost all raster graphics editors and editors that create images for the web.

The JPEG (Joint Photographic Experts Group) format gets its name from the corresponding compression method. Today, JPEG is one of the most common graphic formats for file compression. Unpacking of data contained in files of this format occurs automatically when the file is opened.

JPEG does not support monochrome (single-bit), indexed, or multi-channel images. It does not have the ability to store layers, masks, or transparency information. When saving a multilayer image in JPEG format, all layers are first combined into one and information about the original layers is lost. In addition, if there were transparent areas in the original image, they will be assigned the color white during the saving process, and the transparency information will be lost.

JPEG is most widely used when creating images for electronic distribution on CDs or the Internet. Not recommended for use in printing. This format should only be used for photographic images. Drawings with sharp edges and large filled areas show strong compression defects. This results in "dirt" appearing around dark lines on a light background and visible square areas. Even when working exclusively with photographic images, it is better to use JPEG only to save the final version of the work, because each intermediate save leads to new data losses (discards).

The PCD (Photo CD) format is used in publishing systems as a format for image sources. Most photo library manufacturers use this format on their CDs. PCD has a number of features that determine its use specifically in the field of creating photo collections.

A PCD file contains an image in several fixed resolutions at once. Base resolution 512x768 pixels is used for viewing on NTSC and PAL TVs. In addition, there are lower resolutions Base/4, Base/16 and higher resolutions 4Base, 16Base, 64Base (on Pro Master standard discs). When opening an image in PCD format, you can select any of the given resolutions, which avoids lengthy loading and subsequent scaling.

The images on the Photo CD are presented in a special YCC color model, much like Lab. The YCC model is useful for compressing information, but is not supported by most applications. When you open files in this format, graphics programs immediately convert the YCC color model to grayscale, RGB or Lab. Popular graphic editors are not able to save images in PCD format, but can only open them.

PSD (PhotoShop Document) is a proprietary format of Adobe Photoshop. The only format that supports all the features of this program. It is preferable for storing intermediate results of image editing (if the editing was done in Photoshop), as it completely preserves their structure (layers, channels, masks, texts, transparency and much more). The PSD format can store images of any type: monochrome, grayscale, indexed, full color, multi-channel. As the program became more popular and widespread, the format acquired some versatility and can now be easily opened by most applications. The disadvantages of the format include the lack of compression capabilities.

The PNG (Portable Network Graphics) format, like GIF, is designed for transmitting images over the network.

The format supports grayscale and full-color RGB images with a single alpha channel, as well as monochrome and indexed

bathroom images without alpha channels. The alpha channel serves as a transparency mask. Thus, PNG is the only format common on the Internet that allows you to obtain full-color images with a transparent background. In addition, to speed up the appearance of the image on the screen, PNG uses a two-dimensional interlaced output mode (not only rows, but also columns). PNG uses a lossless compression algorithm based on LZW compression.

FLM (Filmstrip) is Adobe Premier's own format, a video editing and presentation program. Photoshop allows you to open and edit footage created in Adobe Premier.