Graphic data storage formats. Basic graphic file formats. Brief overview What graphic formats are used in Windows 7

Which store any type of persistent graphical data (“images”) intended for subsequent visualization. The ways of organizing these files are called graphic formats. Once written to a file, the image ceases to be an image itself - it turns into digital data. The format of this data may change as a result of file conversion operations. Depending on the nature of the graphics supported, file formats are classified into one of the following types: raster format, vector format, metafile format. The most common graphic formats:

AI (Adobe Illustrator, Adobe AI) - a metafile format developed by Adobe for Macintosh, Microsoft Windows, NeXT; used for recording and storing various types of images, including drawings, drawings and decorative inscriptions.

PSD (Photoshop Document, Adobe Photoshop, Adobe PSD) is a raster format included in the Adobe Photoshop graphics editor; used by publishing systems on PC and Macintosh platforms. PSD allows you to record with or without compression (RLE) an image with many layers, masks, additional channels, contours and other graphic elements.

ART is a format developed by Gonson-Grace, used for storing photographs and drawings.

AutoCAD DXF (Drawing Interchange Format) and AutoCAD DXB (Drawing Interchange Binary) are two versions of the same format (without data compression), developed and supported by Autodesk for the AutoCAD CAD program running on the MS-DOS platform. DXB is a simplified (binary) version of the seven-bit DXF. In addition to AutoCAD, the format is supported by many CAD programs, CorelDRAW and others, in particular, for exchanging data of different types: vector-oriented data, texts, three-dimensional drawings. However, a number of programs that claim to support DXF import implement only some of its capabilities. DXF changes with each version of AutoCAD. DXF and DXB file names use the extensions *.dxf, *.dxb, *.sld, *.adi.

BDF (Bitmap Distribution Format) is a raster format developed by the X Consortium for exchanging bitmap font data between X Window and other systems. There is no compression, the maximum image size is not limited, the color is monochrome. Each BDF file stores data for only one typeface (a group of fonts united by a single name).

BMP is a raster format developed by Microsoft for Windows OS; supported by all graphic editors working under its control, capable of storing both indexed (up to 256 colors) and RGB color (16.7 million shades). Most BMP files are stored in uncompressed form.

CDR (CorelDRAW Document) is a vector format initially known for its low stability and poor file compatibility. Many PC programs (FreeHand, Illustrator, PageMaker) can import CDR files. Starting from the seventh version, CorelDRAW in CDR files applies compression separately for vector and raster graphics; fonts can be embedded.

CGM (Computer Graphics Metafile) is a standard (ANSI and ISO) and metafile format for displaying vector images on the Web, adopted at the end of 1998 by the 3WC (WWW Consortium). The format is focused on supporting a variety of graphic images, including artistic graphics, technical illustrations, cartography, and computer publishing systems. Although CGM contains many graphics primitives and attributes, it is less complex than PostScript, allows for the creation of more compact files, and supports the exchange of complex, high-quality artistic images. The format uses different types of compression (RLE, CCITT Group 3 and Group 4); the color palette is not limited. One CGM file can contain multiple images.

CPT is a raster format of the Corel PHOTO-PAINT program, provides storage of full-color images and vector objects.

DPX (Digital Picture Exchange Format; also known as SMPTE Digital Picture Exchange Format) is a raster format designed to store one film frame or video data stream; developed by Kodak Cineon, adopted by ANSI and the US Society of Motion Picture and Television Engineers (SMPTE) with minor modifications as a standard. The format is supported by Kodak programs.

DWG is a vector format of the AutoCAD program from Autodesk, designed for storing drawings.

EMF (Enchanced Metafile) is a metafile format developed by Microsoft for storing images as a sequence of commands leading to the reproduction of images. In November 2005, the vulnerability of EMF and WMF formats from “buffer overflow attacks” was discovered, and at the end of December, a family of Internet worms appeared. The infection occurred when users visited a number of sites that used the WMF vulnerability to download Trojan programs to a remote machine. Soon, stand-alone versions of viruses appeared, spreading in the form of email worms in attached image files. Microsoft responded to this threat by issuing Security Advisory 912840, as well as (January 11, 2005) patching Windows XP, Windows 2000 (Service Pack 4), and Windows Server 2003.

