• Formats of graphic objects give their brief description. Graphic files

    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 get started!

    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 JPEG image 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 resave. 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, you cannot use BMP either for the web, or 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 in 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 the best quality images. 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 affects 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 the JPG format because when installing low quality you will receive completely inappropriate images. On the other hand, when installing the high quality More images and resolutions will be used.

    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, the high resolution and quality of the JPG format may be sufficient. 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's not worth any sacrifice, since JPG with the image quality and resolution set to maximum is 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, which 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

    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, 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 widespread 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. Traditional way creating PDF documents is a virtual printer, that is, the document as such is prepared in its own specialized program - graphics program or word processor, CAD, etc., and then exported to PDF format for electronic distribution, printing, etc. PDF.

    PDF format allows you to implement 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. Distributed in this format large number accompanying documentation.

    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) - presentation standard 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, consecutive 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.

    Scope of application

    The PNG format is designed to replace the outdated and simpler GIF format, and also, 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 absolute dominance of the format, 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

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

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

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

    BMP (Windows Device Independent Bitmap). Windows native format. It is supported by all graphic editors running this operating system. It is used to store bitmap images intended for use in Windows and this is where its scope ends. Using BMP for purposes other than Windows is a fairly common mistake.

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

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

    The higher the compression level, the more data is discarded, the lower the quality. Using JPEG you can get a file 1-500 times smaller than BMP! Initially, CMYK was not included in the format specifications; Adobe added support for color separations, but CMYK JPEG causes problems in many programs.

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

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

    In the TIFF format, it is possible to save using several types of compression: JPEG, ZIP, but, as a rule, only LZW compression is used.

    EPS(Encapsulated PostScript). The format uses a simplified version of PostScript: it cannot contain more than one page in one file, and does not save a number of printer settings. EPS is designed for transferring vectors and rasters to publishing systems and is created by almost all programs that work with graphics. It makes sense to use it only when the output is carried out on a PostScript device. EPS supports everything needed for printing color models.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Graphic format is a way of recording graphic information.

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

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

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



    Knowledge of file formats and their capabilities is one of the key factors in computer graphics. Yes, today there is no such kaleidoscope of extensions as in the early 90s, when every image editor company considered it its duty to create its own file type, or even more than one, but this does not mean that “everything needs to be saved in TIFF, but compress JPEG." Each of the established formats has undergone natural selection and has proven its viability. All of them have some characteristic features and capabilities that make them indispensable in their work. Knowledge of the features and subtleties of technology is also important for a modern designer. As an artist, it is necessary to understand the differences in the chemical composition of paints, the properties of soils, types of metals and rocks.

    Information compression methods

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

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

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

    Lossless compression algorithms:



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

    · LZW - used in GIF format

    · LZ-Huffman - used in PNG format

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

    RLE compression method

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

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

    LZW compression method

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

    Huffman compression method

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

    CCITT compression method

    The CCITT (International Telegraph and Telephone Committie) compression method was developed for facsimile transmission and reception. It is a narrower version of Huffman coding. CCITT Group 3 is identical to the fax message format, CCITT Group 4 is the fax format, but without special control information. CCITT Group 3 and 4 algorithms are designed for encoding binary raster images. They were originally developed for fax networks (which is why they are sometimes called Fax 3, Fax 4). Currently they are also used in printing, digital mapping systems and geographic information systems. The Group 3 algorithm resembles RLE in that it encodes linear sequences of pixels, while Group 4 encodes two-dimensional fields of pixels.

    Graphics file formats

    Raster format

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

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

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

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

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

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

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

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

    Format JPEG file(Joint Photographic Experts Group - Pronounced "japeg") was developed by C-Cube Microsystems as effective method Storing images with great color depth, such as those produced by scanning photographs with many subtle (and sometimes imperceptible) shades of color. Files in this format have the extension .JPG or .JPE, .JPEG, .jfif. The JPEG algorithm allows you to compress the image.

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

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

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

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

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

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

    (English) . Graphics Interchange Format - a format for exchanging images). GIF is a format for storing graphic images. The GIF format is capable of storing compressed data without loss of quality in a format of no more than 256 colors. The hardware-independent GIF format was developed in 1987 (GIF87a) by CompuServe for transmitting raster images over networks. In 1989, the format was modified (GIF89a), support for transparency and animation was added. GIF uses LZW-compression, which allows you to do a good job of compressing files that have a lot of uniform fills (logos, inscriptions, diagrams). The LZW compression algorithm is a lossless compression format. This means that the data recovered from GIF will exactly match the compressed data. It should be noted that this is only true for 8-bit images with a palette; for a color photograph, the loss will be due to its conversion to 256 colors.

    GIF is widely used on World Wide Web pages.

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

    Interlaced GIF

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

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

    Animated images

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

    Patent protection

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

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

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

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

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

    PNG supports three main types of raster images:

    · Halftone (16-bit color depth)

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

    Full color image (48 bit color depth)

    The PNG format stores graphic information in compressed form. Moreover, this compression is performed without losses, unlike, for example, JPEG with losses. The PNG format has a higher compression ratio for files with more colors than GIF, but the difference is about 5-25%, which is not enough for absolute dominance of the format, 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.

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

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

    Files in this format have the extension .PSD.

    TIF, TIFF

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

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

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

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

    PDF format

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

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

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

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

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

    Vector format

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

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

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

    Standard Recommended World Wide Web Consortium for describing two-dimensional vector and combined using XML markup vector-raster graphics.
    In the browser, SVG graphics are rendered using raster engines. Support for translucency in each layer, linear gradients, radial gradients, visual effects(shadows, washes, shiny surfaces, textures, patterns of any design, symbols of any complexity).

    SVG is a format for 2D vector graphics - as defined in the specification, but by adding script (namely JavaScript) inside an SVG file you can create 3D animated images. SVG can have a built-in raster image, which, like any other object in SVG, can have transformation, transparency, etc. applied to it.

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

    Advantages of the format

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

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

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

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

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

    Disadvantages of the format

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

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

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

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

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

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

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

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

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

    It uses a simplified version of PostScript and cannot contain more than one page in one file, nor does it save a number of printer settings. Like PostScript print files, EPS records the final work, although programs such as Adobe Illustrator and Adobe Photoshop can use it as a working document. The main trump card of the format is versatility. Almost all programs that work with graphics can write and read files in this format. An image in a file is usually stored in two copies: a master and a thumbnail, so a raster image recorded in EPS format will be slightly larger in size than PCX and BMP. The native program of this format is Adobe Illustrator. It can be used for cross-platform graphics sharing.

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

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

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

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

    Basic graphic file formats

    RAW

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

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

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

    JPEG (or JPG)

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

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

    TIFF (Tagged Image File Format)

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

    PSD (Photoshop Document)

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

    BMP (Bit MaP image)

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

    GIF (Graphics Interchange Format)

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

    PNG (Portable network graphics)

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

    JPEG 2000 (or jp2)

    A graphic format that, instead of the discrete cosine transform characteristic of JPEG, uses wavelet transform technology, which is based on representing the signal as a superposition of some basic functions - wave packets. As a result of this compression, the image is smoother and clearer, and the file size is reduced by another 30% compared to JPEG at the same quality. Speaking in simple language, with the same quality, the file size in JPEG 2000 format is 30% smaller than JPG. With strong JPEG compression 2000 does not split the image into squares that are 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).

    WMF (Windows MetaFile)

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

    CDR (CorelDRaw files)

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

    AI (AdobeIllustrator files)

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

    EPS (Encapsulated PostScript)

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

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