6 what determine graphic file formats. Graphic information storage formats

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) - cross-platform format electronic documents, created by Adobe Systems using several 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 submission to in electronic format printing products - a significant amount of modern professional printing equipment can process PDF directly. To view you can use the official free program Adobe Reader, 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 text editor, CAD, etc. and then exported to PDF format for distribution in electronic form, transfer to a printing house, 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. Works with BMP format great amount programs, since its support is integrated into operating Windows systems and OS/2. 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 OS And software Allows you to use 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 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

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 minimum size file for transfer 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 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.

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 only supported Safari browsers and Mozilla/Firerox (via Quicktime).

Depending on how well you understand graphic formats, the final result of all the work will directly depend. Understanding what format to save images and photos in is extremely important. Most likely, you have often thought and asked yourself in what format is it better to save images and photographs. In this tutorial we will look at main graphic file formats which photographers most often use, we’ll talk about the pros and cons of each of them and give valuable recommendations. Let's start!

JPEG (or JPG) (Joint Photographic Expert Group)

Let's start the review with the most popular and generally accepted format today - JPEG or JPG. When you save an image in this format, some digital data is lost. This happens because JPG uses a specific compression algorithm. Why do people use it then? The answer is simple: because the JPG format preserves the colors that the human eye sees, while the file size is significantly smaller than others. Although a JPEG image is great for viewing on devices and on the Internet, remember that you should not save images in JPEG that are subject to further processing, as the quality will deteriorate with each new save. Today it is the most common graphic format.

BMP (Bitmap Picture)

The simplest BMP format used in the first Windows versions. In BMP, color data is stored in the RGB model and it can store both indexed colors (256 colors) and full-color images, and in the first case, the simplest RLE (Run Length Encoding) compression is possible. Without compression, the file size is close to the maximum possible. Today it is used for images intended for use in Windows. By the way, using BMP not for Windows needs is a common mistake of all beginners. Remember, BMP cannot be used for the web, for printing, or for simple transfer and storage of information.

TIFF (Tagged Image File)

TIFF was originally developed by the talented company Aldus for its PhotoStyler graphics editor. This format is very popular among photographers, but for a completely different reason than JPG. TIFF files can be saved by two different ways: Either with little compression or no compression at all. In addition to photography, it is widely used in publishing systems that require images best quality. A TIFF file stores complete information about each pixel of the photograph taken. TIFF files are used on both Macintosh and Windows platforms, and weigh many times more than JPG because they do not use compression.

GIF (Graphics Interchange Format)

This format was created by CompuServe back in 1987 and is even used on the Internet today along with JPG. Online The GIF format has some advantages over JPG. If you save the image as a GIF with 256 colors, the file size will be amazingly small and very different from the original. On the other hand, it is not the best technology for using this format in digital photography. It is best to save an image as a GIF if the image contains some text (for example, a logo, or a black and white image).

RAW (raw file)

Favorite format of a professional photographer. When using this format, the image data is left unprocessed, resulting in images with a lot of information, which significantly impacts the file size. In a program (For example, Photoshop or LightRoom), a photographer can easily edit image parameters such as exposure time, filters, modes and many other parameters.

Which format to use

It depends on how you intend to use the images. Below are some recommendations that should help you.

JPG

Most digital cameras save images as JPG by default. As mentioned above, JPG is a pretty good compromise between image quality and file size. But you may not know that you can control the degree of compression of JPG images in your camera, and therefore their quality. Take a closer look at the camera settings; no doubt, you will find somewhere a means of adjusting the image quality. It can be located in the menu system or be a button on the camera body.

Note that the concept of image quality is quite different from the concept of resolution. Permission - is the number of pixels that make up the image, and image quality is determined by the amount of color information that can be stored in each pixel, and this parameter can be used to determine what percentage of image quality is sacrificed.

Most cameras have several image quality settings, such as high, medium and low. I recommend that you select the highest image quality for JPG format, since if you set the quality to low you will get completely unacceptable images. On the other hand, setting the highest image quality and resolution will use more.

Lossless graphics files

Many digital cameras can save files in another format - TIF. Remember that the TIF format, unlike JPG, is used when you need to ensure that the image is saved without losing data.

It is best to use the TIF format if the photograph is being used specifically so that it can later be cropped, enlarged and printed. Indeed, for professional work the TIF graphic format may be necessary, but even in such cases it may be sufficient high resolution and JPG format quality. Remember, however, that the accuracy provided by the TIF format seriously affects the amount of memory required to store a single image. If you want to save a lot of pictures in TIF format, you should have the largest memory card you can afford.

In general, I suggest that you forget about TIF for a digital camera. It doesn't cost any sacrifices since the JPG with installation maximum quality The image and resolution are more than enough in 99.9% of cases. In addition, it takes a long time to write a TIF file to a memory card.

RAW