3DS (3D Studio, ASC) - a format developed by Autodesk, a three-dimensional modeling tool (“scene description”); also used as an interchange format. The format ensures optimal distribution of resources on the PC platform, supports all colors without restrictions, and has no compression. Many 3D modeling programs read and write files in this format. Strictly speaking, 3DS is two formats that are used as exchange formats - binary with the *.3ds extension and text with the *.asc extension.

EPS (Encapsulated PostScript, EPSF) is a simplified version of the PostScript format (PDL), developed by Adobe as a vector format, and later its raster version appeared - Photoshop EPS. The EPS format cannot contain more than one page in a single file and does not preserve a number of printer settings. Like PostScript print files, the EPS format records the final work, although programs such as Adobe Illustrator, Photoshop and Macromedia FreeHand can use it as a production tool.

FH8 (FreeHand Document) is the eighth version of the FH format, intended only for Macintosh PCs. FreeHand itself, Illustrator 7 and a limited number of programs from Macromedia can work with it. Since the seventh version, the FH format has full cross-platform compatibility, however, some FreeHand effects are not compatible with PostScript.

FIF (Fractal Image Format) is a format developed by Iterated Systems, used for storing photographs on the Internet, and supports its own FIF compression system.

FITS (Flexible Image Transport System, FTI) is a raster format and image storage standard used by many organizations (including scientific organizations, government agencies) for storing astronomical (obtained by orbital vehicles) and terrestrial images (in particular, radio astronomy data and digitized photographic images) . The format is widely used to exchange data between different hardware platforms and software applications that do not support a common file format. FITS is considered a fairly simple, uncompressed format with an “unlimited number” of shades of gray. It can store many types of data, including raster, ASCII text, multidimensional matrices, binary tables.

GIF (Graphics Interchange Format) is a standard raster format for presenting images on the WWW; was developed in 1987 by CompuServe, overshadowing the older PCX and MacPaint formats. Main advantages: the ability to use on many platforms and the availability of an efficient 12-bit LZW compression algorithm with free (until 1994) implementations. The format allows you to well compress files in which there are a lot of uniform fills (logos, inscriptions, diagrams), record an image “through the line” (Interlaced mode), thanks to which, having only part of the file, you can see the entire image, but with a lower resolution (GIF supports resolution up to 66536x65536).

IFF (Interchange File Format), ILM, ILBM, LBM (InterLeaved BitMap), Amiga Paint - a family of raster formats developed and supported for the MS-DOS, UNIX, Amiga platforms by Electronics Arts and Commodore-Amiga. A distinctive feature of IFF is its versatility: it can be used not only to support graphics, but also sound on all platforms except Amiga. IFF was previously known as the 24-bit format for MS-DOS, but it began to be replaced by the TIFF and TGA formats, and then by the JFIF format. Some characteristics of the IFF format: maximum image size 64 K by 64 K pixels; used in uncompressed and RLE compression versions, supports colors from 1- to 24-bit; “Major in Minor” number format, has a specification on CD; when used with MS-DOS and UNIX, file names may have *.iff and *.lbm extensions.

JFIF (JPEG File Interchange Format), JFI, JPG, JPEG - a raster format from C-Cube Microsystems, has become most widespread, so most “JPEG” images would be more correctly called “JFIF”. Using JFIF, it is recommended to save only the final version of the work, since each intermediate save leads to data loss and distortion of the original image.

PCX (PC Paintbrush File Format) is one of the most common raster formats; designed for storing illustrations in desktop publishing systems. The format was developed by Zsoft for the Paintbrush program, and after concluding an OEM agreement with Microsoft Corporation, it began to be used in various systems that work with graphics. Main characteristics: maximum image size 64 K by 64 K; 24-bit color support; uses RLE compression (can work without compression); supports work with CD-ROM. Versions of the PCX format are DCX and PCC, whose file names have the appropriate extension.

PDF (Portable Document Format) is a metafile format proposed by Adobe for graphic files (vector and raster) containing illustrations and text with a large set of fonts and hypertext links for the purpose of transmitting them over the network in compressed form.

PDS (Planetary Data System Format) is a NASA standard format for storing data collected by spacecraft and ground-based observations about the Sun, Moon and planets; is also used by other organizations to store similar data. The basis of the format is the object description language - ODL (Object Description Language). The maximum image size and colors in PDS format are unlimited; supported on all platforms.

PGML (Precision Graphics Mark-up Language) is a vector format that describes graphics in terms of mathematical formulas rather than raster pixels, which saves disk space and allows image scaling without loss of resolution and other quality indicators. The format was submitted to the W3C (WWW Consortium) for consideration as a network standard by Adobe Systems, IBM, Netscape, Sun Macromedia; used on the Internet.

Photo-CD (PCD, Kodak Photo CD) is a raster format developed by Eastman Kodak and designed for storing and playing full-color images (usually photographs) recorded at various resolutions on CDs. The format is supported by Photo CD ACCess, Photoshop, Shoebjx. The Photo CD format supports 24-bit colors, has its own compression system, a maximum image size of 2048x3072 pixels, allows you to store only one image per file, uses RLE and JPEG compression systems (in the DCT version). Kodak does not disclose further details.

PIC (Pictor PC Paint, PC Paint) - a raster format developed by Paul Mace for drawing programs on the MS-DOS platform, is a hardware-dependent format created taking into account the requirements of the IBM family of graphics adapters (CGA, EGA, VGA). The PIC format is similar to the PCX format; the file names use the *.pic and *.clp extensions.

PICT (Macintosh QuickDraw Picture Format) is a standard for the Macintosh PC clipboard, supporting both raster and vector graphics. On a Macintosh PC, PICT works with all programs. On a PC it can be read by a number of programs, but working with it is rarely easy. PICT file names have the extension *.pic or *.pct.

PNG (Portable Network Graphics) is a raster format approved as a standard by the W3C (WWW Consortium) and intended to replace GIF. The format provides indexing of up to 256 colors, support for 24- and 48-bit color representation (True Color) and the implementation of a transparency channel (the so-called alpha channel). The dynamic lossless PNG image compression algorithm is 10-30% more efficient than a similar type of compression implemented in the GIF format.

PS (PostScript) - the format of the PostScript page description language (also known as the laser printer control language) was developed in 1984 by Adobe. The format is used for printing and storing fonts, as well as for exchanging documents formatted with it. The advantage of the PS format is that it uses a device-independent playback system (including printer or screen type).

RAF (RAW) is a raster format used in digital cameras and maintains the image directly in the form in which it was captured by the camera sensor. Using this format eliminates artifacts associated with pre-processing of the image by camera software (for example, during JPEG compression) and provides the photographer with the ability to further process photographs (adjust exposure, change color balance, increase size).

Scitex CT is a raster format developed by Scitex; differs slightly from TIFF, with the exception of one feature: on phototypesetters (Imagesetter) from Scitex Dolev, files in this format are output somewhat faster. On a PC, file names in the Scitex CT format have the extension *.sct.

SWF (Shockwave Flash) is an internal vector format of the Macromedia Flash program, used for animation on the Internet.

TGA (TrueVision Targa) - a Truevision format developed for color television, supports RLE compression, file names have the extension *.tga.

TIFF (TIF, Tagged Image File Format) is a raster format developed by Aldus Corporation, originally intended for large, high-resolution graphic images obtained by scanning. The format is characterized by high quality of transmission and preservation of the color of the original images. Subsequently, the format was adapted for professional graphics packages and expanded.