There is another file format that you may encounter in some digital cameras. RAW format is much better than TIF. As noted above, it stores completely uncompressed photo data.

A RAW file is like a digital negative - completely raw, unfiltered and untouched. Some professional photographers use RAW files because they give more creative options when processing an image. But not all digital cameras allow you to save photos in RAW.

Many graphics editors are not capable of processing RAW files. In order to open such a RAW file, you must install it on your computer. special application, a plugin for a graphic editor. However, companies supply cameras with special software that understands RAW.

Digital images have a wide range of uses, which is why there are so many file formats. Below are some tips for choosing a file format that you might find useful:

  • If you want to post an image online, then JPG is the best choice. But GIF files are good because they are convenient to place in text, due to the transparent background.
  • If you are going to print large photos, such as 20x30 cm or more, then the most suitable formats are TIF and JPG.
  • For slideshows and most similar projects, JPG is ideal.
  • For professional work and flexibility in photography settings, use RAW

Brief summary: Graphic data compression methods. Saving images in standard formats, as well as proprietary formats of graphics programs. Convert files from one format to another.

Target: know compression methods for graphic files, be able to distinguish between graphic file formats and understand the advisability of using them when working with various graphics programs.

An image is characterized by the maximum number of colors that can be used in it, that is, have different color depth. There are types of images with different color depths - black and white line, grayscale, indexed color, full color. Some types of images have the same color depth but differ in color model. The image type is determined when the document is created.

Halftone images.

These images contain pixels of the same color but different brightness. Each pixel can take on 256 different brightness values ​​from 0 (black) to 255 (white). This is quite enough to correctly display an image, for example, a black and white photograph.

Any image can be turned into halftone. If the source material is, for example, a color photograph, then it will become monochrome.


Rice. 1.7.

Images with indexed colors

Indexed colors are so called because in this mode, each pixel in the image is assigned an index pointing to a specific color from a special table called a color palette. Indexed palettes do not contain more than 256 colors, but there may be much less. The fewer colors in the palette, the less memory is required to store the color of each pixel and, therefore, the smaller the image file size.


Rice. 1.8.

Full color images

Full-color images have no restrictions on the number of colors and can be represented in more than 16 million shades.


Rice. 1.9.

Graphic file formats

Format- the structure of the file, which determines the way it is stored and displayed on the screen or when printed. The file format is usually indicated in its name, as a part separated by a dot (usually this part is called the file name extension).

Extension- these are several letters or numbers located after the dot in the file name.

For example, the name ending (extension) ".txt" is usually used to denote files containing only text information, and ".doc" - containing text information structured in accordance with standards Microsoft programs Word. Files whose contents follow the same format are called single file types.

Graphic file formats determine the method of storing information in the file (raster, vector), as well as the form of storing information (compression algorithm used).

Compression is used for raster graphics files, because... they have a fairly large volume.

Table 1 provides a brief description of commonly used graphic file formats.

Table 1.1. Characteristics of graphic formats
Format Picture Mode Type of graphic information Application
VMR Indexed colors only Applique-type drawings containing large areas of solid color. The format is supported by all applications. Not used in publishing due to the large volume of files.
TIFF All Diagram type drawings A universal format for storing scanned images with color channels. Includes compression schemes to reduce file size. An important advantage of the format is its portability to different platforms. In its traditional form, TIFF can be considered the preferred format for producing layouts aimed at typographic printing and other methods of replication.
PSD Supports all image types Any images Is internal to Adobe programs PhotoShop. The only format in which all document information is saved, including layers and channels. However, it is better to save the finished image in other graphic formats for two reasons. Firstly, the PSD file is much larger in size. Secondly, this format is not imported by layout and object graphics programs.
JPEG Only full color images in RGB and CMYK models Full photographs or examples of artistic graphics, including subtle tints of colors. Designed for saving point files with compression. Compression using this method reduces the file size from tenths of a percent to a hundred times (the practical range is from 5 to 15 times), but compression in this format occurs with quality losses (within acceptable limits). A very effective compression algorithm has led to the widest distribution of JPEG on the World Wide Web. The use of this format in printing is not recommended.
GIF Indexed images only Diagram-type drawings - images have large areas of uniform coloring with clearly defined boundaries; animated images Designed specifically for transferring images to global networks. Has the most effective method compression, which is necessary to reduce image transmission time. A new version allows storing multiple images in one file. Most often this feature is used on Web pages. The web browser displays images located in GIF file, sequentially.
PNG Supports full color RGB images and indexed images. Color images with smooth transitions from opaque to transparent areas The very name of the format, Portable Network Graphics, speaks about its purpose - for transmitting images over networks. It is possible to use a single additional channel to store the transparency mask. Has an effective compression algorithm without loss of information. The format is used on the Web.
EPS All Vector graphics, fonts, rasterized images Used in printing. It is possible to store screening information, contours and calibration curves.

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

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

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

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

Raster image formats

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

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

Publications on the topic