WMF (Windows Metafile, Microsoft Windows Metafile) is a metafile format created for use with Windows OS, used for transferring vectors via the clipboard. WMF is supported by almost all programs running under Windows and in one way or another related to vector graphics. Despite its apparent simplicity and versatility, it is recommended to use the WMF format only in extreme cases for transmitting so-called naked vectors. WMF distorts color, does not save a number of parameters that can be assigned to objects in various vector editors, and is not understood by programs targeting the Macintosh PC. WMF files use the *.wmf extension.

VML (Vector Mark-up Language) is a vector format that was submitted to the W3C consortium by Microsoft, Hewlett-Packard, Autodesk, Macromedia, Visio; used on the Internet.

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. There are currently 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 widespread 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 high 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

Graphic file formats. Raster and vector formats.

TIFF format

TIFF(English Tagged Image File Format) - a format for storing raster graphic images. TIFF has become a popular format for storing images with high color depth. It is used in scanning, faxing, text recognition, printing, and is widely supported by graphics applications.

Structure The format is flexible and allows you to save images in paletted color mode, as well as in various color spaces:

  • Binary (two-color, sometimes called black and white)
  • Halftone
  • With indexed palette
  • CMYK
  • YCbCr
  • CIE Lab

8, 16, 32 and 64 bits per channel modes are supported.

Compression. 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 TIFF format allows the following compression algorithms:

  • PackBits (RLE)
  • Lempel-Ziv-Welch (LZW)
  • LZ77
  • JBIG
  • JPEG
  • CCITT Group 3, CCITT Group 4

The CCITT Group 3, CCITT Group 4 algorithms were originally developed for fax networks (hence why they are sometimes called Fax 3, Fax 4). Currently they are also used in printing, digital mapping systems and geographic information systems.

TIFF is a tagged format and uses basic, extended and special tags:

Basic tags form the core of the format and must be supported by all products that implement the TIFF format according to the specification. Support for extended tags, unlike basic tags, is optional.

JPEG format

JPEG(English: Joint Photographic Experts Group, after the name of the developer organization) is one of the popular graphic formats used for storing photographic images. Files containing JPEG data typically have the extensions .jpeg, .jfif, .jpg, .JPG, or .JPE. The JPEG algorithm allows for both lossy and lossless image compression.

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 received very wide use due to a fairly high compression ratio, support for compression of full-color images and relatively low computational complexity.

PDF format

PDF(English: Portable Document Format) is a cross-platform electronic document format created by Adobe Systems using a number of features of the PostScript language. 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. First of all intended for electronic presentation of printed products - a significant amount of modern professional printing equipment can process PDF directly. To view, you can use the official free Adobe Reader program, as well as third-party programs. The traditional way of creating PDF documents is a virtual printer, that is, the document as such is prepared in its own specialized program - a graphics program or text editor, CAD, etc., and then exported to PDF format for electronic distribution, transfer to a printing house and 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.

CALS format

Raster CALS format(English Computer Aided Acquisition and Logistics Support) standard developed by a division of the US Department of Defense to standardize the exchange of graphic data in electronic form, especially in the areas of technical graphics, CAD/CAM and image processing applications.

CALS is a well-documented, if unwieldy, format that attempts to cover a lot of ground. If you are not familiar with US government documents, you may find working with this format quite difficult. The CALS raster format is required in most applications that process US government documents. Since all data has a byte organization, problems like “from which end to break an egg, blunt or sharp,” never arise.

Characteristics of the CALS format

  • Type - Bitmap (bit matrix)
  • Color - monochrome
  • Compression - CCITT Group 4 or no compression
  • Maximum image size - unlimited
  • Multiple images per file - yes, Type II only
  • Platforms - everything

BMP format

BMP(from the English Bitmap Picture) is a raster image storage format developed by Microsoft. A huge number of programs work with the BMP format, since its support is integrated into the Windows and OS/2 operating systems. BMP files can have extensions .bmp, .dib and .rle.

The color depth in this format can be 1, 2, 4, 8, 16, 24, 32, 48 bits per pixel, but 2 bits per pixel is not officially supported. In this case, for color depths less than 16 bits, a palette with full-color components with a depth of 24 bits is used. In the BMP format, images can be stored as is or using some common compression algorithms. In particular, the BMP format supports RLE compression without loss of quality, and modern operating systems and software allow the use of JPEG and PNG.

PCX format

PCX(PCExchange) - a standard for the presentation of graphic information, a not so popular analogue of BMP, although it is supported by specific graphic editors such as Adobe Photoshop, Corel Draw, GIMP, etc. Currently, it is practically replaced by formats that support better compression: GIF, JPEG and PNG .

Format type- raster. Most files of this type use a standard color palette, but the format has been expanded to accommodate 24-bit images. PCX is a hardware-dependent format. Designed to store information in a file in the same form as in the video card. For compatibility with older programs, the video controller must support EGA mode. This compression algorithm is very fast and takes up a small amount of memory, but is not very efficient and impractical for compressing photographs and more detailed computer graphics. Lossless compression is used. When saving an image, successive pixels of the same color are combined and instead of specifying the color for each pixel, the color of the group of pixels and their number are indicated. This algorithm compresses images well that contain areas of the same color.

Advantages of the format

  • the ability to create a limited color palette (for example, 16 or 256 colors);
  • supported by a large number of applications.

Disadvantages of the format

  • does not support color systems other than RGB;
  • Numerous options, especially when working with colors, can make working with the file impossible;
  • an inconvenient compression scheme may actually increase the size of some files.

PNG format

PNG(English portable network graphics) - a raster format for storing graphic information that uses lossless compression.

Application area

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 format positioned first of all for use on the Internet and graphics editing.

PNG supports There are 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.

Animation

There is one feature of GIF that is not implemented in PNG - support for multiple images, especially animation; PNG was originally designed to just store one image in one file.

Sun Raster Format

Image format Sun Raster This is the native raster format of Sun Microsystems platforms using the SunOS operating system. This format supports black-and-white, grayscale, and color raster data of arbitrary color depth. The use of color maps and simple Run-Length data compression are also supported. Typically, most images in the SunOS operating system are in the Sun Raster format. This format is also supported by most UNIX image processing programs.

Characteristics Sun Raster format

  • Type - bitmap (bit matrix)
  • Colors - various
  • Compression - RLE
  • Multiple images per file - not supported
  • Platform - SunOS
  • Applications - many UNIX applications

Graphic file formats

Information in the section on Wikipedia materials

Lecture No. 3. Graphic file formats

Graphic file formats. BMP, TIFF, JPEG, GIF, PNG and other formats. Characteristics and application of various formats. Methods for presenting graphical information within a file. Format conversion.

Graphic file formats

In computer graphics, at least three dozen file formats are used to store images. But only some of them are used in the vast majority of programs. As a rule, raster, vector, and three-dimensional image files have incompatible formats, although there are formats that allow you to store data of different classes. Many applications are focused on their own “specific” formats; transferring their files to other programs forces you to use special filters or export images to a “standard” format.

BMP (Windows Device Independent Bitmap). The BMR format is a native Windows format, it is supported by all graphic editors running under its control. A huge number of programs work with the BMP format, since its support is integrated into the Windows and OS/2 operating systems. BMP files can have extensions .bmp, .dib and .rle. Additionally, data in this format is included in binary RES resource files and PE files.

The BMP format can save images with a color depth (the number of bits that describe one pixel in the image) of 1, 4, 8, and 24 bits, which corresponds to a maximum number of usable colors of 2, 16, 256, and 16,777,216. The file can contain a palette that defines the colors , different from those accepted in the system.

TIFF(Tagged Image File Format). The format is designed for storing high-quality raster images (file name extension.TIF). TIFF is a hardware-independent format; it is supported by almost all programs on PC and Macintosh that are somehow related to graphics. 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 Pantone colors. TIFF can store layers, clipping paths, alpha channels, and other additional data.

TIFF has two varieties: for 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.

The native program for this Photo-Styler format is currently “discontinued”, but the format continues to develop and be supplemented with new features. Letraset has introduced a shortened version of the TIFF format called RIFF (Raster Image File Format).

In the TIFF format, LZW, JPEG, and ZIP compression can be 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.

TIFF, despite all the compression algorithms, is still the most “weighty” raster format, so it is not suitable for use on the Internet.

PSD(PhotoShop Document). Adobe Photoshop's own format (file name extension.PSD), one of the most powerful in terms of storage capabilities for raster graphic information. Allows you to remember the parameters of layers, channels, degrees of transparency, and many masks. Supports 48-bit color encoding, color separation, and various color models. The main disadvantage is that the lack of an effective information compression algorithm leads to a large volume of files. Doesn't open in all programs.

PCX. The format appeared as a format for storing raster data in the PC PaintBrush program from Z-Soft and is one of the most common (file name extension.PCX). The inability to store color-separated images, insufficient color models and other limitations led to the loss of popularity of the format. Currently considered obsolete.

JPEG (Joint Photographic Experts Group). The format is intended for storing raster images (file name extension.JPG). Allows you to adjust the relationship between file compression rate and image quality. The compression methods used are based on removing “redundant” information, so the format is recommended to be used only for electronic publications.

The JPEG 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 many subtle shades of color. The biggest difference between JPEG and other formats is that JPEG uses a lossy compression algorithm. 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 noticeable.

JPEG is 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 graphic 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 CMYKJPEG 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 the above, 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 data loss (discarding) and turning the original image into mush.

GIF (GraphicsInterchangeFormat). 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.

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 relevance of the concepts implemented in the GIF format has become particularly evident in connection with the expanded use of electronic publications (in the form of Web pages or Web sites). Despite the ever-increasing capacity of network hardware, and, in particular, modems, the issue of the volume of graphic elements of electronic publications is quite acute. On the one hand, the visibility and effectiveness of an electronic publication largely depends on the quality of graphic elements, and, first of all, on the resolution and color depth of image pixels. Therefore, the desire of developers of electronic publications to use multicolor graphic images is understandable.

On the other hand, the requirements for the compactness of files transmitted over network channels have by no means faded into the background. Large graphic files require a lot of time to load the image into the browser. Therefore, one of the main tasks of professionals in the field of Web design is precisely to find the proper balance between the artistry, information content of a Web page and its volume.

GIF is one of the few formats that uses an effective compression algorithm that is almost as good as archiving programs. In other words, GIF files do not need to be archived, since this rarely provides a noticeable gain in volume.

Therefore, the GIF format, whose main advantage is its minimal file size, still retains its significance as the main graphic format of the World Wide Web.

The main limitation of the GIF format is that a color image can only be recorded in 256 color mode. This is clearly not enough for printing.

There are two GIF specifications. The first refers to the GIF87a format, which provides for recording multiple images, and GIF89a, which is focused on storing both text and graphic data in one file.

GIF87 a provided the following GIF file capabilities:

Interlacing. At first, only the “skeleton” of the image is loaded, then, as it is loaded, it is detailed. This allows you to avoid loading the entire graphic file on slow lines in order to get an idea of ​​it.

Compression using the LZW algorithm. This feature of GIF files keeps them among the leaders in terms of smallest file size.

Placing multiple images in one file.

The location of the image on the logical screen. That is, the format made it possible to define a logical screen area for displaying images, and place them in an arbitrary location in this area.

This standard was later extended by the GIF89a specification, which added the following capabilities:

Including comments in the graphic file (not displayed on the screen, but can be read by a program that supports GIF89a).

Controls the delay before changing frames (set in 1/100 of a second, or waiting for user input).

Controls the deletion of the previous image. The previous image can be left, replaced with the background color or with what came before it.

Definition of transparent color.

Text output.

Creation of control blocks by application programs (application-specific extensions). You can create a block inside a GIF file that will be ignored by all programs except the one for which it is intended.

PNG (PortableNetworkGraphics). 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 typically smaller than their GIF counterparts, and RGB PNGs are smaller than the corresponding TIFF file.

The color depth in PNG files can be any, 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 there is either transparency or not, PNG also supports translucent pixels (then available in the transparency range from 0 to 99%) 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 a picture created on a Mac looks the same on both a PC and Silicon Graphics. 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.

PNG and GIF89a have the following properties:

    The format is organized as a data stream

    "Lossless compression"

    Allows you to store indexed images with a palette of up to 256 colors

    Progressive display of interlaced data

    Transparent color support

    Ability to store public and restricted data

    Independent of hardware and platform

Advantages of PNG over GIF:

    Faster progressive display of interlaced patterns

    Expanded user data storage options

PNG features not found in GIF:

    Storing full color 48-bit images

    Storing 16-bit black and white images

    Full Alpha Channel

    Contrast pointer

    CRC is a method for detecting errors in a data stream

    Standard toolkit for developing PNG read-write applications

    A standard set of test images to test these applications

GIF features missing from PNG version 1.0:

    Ability to store multiple images in one file

    Animation

WMF (WindowsMetaFile). Windows operating system vector image storage format (file name extension.WMF). By definition, it is supported by all applications of this system. However, the lack of tools for working with standardized color palettes accepted in printing and other shortcomings limit its use (WMF distorts color and cannot save a number of parameters that can be assigned to objects in various vector editors).

EPS (EncapsulatedPostScript). A format for describing both vector and raster images in Adobe's PostScript language, the de facto standard in the field of prepress processes and printing (file name extension.EPS). Since the PostScript language is universal, the file can simultaneously store vector and raster graphics, fonts, clipping paths (masks), equipment calibration parameters, and color profiles. The format used to display vector content on the screen is WMF, and raster - TIFF. But the screen copy only roughly reflects the real image, which is a significant drawback EPS. The actual image can only be seen at the output of the output device, using special viewing programs or after converting the file to PDF format in the Acrobat Reader, Acrobat Exchange applications.

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

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).

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. 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, from 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 have It also makes 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 (PortableDocumentFormat). Document description format developed by Adobe (file name extension.PDF). Although this format is primarily intended for storing entire documents, its impressive capabilities allow for efficient presentation of images. The format is hardware-independent, so images can be displayed on any device - from a monitor screen to a photographic exposure device. A powerful compression algorithm with controls for the final image resolution ensures compact files with high quality illustrations. Almost any document or scanned image can be converted to this format. However, to do this, in most cases you will need the full Adobe Acrobat package, which contains Adobe Acrobat Distiller and Adobe Acrobat Writer.

PDF has been an open ISO 32000 standard since July 1, 2008. 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.

To view, 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 graphic or text editor, CAD, etc., and then exported to PDF format for distribution in electronic form, transfer to a printing house, etc. . P.

CDR (CorelDRAW Document). The CDR file format is a vector image or drawing created using CorelDRAW. 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. Also, the CDR file can be opened with Corel Paint Shop Pro.

The format has been known in the past for low stability and poor file compatibility, however, CorelDRAW is extremely convenient to use. 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.

Ai (AdobeIllustror). Vector image file created in Adobe Illustrator; instead of raster data, consists of paths or lines connected by dots; may include objects, color and text. Ai documents can be opened in Photoshop, but the image will be "rasterized", meaning that it will be converted from a vector image to a raster image. The AI ​​format encapsulates and formalizes a subset of the PostScript page description language (PDL) in a structured file. These files are designed to be displayed on a PostScript printer, but may also include a raster version of the image, thereby providing a preview of the image. PostScript in its full implementation is a powerful and complex language and is capable of defining almost anything that can be displayed on a two-dimensional output device, an AI format adapted for storing traditional graphics data: drawings, drawings and decorative lettering. Note, however, that AI files can be very complex. PostScript's power comes largely from its ability to define sequences of operations and then combine them using simple syntactic means. This hidden complexity is sometimes (but not always) minimized in Adobe Illustrator files.

File Conversion

The need to convert graphic files from one format to another may arise for various reasons:

The program the user is working with does not understand the format of his file;

Data that needs to be transferred to another user must be presented in a special format.

Convert files from raster to vector format

There are two ways to convert files from raster to vector format:

1) converting a raster file into a raster object of a vector image;

2) tracing a raster image to create a vector object.

The first method is used in CorelDRAW, which, as a rule, successfully imports files of various raster formats. For example, if a raster image contains 16 million colors, CorelDRAW will display an image that is close in quality to television. However, the imported raster object can become quite large even if the original file is small. Raster file formats store information quite efficiently, as compression methods are often used. Vector formats do not have this ability. Therefore, a raster object stored in a vector file can be significantly larger in size than the original raster file.

The peculiarity of the second method of converting a raster image to a vector image is as follows. A raster image tracing program (such as CorelTRACE) looks for groups of pixels with the same color and then creates vector objects that correspond to them. Once traced, vectorized drawings can be edited as desired. In Fig. shows a raster image that converts well to vector. The fact is that raster images that have clearly defined boundaries between groups of pixels of the same color translate well into vector ones. At the same time, the result of tracing a photographic-quality raster image with complex color transitions looks worse than the original.

Original raster image Vectorized image

Original raster image Vectorized image

Converting files from one vector format to another

Vector formats contain descriptions of lines, arcs, shaded fields, text, etc. Different vector formats describe these objects in different ways. When the program tries to convert one vector format to another, it acts like a regular translator, namely:

Reads object descriptions in one vector language,

Tries to translate them into a new format language.

If the translator program reads a description of an object for which there is no exact match in the new format, this object can either be described by similar commands in the new language, or not described at all. Therefore, some parts of the design may become distorted or disappear. It all depends on the complexity of the original image. In Fig. presents one of the possible results of converting a file from one vector format to another. The original image was created in CorelDRAW and consists of the following elements: an imported bitmap image in JPEG format, a frame around the bitmap image, text, and a rectangle with a conical fill.

File formats are the basis of working with digital photographs. will tell you about all the major graphic file formats.

RAW.

A file format containing raw information coming directly from the camera sensor. These files are not processed by the camera's processor (unlike JPG) and contain original shooting information. RAW can be compressed without losing quality.

The advantages of RAW are obvious - unlike JPG, which was processed in the camera and already saved with data compression - RAW gives the widest possibilities for processing photographs and maintains maximum quality.

The note. 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 - Nikon, CR2 - Canon...

JPEG (aka JPG).

This is the most common graphics file format.

JPG 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.

JPG 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 a minimum degree of 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.

The TIFF format is very popular for storing images. 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 widely supported by graphics applications and is used in the printing industry.

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.

The rights to the TIFF format currently belong to Adobe. Photoshop can save TIFF without merging layers.

PSD.

The PSD format is used in Photoshop. PSD allows you to save a raster 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.

The BMP format is one of the first graphic formats. It is recognized by any program that works with graphics; format support is integrated into the Windows and OS/2 operating systems.

BMP stores data with a color depth of up to 48 bits and a maximum size of 65535x65535 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.

The GIF format was created in the early days of the Internet for sharing images. It can store lossless compressed images in up to 256 colors. The GIF format is ideal for drawings and graphics, and also supports transparency and animation.
GIF also supports compression without loss of quality.

PNG.

The PNG format 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.

JPEG 2000 (or jp2).

A new graphics format created to replace JPEG. 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).

Publications on the topic